Why is PHP.ini not using the /etc directory?

#1
When I check my PHP Info () I see the following:

Configuration File (php.ini) Path: /usr/local/lsws/lsphp54/lib
Loaded Configuration File: /usr/local/lsws/lsphp54/lib/php.ini
Scan this dir for additional .ini files: (none}
Additional .ini files parsed: (none)

Now I tried playing around with installing/compiling PHP 5.6 for Litespeed earlier, and then flipped back to PHP 5.4...and upon flipping back to PHP 5.4 in Litespeed (performing a graceful restart and then later a full server reboot)...I'm no longer seeing all of my included INI files that should be listed under "Scan this dir for additional .ini files"...Earlier my PHP.ini was also referencing /usr/local/lsws/lsphp54/etc... NOT /usr/local/lsws/lsphp54/lib... I believe this is part of the problem., or maybe not? I've also since tried recompiling PHP 5.4 and doing a graceful restart...no difference.

When I run the following to see where my php.ini config is says my php.ini file should be located, it reads:

[root@srv ~]# /usr/local/lsws/fcgi-bin/lsphp5 -i | grep php.ini
Configuration File (php.ini) Path => /usr/local/lsws/lsphp54/lib
Loaded Configuration File => /usr/local/lsws/lsphp54/lib/php.ini

Okay so that's great, I've placed my PHP.ini file within the /lib directory.... but how do I get my Scan this dir for additional .ini files & Additional .ini files parsed to list all of my *.INI files located within: /usr/local/lsws/lsphp54/etc/php.d ?

I want it all to look similar to the screenshot shown here in the documentation and what I had also seen as working properly earlier this evening please: https://www.litespeedtech.com/suppo...espeed_wiki:php:php_lsrepo_phpinfo.png?cache=

Please let me know and thanks in advance for your time and help!
 
Last edited:

Pong

Administrator
Staff member
#2
If you compile PHP yourself, you should add
--with-config-file-path=PATH and --with-config-file-scan-dir=PATH.
 
Top