Ewan Delanoy
Ewan Delanoy

Reputation: 1282

php_ini_loaded_file not working with PHP 5.5.30, Apache 2.4 in El Capitan

I'm using Apache 2.4 on my El Capitan Mac. I would like to know which php.ini is used by the server. The output of phpinfo() tells me that that the path for the php.ini file is the etc/ directory. Unfortunately, there are four such files there :

php.ini-5.2-previous
php.ini.default
php.ini.default-5.2-previous
php.ini.default-5.2-previous~orig

My guess would be that it uses php.ini.default, but I would like to be 100% sure. So I call php_ini_loaded_file(), which unfortunately returnsbool(false). Does it mean that the PHP module in Apache does not load any php.ini at all ???

Any help appreciated.

Upvotes: 0

Views: 370

Answers (1)

syck
syck

Reputation: 3029

If you do not have any "Loaded Configuration File" row in your phpinfo() output, then probably there is no php.ini file loaded at all, as you suspect.

Try to copy one of the existing files to the filename php.ini, and restart the server. If it loads it, find out the differences between the variants and configure your system to your needs.

Upvotes: 2

Related Questions