Second PHP still loading primary ini file

floyd

Verified User
Joined
Mar 29, 2005
Messages
6,334
I have a domain configured to use the second php (5.6) but its seems to be also loading 7.3. See below.


Configuration File (php.ini) Path/usr/local/php56/lib
Loaded Configuration File/usr/local/php73/lib/php.ini
Scan this dir for additional .ini files/usr/local/php56/lib/php.conf.d
Additional .ini files parsed/usr/local/php56/lib/php.conf.d/10-directadmin.ini, /usr/local/php56/lib/php.conf.d/50-webapps.ini
 
Maybe something in custom compilation flags of PHP? Or HTTP environment variables (that way it'd show correct ini file loaded using /usr/local/php56/bin/php -i call from terminal)
 
I just used custombuild to build both 7.3 and 5.6. Everything should be just standard stuff. I haven't done any custom stuff that I know of.

/usr/local/php56/bin/php -i
Loaded Configuration File => /usr/local/php56/lib/php.ini

So how would http get the 7.3 file?
 
Didn't you use PHP_INI_SCAN_DIR in custom configs? What's the php mode?
 
php mode is suphp

httpd.conf has

suPHP_Engine ON
suPHP_UserGroup mml mml
<FilesMatch "\.php$">
AddHandler x-httpd-php56 .php
</FilesMatch>
 
I don't need per user php.ini but just the general one for php5.6
 
It's likely related to suphp config then. As suPHP is end-of-life, I'd suggest switching the mode.
 
I'd suggest PHP-FPM (or LSPHP if LiteSpeed/OpenLiteSpeed used).
 
After switching to php-fpm the correct files are loaded.

Configuration File (php.ini) Path /usr/local/php56/lib
Loaded Configuration File /usr/local/php56/lib/php.ini
Scan this dir for additional .ini files /usr/local/php56/lib/php.conf.d
Additional .ini files parsed /usr/local/php56/lib/php.conf.d/10-directadmin.ini, /usr/local/php56/lib/php.conf.d/50-webapps.ini
 
Back
Top