Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

On our Amazon EC2 instance, I uninstalled PHP5.3 (yum remove php) and installed PHP 5.5, which also bundled in Apache 2.4 (yum install php54).

For some reason, my php.ini file is no longer being read. It looks like it may be deprecated, and maybe I should use /etc/php-5.5.ini instead - but that one isn't being read either! (Strangely, I can't find any documentation on this. Googling "php-5.5.ini" (with quotes) returns no helpful results!??)

Running php --ini, I get this:

[ec2-user@ip ~]$ php --ini
Configuration File (php.ini) Path: /etc/php-5.5.d
Loaded Configuration File:         /etc/php-5.5.d/php.ini
Scan for additional .ini files in: /etc/php-5.5.d
Additional .ini files parsed:      /etc/php-5.5.d/apc.ini,

Neither ini file are listed here. There's a /etc/php-5.5.d/php.ini, but it is blank except for this message: ; The php.ini file has moved to /etc/php-5.5.ini.

But again, /etc/php-5.5.ini isn't being read either...

I'm not sure what the ".d" naming scheme means here - is it "default" or "daemon" or something else?

What can I do to get either of these INI files read? Or do I just need to throw everything into /etc/php-5.5.d/php.ini?

share|improve this question
up vote 1 down vote accepted

Your PHP is configured to read all .ini files in the /etc/php-5.5.d folder. This allows for logical separation of settings - APC's settings go into apc.ini, memcached's go in memcached.ini, etc.

You can put any settings you want to modify in /etc/php-5.5.d/php.ini or create a new .ini in the folder. /etc/php-5.5.d/DOOManiac.ini would work just fine, for example.

Regarding .d folders:

share|improve this answer
That's what it looks like, except for the fact that /etc/php-5.5.d/php.ini is devoid of any 'default' settings and merely points the user to /etc/php-5.5.ini. I know it would work, but it feels kind of hacky, so I just wanted to check and make sure that yes this is what I should really do. Thanks – DOOManiac Jan 2 '14 at 15:10
Also, thanks for clarifying the .d issue! – DOOManiac Jan 2 '14 at 15:11
An empty php.ini file will still get PHP's internal defaults. Some distributions pre-populate the default php.ini file with a big long list of default settings, but it's not strictly necessary. You can run PHP with no php.ini file whatsoever, in fact. – ceejayoz Jan 2 '14 at 15:13
Okay, I bit the bullet and did sudo cp /etc/php-5.5.ini /etc/php-5.5.d/php.ini. Everything works fine now. I guess I'll just delete all these old INI files and tell everyone it's in a different place now... – DOOManiac Jan 2 '14 at 15:18
Other option - symlink /etc/php-5.5.ini to /etc/php-5.5.d/php.ini or the other way around. – ceejayoz Jan 2 '14 at 15:30

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.