MySQL reported: MySQL not connected errors

2»

Comments

  • I'm a bit busy at the moment, so I'm not sure when I'll have time for this test.
    I'm hosting my website on lunarpages.com shared host plan (the linux version). Maybe you can ask their support for a temporary account to test this?

    Thanks for all your work on ZP.

    Cheers,
    o
  • Hi,

    I just did an update to ZP 1.5.4.2 using softaculous, and the same issues are still there. It still doesn't work with mysqli, and it still doesn't remember my selection of mysql as a driver during the different setup stages.

    Sorry I didn't do a proper test with a clean install, but I just to have time for a comprehensive test at the moment.

    Cheers,
    o
  • Please contact the softaculous support people. We have no idea of their upgrade process and cannot know what it may or may not have done in contrary to what Zenphoto expects.
  • I am having the exact problem that Apprentice is. The ZP upgrade installation won't connect to MySQLi using my usual credentials, but when I use the drop-down menu to switch back to MySQL it does not recognize this and reloads the installation screen with MySQLi re-selected (and the same connection warning).

    This seems to be a problem with ZenPhoto, it would be nice if you folks could look into it.
  • What version of Zenphoto are you using?
  • I'm upgrading to 1.4.5.2. Files are uploaded and the installation screen says everything is a go except for the MySQLi connection issue.
  • Is this still a softaculous install? I ask, because I have no problem selecting MySQL from the drop-down and reverting to that database handler on the 1.4.5.2 release.
  • No, just a manual installation.
  • Try editing the configuration file manually.
  • Also what does happen with MySQLi? Do you get errors or just a failure to connect.
  • I am getting:

    "Error!
    MySQLi reported: MySQLi not connected"

    My config.php file is already populated with the database info. I also changed the line "$conf['db_software']= 'MySQLi'; to 'MySQL' to see if that forced a MySQL connection, but no luck.

    Again, I'm somewhat mystified because before the upgrade installation attempt it was connecting fine.
  • PHP MySQL is a deprecated database interface, so Zenphoto is attempting to migrate your installation off of it. (PHP MySQLi is the replacement) The underlying database is the same, so if the credentials work for one version of the interface they should work for the other. Apparently, though, there is some possibility of a mis-configured PHP MySQLi. But we have no clues as to what has been done wrong.

    Probably your best bet then is to disable the mysqli extension in you PHP ini file until it is properly configured on your site. Your other option is to remove the `functions-db-MySQLi.php` script from your install. But this will be something you will have to do each release and Setup will complain when it finds it missing.
  • Thanks for all the info. I did modify the index.php in the setup folder to put MySQL above MySQLi in the drop-down by default, just to test.

    However, it looks like my upgrade installation can't connect to the MySQL database either, so there's actually something else going on here. Again, for the life of me have no idea as everything was working fine an hour ago until I started the ugprade.
  • Re-check the credentials for MySQL and the database details in the configuration file. These must be incorrect if the connection fails.

    One thing to be sure to verify is the database server name. Perhaps that has been change on you.
  • Same exact issue as the others. Everything is perfect on setup except for the "MySQLi reported: MySQLi not connected" error. This is on Hostgator. When trying to change it to MySQL, I get the same error only with MySQL instead of MySQLi. I checked the config file and the proper credentials are there.

    The only thing in the error log is: [28-Sep-2013 01:01:08] PHP Notice: Undefined variable: o in /home4/usdsd/public_html/zp-core/setup/index.php(718) : eval()'d code on line 29

    Issue is with version 1.4.5.2 as version 1.4.4.4 worked fine.
  • Different error log in zp-core/setup gives this: [28-Sep-2013 00:52:35] PHP Notice: Undefined variable: confDB in /home4/usdsd/public_html/zp-core/setup/index.php on line 920
  • Missed one error in the zp-core/setup error_log: [28-Sep-2013 00:52:35] PHP Fatal error: Call to undefined function db_connect() in /home4/usdsd/public_html/zp-core/setup/index.php on line 947

    So that is three errors from the server error logs in different folders. Hope these help fix the issue.
  • Probably the initial error is the root cause. This is a PHP error in the configuration file. Best guess is that it is a problem in the area of the MySQL credentials statements.

    Could you look at what is in the config file circa line 29? Something there is corrupted.
Sign In or Register to comment.