Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

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

I recently installed APC extensions for my default PHP installation. To facilitate the loading of this new extension I created a new php.ini in /private/etc/

So now this location contains both the new php.ini and the default, php.ini.default. The new php.ini is just a copy of the default one but with the added extension being loading in the dynamic extensions section.

When I attempt to access any page in my local/host/~username virtual directory I receive a server 500 error.

I viewed the logs located in /var/log/apache2/ but I don't see any log of a server 500 error.

I suspect that this error might be related to my having both the default and the new php.ini in the same directory.

Has anyone had this problem? Should I remove / rename the default configuration file?

This is the line that I added to the Dynamic Extensions section of php.ini

vim extension=/usr/lib/php/extensions/no-debug-non-zts-20090626/

share|improve this question
What did you do to make Apache use the right php.ini file? Do you have xcache installed? Please post your Apache configuration file? – quanta Aug 23 '11 at 6:29
up vote 0 down vote accepted
  1. Run ls /usr/lib/php/extensions/no-debug-non-zts-20090626/ Is the extension binary there? If not, make sure it's properly installed.
  2. The added line should probably be just
  3. If it still doesn't work, make sure extension_dir=/usr/lib/php/extensions/no-debug-non-zts-20090626 is in your php.ini.

Best of luck!

share|improve this answer
Thank you for the reply. I changed the my extension inclusion line to just be I found a commented out line that said extension_dir = "./" I uncommented this line and changed the path to match the path to the folder containing my extension. No beans. I commented out the line though and it works. So it it definitely the extension that is blowing me up. – Nick Aug 23 '11 at 3:48
1) Wrong build (built for different PHP version, thread-safe/non-thread-safe, x32 / x64 bit) ? 2) Wrong APC configuration (how did you configured it)? – LazyOne Aug 23 '11 at 10:55
@LazyOne excuse my ignorance. I am new to PHP configuration. I compiled the extension and then just added the extension to the dynamic extension section of my php.ini. I was using some instructions I found online. Is there more configuration that needs to be done to the extension outside of just adding the extension to the php.ini? – Nick Aug 24 '11 at 3:06
@Nick Have a look here, maybe some default setting breaks everything: – LazyOne Aug 24 '11 at 7:13

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.