Second PHP still loading primary ini file

floyd

Verified User
Joined
Mar 29, 2005
Messages
5,315
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
 

smtalk

Administrator
Staff member
Joined
Aug 22, 2006
Messages
8,887
Location
LT, EU
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)
 

floyd

Verified User
Joined
Mar 29, 2005
Messages
5,315
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?
 

smtalk

Administrator
Staff member
Joined
Aug 22, 2006
Messages
8,887
Location
LT, EU
Didn't you use PHP_INI_SCAN_DIR in custom configs? What's the php mode?
 

floyd

Verified User
Joined
Mar 29, 2005
Messages
5,315
php mode is suphp

httpd.conf has

suPHP_Engine ON
suPHP_UserGroup mml mml
<FilesMatch "\.php$">
AddHandler x-httpd-php56 .php
</FilesMatch>
 

floyd

Verified User
Joined
Mar 29, 2005
Messages
5,315
I don't need per user php.ini but just the general one for php5.6
 

smtalk

Administrator
Staff member
Joined
Aug 22, 2006
Messages
8,887
Location
LT, EU
It's likely related to suphp config then. As suPHP is end-of-life, I'd suggest switching the mode.
 

smtalk

Administrator
Staff member
Joined
Aug 22, 2006
Messages
8,887
Location
LT, EU
I'd suggest PHP-FPM (or LSPHP if LiteSpeed/OpenLiteSpeed used).
 

floyd

Verified User
Joined
Mar 29, 2005
Messages
5,315
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
 
Top