Announcement

#16 2020-11-18 08:19:05

kt368
Member
2020-11-14
9

Re: Installation thru web browser: Cannot connect to server

Have some progress.
I have tried to test mysqli from PHP script.I've created file test.php with this content:

Code:

<?php
$link = mysqli_connect("localhost", "piwigouser", "password", "piwigo");
if (!$link) {
echo "Error: Can not establish connection to MySQL server." . PHP_EOL;
echo "Error number errno: " . mysqli_connect_errno() . PHP_EOL;
echo "Text of error: " . mysqli_connect_error() . PHP_EOL;
exit;
}
echo "Connection to MySQL server established!" . PHP_EOL;
echo "Server info: " . mysqli_get_host_info($link) . PHP_EOL;
mysqli_close($link);
?>

Connection was not established until I've changed

Code:

$link = mysqli_connect("localhost", "piwigouser", "password", "piwigo");

to

Code:

$link = mysqli_connect("127.0.0.1", "piwigouser", "password", "piwigo");

Then I've tried to define Host address at database configuration section of installation page as 127.0.0.1:
screenshot
Proceed with installation.... and get this error:

Code:

Fatal error: Uncaught Error: Call to undefined function session_set_save_handler() in /www/piwigo/install.php:479 Stack trace: #0 {main} thrown in /www/piwigo/install.php on line 479

I've checked database content:

Code:

MariaDB [piwigo]> SHOW TABLES;
+-------------------------------+
| Tables_in_piwigo              |
+-------------------------------+
| piwigo_activity               |
| piwigo_caddie                 |
| piwigo_categories             |
| piwigo_comments               |
| piwigo_config                 |
| piwigo_favorites              |
| piwigo_group_access           |
| piwigo_groups                 |
| piwigo_history                |
| piwigo_history_summary        |
| piwigo_image_category         |
| piwigo_image_format           |
| piwigo_image_tag              |
| piwigo_images                 |
| piwigo_languages              |
| piwigo_old_permalinks         |
| piwigo_plugins                |
| piwigo_rate                   |
| piwigo_search                 |
| piwigo_sessions               |
| piwigo_sites                  |
| piwigo_tags                   |
| piwigo_themes                 |
| piwigo_upgrade                |
| piwigo_user_access            |
| piwigo_user_auth_keys         |
| piwigo_user_cache             |
| piwigo_user_cache_categories  |
| piwigo_user_feed              |
| piwigo_user_group             |
| piwigo_user_infos             |
| piwigo_user_mail_notification |
| piwigo_users                  |
+-------------------------------+
33 rows in set (0.00 sec)

Before doing all these things I've changed files permission /www/piwigo as 777.
I've tried uhttpd and nginx web browsers - same results...

Offline

 

#17 2020-11-18 12:57:04

erAck
Only trying to help
2015-09-06
2023

Re: Installation thru web browser: Cannot connect to server

If PHP can't connect to MySQL on localhost but can to 127.0.0.1 it might be MySQL has no grant for localhost (but then again the mysql command earlier worked with localhost, so.. shrug), or something else is broken in your setup. Might also be mysql.sock is not setup properly, wrong location or permissions. Search the net
https://www.qwant.com/?q=php%20mysql%20 … 0localhost

If the PHP function session_set_save_handler() is not found it may be session capability is not compiled in or not installed or not enabled and if so of course it fails with any webserver. Check the php --info output for session section and there's

Session Support => enabled
Registered save handlers => files user


Running Piwigo at https://erack.net/gallery/

Offline

 

#18 2020-11-25 05:17:00

kt368
Member
2020-11-14
9

Re: Installation thru web browser: Cannot connect to server

Good news: I did it.

After installing php7-mod-session piwigo started successfully.

Now I'm trying to add ability to automatic uploads of photos and videos from my phone and automatic convert videos to 30 fps (I prefer to take video at 60 fps, but I can't watch such videos by VideoJS, only playing of 30 fps videos work).

Last edited by kt368 (2020-11-25 05:17:17)

Offline

 

Board footer

Powered by FluxBB

github twitter newsletter Donate Piwigo.org © 2002-2024 · Contact