Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > Linux Forums > Server Operation

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Thread Tools Display Modes
Old 17th January 2011, 14:45
talkingnews talkingnews is offline
Join Date: Jan 2011
Posts: 67
Thanks: 15
Thanked 6 Times in 6 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
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


error log, error logging, php, php 5

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
coexistence of php4 and php5 on ISPC3 AceLine Tips/Tricks/Mods 5 5th November 2010 15:56
Error when install ISPConfig 2 with components built from source X-admin Installation/Configuration 5 30th April 2010 14:22
ffmpeg Video support for ubuntu 7.10 [suphp-ispconfig] amaurib Installation/Configuration 13 16th February 2010 18:26
ISPConfig virtual web pages not working mike_phi Installation/Configuration 8 7th May 2008 17:51
network issues now it says "401 The web site is blocked by administrator" Check General 3 26th February 2008 15:22

All times are GMT +2. The time now is 01:38.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.