Cannot use MySQLi during setup

I need to make Zen Photo work with MySQLi for a migration to PHP 7.

During setup (Whether using PHP 5 or 7), Zen Photo fails during setup with the error

"MySQLi reported: Unknown MySQL server host [myHostHere]"

Setup runs perfectly fine if I leave everything identical except for selecting MySQL in the dropdown menu. Also, that same set of credentials works with phpMyAdmin no matter which version of PHP I run, which says it is using MySQLi.

*The error occurs no matter what version of PHP I use.
*Zen Photo installs and works normally if I use MySQL (and not MySQLi) under PHP 5.x (MySQL without 'i' isn't supported in PHP 7)

Is there some special way to set this up?

Comments

  • acrylian Administrator, Developer
    That error itself means that you didn't enter the correct MySQL server name. Are you sure you did? Are you sure you actually have MySQLi installed on that PHP7? You can always enter this data into `/zp-data/zenphoto.cfg.php` manually after running setup.
  • Thanks, I've looked into it, but I think the problem may be that I need to specify a non-standard port number. Is there a way to do this? I didn't see anything in zenphoto.cfg.php that would allow it.
  • It was the problem, and I fixed it by hard-coding the port into the database connection. This isn't a good way to do things, though, so in the future Zen Photo may want to include the ability to set the port.
  • acrylian Administrator, Developer
    I think this is the first time I heard of the need setting a specific port and since the main target is standard shared hosting it is probably not needed most of the times.. But a good idea to include that.
Sign In or Register to comment.