Turning on PHP Error Logging


Can please somebody explain in layman’s language how to turn on PHP error logging?

In Dreamhost Wikipedia they write:

“The instructions provided in this article or section are considered advanced.
You are expected to be knowledgeable in the UNIX shell.”

…and then:

[i]Turning on PHP Error Logging
Debugging PHP is much easier when you have a log of all the errors.
Add these options to your custom php.ini file:

log_errors = 1
error_log = /home/username/php.log[/i]

Unfortunately, I’m neither experienced in UNIX shell nor do I consider myself advanced. I don’t even know where to look for the custom php.ini.

Please would a kind person give a Dummy step-by-step guidance for a silly women who went out to start a blog believing it would be easy, and is now in the process of reluctantly to develop skills and knowledge in PHP programming :wink:


See http://wiki.dreamhost.com/PHP.ini#PHP_5.3 for instructions on creating a php.ini file.


If I understand right I log in via FTP and manually create a new directory like


This is easy enough if this is actually correct…

…but now I’m lost…

In the Wiki there is further written:

To add custom directives to PHP, create a file under .php/5.3/ called “phprc” and add configuration directives to it.

What are “configuration directives”?

I can add a file and call it “phprc”, but which content does this file need?

…further in Wiki: and then type in the commands you need.

Where do I type these commands? Which commands do I need?

Any assistance you can provide would be much appreciated.


I created:


and a file called “phprc” with following content - 2 rows only which is to be found in above folder:

log_errors = 1
error_log = /home/user/php_errors.txt

Cannot see any error logs though.

What did I do wrong?


Just to let you know that it now works. There were simply no php errors to log. It has now started and I’m quite surprised as I have been expecting to see lots of errors.

It was actually simple. It just sounded awfully difficult reading Dreamhost Wiki and all this warning that one has to be advanced and knowledgeable in the UNIX shell.