[Info-vax] php.ini location

Arne Vajhøj arne at vajhoej.dk
Sat Apr 8 13:24:14 EDT 2023


On 4/8/2023 1:16 PM, issinoho wrote:
>  From PHPINFO ()...
> System	OpenVMS X86VMS 0 E9.2-1 VMware,_Inc._VMware7,1
> Build Date	Apr 6 2022 09:59:09
> Configure Command	no value
> Server API	Apache 2.0 Handler
> Virtual Directory Support	disabled
> Configuration File (php.ini) Path	no value
> Loaded Configuration File	(none)
> Scan this dir for additional .ini files	(none)
> Additional .ini files parsed	(none)
> 
> $ dir PHP$ROOT:[ETC]
> 
> Directory PHP$ROOT:[etc]
> 
> cacert.pem;1        php.ini;3           php.ini-dev;1       php.ini-prod;1
> 
> Total of 4 files.
> 
> Anyone know why the php.ini file is not being picked up and/or where it needs to reside?

I have always found that very confusing and used the easy solution
of specifying it explicit.

Example from my VMS httpd.conf:

LoadModule php7_module "/disk1/net/php/mod_php_apache-2_0.exe"
PHPIniDir "/disk1/net/php"

And on Windows (with a very old PHP version):

LoadModule php5_module 
"C:/DivNative/32bit/php-5.6.23-Win32-VC11-x86/php5apache2_4.dll"
PHPIniDir "C:/DivNative/32bit/php-5.6.23-Win32-VC11-x86"

Probably reveals that I am no an Apache & PHP expert, but it works
and it is easy to understand.

Arne




More information about the Info-vax mailing list