Super User is a question and answer site for computer enthusiasts and power users. 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 installed php on the server and php_info(); displays:

Configuration File (php.ini) Path   /home/gmcnulty/php  

However, I don't see anything there nor do I see any php directory?

How do I locate the php directory and specifically the php.ini file?


share|improve this question

Try going into /etc and executing find -name "php.ini" This should tell you where php.ini is located.

share|improve this answer
listed 6 directories followed by "Permission denied" - guess that mean I can't make changes to it? – Greg McNulty Jun 17 '12 at 21:43
Hm, were you able to find the file you're looking for? The Permission denied message is there probably because you aren't running the command in superuser mode. Try sudo find -name "php.ini" and that should go away. – superuser Jun 18 '12 at 3:27

If you can access the CLI, typing php --ini will show you which .ini file PHP is trying to load.

It's possible, but unlikely, that you have no php.ini file at all, and could create one in the place that php_info(); suggests.

If you are on shared hosting, you may not be able to navigate highter than /home/gmcnulty, so in this case you should look for the php directory in the highest level you can access.

It is normal for php.ini to live in /etc, but I have also seen it installed in /var/lib before.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .