473,390 Members | 1,360 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,390 software developers and data experts.

Date in Apache2's error log when error caused by PHP



I've noticed since moving from Apache1/mod_php4/linux to
Apache2/mod_php5/linux that when an error is produced by PHP and put in
the error_log, the date is no longer logged as well:
Apache1/php4/linux example in Apache error_log:

[Thu Jan 8 15:06:52 2004] [error] PHP Warning: opendir(/foo/bar/): failed to open dir: No such file or directory in /blah/something/listing.html on line 84
Apache2/php5/linux example in Apache error_log:

[client 1.2.3.4] PHP Notice: Undefined variable: browserline in /foo/bar/zing.html on line 18
Is there any way to restore this, either at PHP or Apache level?

NB

There is an inconclusive note at
http://www.php.net/manual/en/ref.err...#ini.error-log
which states:

"As pointed out previously, PHP by default logs to the Apache ErrorLog.

Beware: the messages it logs do not conform to Apache's error log format
(missing date and severity fields), so if you use an automated parser on
your error logs, you'll want to redirect PHP's errors somewhere else with
the error_log directive."

But no mention that the behaviour has changed.
Martin
Jul 17 '05 #1
3 1891
>From the Apache 2 SAPI source code:

/* We use APLOG_STARTUP because it keeps us from printing the
* data and time information at the beginning of the error log
* line. Not sure if this is correct, but it mirrors what happens
* with Apache 1.3 -- rbb
*/

I think you and rbb need to chat.

Jul 17 '05 #2


On Mon, 4 Apr 2005, chernyshevsky wrote:
From the Apache 2 SAPI source code:


/* We use APLOG_STARTUP because it keeps us from printing the
* data and time information at the beginning of the error log
* line. Not sure if this is correct, but it mirrors what happens
* with Apache 1.3 -- rbb
*/

I think you and rbb need to chat.


Thanks - well spotted. I have submitted this as a bug report in the hope
that the PHP developers might debate this further.

http://bugs.php.net/bug.php?id=32587
Martin
Jul 17 '05 #3


On Tue, 5 Apr 2005, Martin Lucas-Smith wrote:
On Mon, 4 Apr 2005, chernyshevsky wrote:
From the Apache 2 SAPI source code:


/* We use APLOG_STARTUP because it keeps us from printing the
* data and time information at the beginning of the error log
* line. Not sure if this is correct, but it mirrors what happens
* with Apache 1.3 -- rbb
*/

I think you and rbb need to chat.


Thanks - well spotted. I have submitted this as a bug report in the hope
that the PHP developers might debate this further.

http://bugs.php.net/bug.php?id=32587


Which they've now fixed. Nice..
Martin
Jul 17 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Aldo Polli | last post by:
Hi, I have this error when I start apache2 with php4 Syntax error on line 233 of /mypath/apache2/conf/httpd.conf: Cannot load /mypath/apache2/modules/libphp4.so into server: dynamic linker:...
5
by: Ad Astra | last post by:
I am completely new to PHP and am finding installation the most difficult part to understand and implement. Could someone please review the rather long missive below and assist me? I have...
2
by: Mike | last post by:
I am sure that I am making a simple boneheaded mistake and I would appreciate your help in spotting in. I have just installed apache_2.0.53-win32-x86-no_ssl.exe php-5.0.3-Win32.zip...
1
by: Laurence Neville | last post by:
This is regarding a change in the Short Date format under Hebrew Regional Settings, that has caused huge problems in our ASP web application. The change appears to have been introduced sometime...
1
by: news8080 | last post by:
I downloaded a GUI for nagios that uses PHP but when I point the browser at the PHP file, it shows me the source of .php file instead of executing it, if i use command line 'php filname.php'...
1
by: balleyman47 | last post by:
getting the following error when executing an insert statement: java.lang.IllegalArgumentException: Date/Time must be JDBC format running on UDB 8.2 fix pack 10 using IBM type IV driver. Query...
4
by: ll_42 | last post by:
i reinstalled windows (98), installed apache and extracted the php5 zip file into c:\php. i renamed php.ini-recommended to php.ini and added the following lines to httpd.conf: LoadModule...
2
by: mmr315 | last post by:
i write 2 php files for uploading file ,it is giving error like Undefined index: C:\\Apache2.2 in C:\\Apache2.2\\htdocs\\upload_file.php on line 11, upload.php -------------------- <html>...
5
RedSon
by: RedSon | last post by:
Grr! I've been trying to set up apache2 to serve my bugzilla page for like a week now and I give up! I installed bugzilla: /srv$ ls -l drwxr-xr-x www-data www-data bugzilla I've tried...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.