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
Comments
I would suggest to let setup create a new one by filling in the db credentials manually.
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?
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
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?
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.
So MySQLi does not work so try to set another one on your server. I can assure that 1.4.5 works on the same environment as 1.4.1 an standard shared hosts.
Database credentials in configuration file
Error!
MySQLi reported: MySQLi not connected
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
None of these have to do with MySQL unless the config file cannot be read. Which the error log should tell about.
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
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.
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.
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?
1 (preferred)get your host to fix whatever is wrong with their insatllation.
2. Disable the PHP MySQLi module in your PHP.ini settings.
it shows
Database credentials in configuration file
Error!
PDO::MySQL reported: PDO::MySQL not connected
where is configuration file i am tring to install from last two days
edit: the original error I got was
your installation has moved from /home2/... to /home1/
your database software has changed from MySql 5.5.29 to 5.5.32
Please reinstall the following setup files from 1.4.3.4...
Do I need to follow those instructions rather than simply upgrading like I was going to do?
Thanks for your help
Norbert
In the mean time, why haven't you taken the other suggestion and disabled the MySQLi support in your PHP ini file so that Zenphoto will use MySQL just like it did on your older release? I'm betting that will not work either because of some sort of credentials problem.
I just had the same problem when trying to upgrade to ZenPhoto 1.4.5.1.
My host has php 5.3.26 and mysql 5.5.30.
Now, although mysqli is installed and enabled, I couldn't get it to work with ZP (I don't remember if in the older versions I used it or mysql driver). The thing is, that during setup, I could select the mysql driver, and then that step would work, but the next setup step (for example, delete extra file) would revert back to using mysqli and thus fail to connect again.
This happened even if I edited the config file manually. It seems there's a bug in the setup script which overwrites the config at every step and reverts it back to using mysqli.
The workaround I found for this was to manually edit the config file to change it to use mysql driver, before continuing to the next step, for each step.
It would be nice if I found why mysqli doesn't work on my host with ZP, but unfortunately I don't have time to debug this. I had to get this upgrade done and move on with my life
But in any case, it is definite that there's a bug in the setup script which overwrites the user selection of DB driver, and this happens at every step of the setup.
Cheers,
o