0

For clarity, I'm particularly interested as to whether it makes a difference that I'm using version 7.1 rather than 7.0, as many previous solutions aren't specific to this latest release from Dec 16.

I've installed PHP7.1 which we're planning to use with Wordpress, but can't get the MySQL extension to load, so we're getting the browser error "PHP installation appears to be missing the MySQL extension which is required by WordPress."

It's a red hat box and the web server is Nginx, with the yum installer.

I'm aware that the old MySQL extension was deprecated after v5, and that it's now PDO_MySQL instead (not sure if MySQLi is still okay after v7.0?). So I've installed the latest package and updated the php.ini file with extension=/usr/lib64/php/modules/pdo_mysql.so (and also added mysql.soand mysqli.so, for completeness, and checked that the files are there in the actual folders).

Both PHP-fpm and Nginx have been restarted, but when I list the loaded extensions there's nothing for MySQL, and I'm still getting the same browser error message.

Should this work with v7.1? What am I missing?

Thanks!

Lenny
  • 1
  • 2
  • yum install php-mysqli – Iurii Drozdov Jan 17 '17 at 13:00
  • It seems you've updated wrong `php.ini`. Look at your `phpinfo()` output and check what `.ini` files have been parsed. – lndim Jan 17 '17 at 13:04
  • tried that, it says I already have the latest version installed. "Package php-mysql-5.4.16-42.el7.x86_64 already and installed and latest version. Nothing to do". Is that the latest/correct version? – Lenny Jan 17 '17 at 13:06
  • I checked phpinfo(), I definitely updated the right *.ini file, I double checked the path, just in case. – Lenny Jan 17 '17 at 13:08
  • it doesn't make any difference that you're using version 7.1 rather than 7.0 – Your Common Sense Jan 17 '17 at 13:19
  • then I'm truly stuck because I've read through many similar solutions and followed the steps to the letter but still no joy - the only reason I could guess was that it was different in 7.1 to 7.0. – Lenny Jan 17 '17 at 13:26
  • the reason is obvious. your wordpress is trying to use mysql while you should configure it to use mysqli – Your Common Sense Jan 17 '17 at 13:37
  • That may also be true but shouldn't I be able to see mysqli as one of the loaded extensions? – Lenny Jan 17 '17 at 13:41
  • if you can't see mysqli as one of the loaded extensions then it's not loaded – Your Common Sense Jan 17 '17 at 13:44
  • Well, exactly. Before I try configuring Wordpress, I need to get the extension up and running in php, but having followed all the solutions that I could find (and if it's not a v7.1 specific issue) then I don't know what to try next. Any suggestions welcomed! – Lenny Jan 17 '17 at 14:26

0 Answers0