View Single Post
  #1  
Old 17th January 2011, 14:45
talkingnews talkingnews is offline
Member
 
Join Date: Jan 2011
Posts: 65
Thanks: 15
Thanked 5 Times in 5 Posts
Default apache and php error logs in same dir as faulting script?

Finally, after much searching, I found a way to make php write the error log file to the same directory as the troublesome script.
The answer is
Quote:
In the start of the scripts where you want to capture the error data, use ini_set('error_log', getcwd().'/errorfile.log');. This will set the error logging temporarily to the directory that your script is working in.
Now, as Professor Frink might say, it should be obvious to even the most dimwitted individual that this is an excellent thing, and something I greatly missed when moving away from cpanel and have been looking for ever since.

The problem is, the rest of that thread is people wondering the same as me without any result is - how can I get the server to somehow do this for ALL php files, without having to append this to every script? The answer, as others have found, doesn't appear to lie with adding it to php.ini.
Unless I'm doing it wrong?

Incidentally, I'm on ISPCONFIG 3.03
Reply With Quote
Sponsored Links