473,287 Members | 1,714 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,287 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 1889
>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...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: marcoviolo | last post by:
Dear all, I would like to implement on my worksheet an vlookup dynamic , that consider a change of pivot excel via win32com, from an external excel (without open it) and save the new file into a...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...

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.