Additional php ini files not loading for one account

verdon

Well-Known Member
Nov 1, 2003
920
11
168
Northern Ontario, Canada
cPanel Access Level
Root Administrator
I've run into something I've never seen before. I have two builds of php on this server, a 7.0 version and a 5.6.x version. The 7.0 is the default. The 5.6 is to support a couple legacy apps, for a few more months. This mostly works well.

One account, that has never used php before is attempting to install a CMS. They are getting message that mySQL is not available. This is happening regardless of which php version gets used.

When comparing a phpinfo file, I can see that for some reason, this account (and as far as I know this account only) is not loading any of the additional ini files. When comparing a phpinfo file in two accounts using the exact same php build and no customizations or custom php.ini files, I see this

GOOD
Code:
Configuration File (php.ini) Path       /opt/cpanel/ea-php56/root/etc
Loaded Configuration File                 /opt/cpanel/ea-php56/root/etc/php.ini
Scan this dir for additional .ini files    /opt/cpanel/ea-php56/root/etc:/opt/cpanel/ea-php56/root/etc/php.d:.
Additional .ini files parsed                /opt/cpanel/ea-php56/root/etc/php.ini, /opt/cpanel/ea-php56/root/etc/php.d/bcmath.ini, /opt/cpanel/ea-php56/root/etc/php.d/calendar.ini, /opt/cpanel/ea-php56/root/etc/php.d/ctype.ini, /opt/cpanel/ea-php56/root/etc/php.d/curl.ini, /opt/cpanel/ea-php56/root/etc/php.d/dom.ini, /opt/cpanel/ea-php56/root/etc/php.d/ftp.ini, /opt/cpanel/ea-php56/root/etc/php.d/gd.ini, /opt/cpanel/ea-php56/root/etc/php.d/iconv.ini, /opt/cpanel/ea-php56/root/etc/php.d/imap.ini, /opt/cpanel/ea-php56/root/etc/php.d/json.ini, /opt/cpanel/ea-php56/root/etc/php.d/mbstring.ini, /opt/cpanel/ea-php56/root/etc/php.d/mcrypt.ini, /opt/cpanel/ea-php56/root/etc/php.d/mysqlnd.ini, /opt/cpanel/ea-php56/root/etc/php.d/mysqlnd_mysql.ini, /opt/cpanel/ea-php56/root/etc/php.d/mysqlnd_mysqli.ini, /opt/cpanel/ea-php56/root/etc/php.d/pdo.ini, /opt/cpanel/ea-php56/root/etc/php.d/pdo_mysqlnd.ini, /opt/cpanel/ea-php56/root/etc/php.d/pdo_sqlite.ini, /opt/cpanel/ea-php56/root/etc/php.d/phar.ini, /opt/cpanel/ea-php56/root/etc/php.d/posix.ini, /opt/cpanel/ea-php56/root/etc/php.d/simplexml.ini, /opt/cpanel/ea-php56/root/etc/php.d/sockets.ini, /opt/cpanel/ea-php56/root/etc/php.d/sqlite3.ini, /opt/cpanel/ea-php56/root/etc/php.d/tokenizer.ini, /opt/cpanel/ea-php56/root/etc/php.d/xml.ini, /opt/cpanel/ea-php56/root/etc/php.d/xml_wddx.ini, /opt/cpanel/ea-php56/root/etc/php.d/xmlreader.ini, /opt/cpanel/ea-php56/root/etc/php.d/xmlwriter.ini, /opt/cpanel/ea-php56/root/etc/php.d/xsl.ini, /opt/cpanel/ea-php56/root/etc/php.d/zip.ini, /opt/cpanel/ea-php56/root/etc/php.d/zzzzzzz-pecl.ini
BAD
Code:
Configuration File (php.ini) Path       /opt/cpanel/ea-php56/root/etc
Loaded Configuration File                 /opt/cpanel/ea-php56/root/etc/php.ini
Scan this dir for additional .ini files    (none)
Additional .ini files parsed                 (none)
Any idea where I can start to look? I can't imagine how/why these would be different.
 

verdon

Well-Known Member
Nov 1, 2003
920
11
168
Northern Ontario, Canada
cPanel Access Level
Root Administrator
Found and resolved this, with a tip from this post - MySQL extension missing

In a nutshell, there was a 'suPHP_ConfigPath ' declaration in the account's .htaccess file. There was no custom php.ini file there, but just having this entry in the .htaccess file apparently causes all the default additional .ini files to not load.