Hi,
I reinstalled Zenphoto 1.4.5 on my webspace. An older zenphoto version was running before. I deleted the old folder and installed the new version. However in the setup script I get an error message that zenphoto can’t connect to my mysql server. I used the same setting as before; I even copied the old config file into the zp-data directory, but still not working. What could be the problem?
The seup log says:
Zenphoto Setup v1.4.5[5cffbe455e] clone: Tue, 09 Jul 2013 11:21:14 +0000
Query error: MySQLi not connected
Warnung:zp-data-Protokollsicherheit [ist gefährdet] Zenphoto empfiehlt, die sensiblen Dateien im zp-data-Order nur für den Owner zugänglich zu machen (Zugrifssrechte = 0600). Die Dateizugriffsrechte für setup.log sind 0644, was unerlaubten Zugriff erlauben kann.
Thanks for your help
Norbert
Thanks for your reply. As I mentioned I deleted the whole zenphoto folder incl. the config file. The setup ask me for the database setting and the setup stored the setting succesful in the config file. However, the setup still could't connect to the database, so I replaced the config file with the old one and it was still not working.
Failure to connect to the database is almost always a problem with the credentials you supplied.
The error you reported above, however, is a permissions issue and not necessarily a problem. You are being told that the log files are not protected as well as they might be. In your case they can be read by anyone in the group your user id is in. Not necessarily a problem.
Have you had different errors? Perhaps the SQL connection error is shown somewhere?
I did some more test. I installed Zenphoto 1.4.1 successful, so it is definitely related to the new zenphoto version 1.4.5
When I run the setup on the new version those three items have only a green dot without the check mark:
PHP MySQLi support
PHP PDO_MySQL support
PHP MySQL support
Could it be that you change the sql engine and the new engine is not working with my server?
PHP ( 5.4.5) info says the following things about mysql
mysql
MySQL Support enabled
Active Persistent Links 0
Active Links 0
Client API version 5.1.49
MYSQL_MODULE_TYPE external
MYSQL_SOCKET /var/run/mysqld/mysqld.sock
MYSQL_INCLUDE -I/usr/include/mysql
MYSQL_LIBS -L/usr/lib -lmysqlclient
Directive Local Value Master Value
mysql.allow_local_infile On On
mysql.allow_persistent On On
mysql.connect_timeout 60 60
mysql.default_host no value no value
mysql.default_password no value no value
mysql.default_port no value no value
mysql.default_socket /var/run/mysqld/mysqld.sock /var/run/mysqld/mysqld.sock
mysql.default_user no value no value
mysql.max_links Unlimited Unlimited
mysql.max_persistent Unlimited Unlimited
mysql.trace_mode Off Off
mysqli
MysqlI Support enabled
Client API library version mysqlnd 5.0.10 - 20111026 - $Id: b0b3b15c693b7f6aeb3aa66b646fee339f175e39 $
Active Persistent Links 0
Inactive Persistent Links 0
Active Links 0
Directive Local Value Master Value
mysqli.allow_local_infile On On
mysqli.allow_persistent On On
mysqli.default_host no value no value
mysqli.default_port 3306 3306
mysqli.default_pw no value no value
mysqli.default_socket no value no value
mysqli.default_user no value no value
mysqli.max_links Unlimited Unlimited
mysqli.max_persistent Unlimited Unlimited
mysqli.reconnect Off Off
When I run the older Zenphoto 1.4.1 setup I have a green circle with a green check mark on this item:
PHP MySQL support
The other two ones are only a green circles.
When I run the Zenphoto 1.4.5 setup I have a only three green circle without check mark on those items:
PHP MySQLi support
PHP PDO_MySQL support
PHP MySQL support
Why is there a difference? What does a green circle mean and a green circle with a check mark?
Sbillard,
the only error message that I get with zenphoto 1.4.5 is: Query error: MySQLi not connected, even if I put in the correct credentials (they works with older zenphoto installation). Now I was trying to find out why zenphoto 1.4.1 works and 1.4.5 not. The only thing that is different during installation is that the php mysql has the green check mark in the 1.4.1 installation and 1.4.5 only a green circle and the error message mentioned above.
PHP display_errors [is enabled]
Warning!
This setting may result in PHP error messages being displayed on WEB pages. These displays may contain sensitive information about your site.
File Permissions [are loose (0666)]
Warning!
If file permissions are not set to strict or tighter there could be a security risk. However, on some servers Zenphoto does not function correctly with tight file permissions. If Zenphoto has permission errors, run setup again and select a more relaxed permission.
Set File permissions to
These are some other problem when installing Yes Mysqli is working
Where do I need to look for an error message? Which log file? I was wondering if someone could tell me if the new version has a different database engine (mysqli instead of mysql)? And my other question is what does it mean that the installation program don't show the green circle icon with a check mark on the lines:
PHP MySQLi support
PHP PDO_MySQL support
PHP MySQL support
It shows only a green circle. Does it mean it can't find the neccessary libraries?
THanks for your help
Norbert
You have to look where ever your server stores the error log. Your host will know as it is different on all.
The error means it cannot connect. We need more info what exactly cannot connect. The credentials, the php extension itself. Which we don't really know. Zenphoto has no new engine and uses the mysql extension that your server php provides. That are the MySQL (deprecated in PHP 5.3+), the MySQLi (recommended to be used instead the former) and PDO.
Your error report would suggest that there is a problem with your configuration. But since the error gives no further information we cannot know why it is not connecting.
You can always override to use MySQL instead of MySQLi since that worked on the older version. There is a selector for that or you can change the configuration file directly.
Ok, in the error logfile is nothing related to zenphoto. I installed now zenphoto 1.4.4.8. The database connection is not working with mysqlI, however when I switch in the setup to the old mysql it is working (I only get the warning that I use the MySQL version 5.1.49 and zenphoto would prefer 5.5). In zenphoto 1.4.5 I can't switch to mysql; I can choose it in the setup, however zenphoto is always switching back to mysqlI.
My summery is: mySQLi is not working on my webspace as zenphoto would like and zenphoto 1.4.5 has bug that don't allow me to change to the old mysql. Does it make sense?
Zenphoto will prefer to use MySQLi if it is present as MySQL had been deprecated. If MySQLi does not work on your server you should do one of two things.
1 (preferred)get your host to fix whatever is wrong with their insatllation.