0

Your PHP installation appears to be missing the MySQL extension which is required by WordPress.

This is what I get when I try to install WP.

The server is running.

Centos 6.7 x64.
Litespeed Standard Edition.
MariaDB.

I learned that php-mysql is required. So I installed php-mysql.

# rpm -qa | grep php-mysql
php-mysql-5.3.3-46.el6_6.x86_64

# tail mysqli.ini
; Enable mysqli extension module
extension=mysqli.so

Also in phpinfo() I have this.

Loaded Configuration File (none)
Scan this dir for additional .ini files (none)
Additional .ini files parsed (none)

Do I need to rebuild PHP? Am I missing anything else?

guntbert
  • 553
  • 7
  • 21
Himanshu
  • 1
  • 1
  • 1
  • Are you using the CentOS 6 php or have you installed a later version from source? – Ian Oct 12 '15 at 00:11

2 Answers2

1

PHP is not parsing the configuration file. You could add

extension=mysqli.so

to your php.ini file. You can find php.ini by typeing the following command in terminal or by simply looking for the information in your phpinfo() file.

$ php -i | grep "Loaded Configuration File"

(not including the "$")

Ialokin
  • 481
  • 2
  • 9
  • I have updated the php.ini file. However in phpinfo() it's still not updated (I have rebooted litespeed) Loaded Configuration File (none) – Himanshu Oct 11 '15 at 18:38
  • One thing I have noticed is that in phpinfo Configuration File (php.ini) Path /usr/local/lib But my php.ini is located at /etc/php.ini – Himanshu Oct 11 '15 at 18:39
  • http://prntscr.com/8q6lot – Himanshu Oct 11 '15 at 18:40
  • It might just be a symlink. But try to make the changes in /usr/local/lib/php.ini if that is the path reported by PHP. – Ialokin Oct 11 '15 at 19:07
  • To check if `/etc/php.ini` is a symlink, try: `cd /etc && ls -l php.ini`. – Ialokin Oct 11 '15 at 19:09
  • there is no file as /usr/local/lib/php.ini – Himanshu Oct 11 '15 at 19:54
  • And /etc/php.ini is not a symlink – Himanshu Oct 11 '15 at 19:55
  • what is the output of `php --ini` ? – Ialokin Oct 11 '15 at 20:00
  • Let us [continue this discussion in chat](http://chat.stackexchange.com/rooms/30152/discussion-between-himanshu-and-nstensen). – Himanshu Oct 12 '15 at 04:10
  • PHP Warning: Module 'mysqli' already loaded in Unknown on line 0 Configuration File (php.ini) Path: /etc Loaded Configuration File: /etc/php.ini Scan for additional .ini files in: /etc/php.d Additional .ini files parsed: /etc/php.d/curl.ini, /etc/php.d/fileinfo.ini, /etc/php.d/json.ini, /etc/php.d/memcache.ini, /etc/php.d/mysql.ini, /etc/php.d/mysqli.ini, /etc/php.d/pdo.ini, /etc/php.d/pdo_mysql.ini, /etc/php.d/pdo_sqlite.ini, /etc/php.d/phar.ini, /etc/php.d/sqlite3.ini, /etc/php.d/zip.ini – Himanshu Oct 12 '15 at 04:12
0

Try to restart the php-fastcgi service:

systemctl restart php-fastcgi

Or the php-fpm service:

systemctl restart php-fpm

godidier
  • 101
  • 3