RE: [PHP] How to Separate PHP Errors to a file different than Apache Errors
| From: | Shanon Swafford | Date: | Sat, 23 Dec 2006 08:26:20 +0000 |
| Subject: | RE: [PHP] How to Separate PHP Errors to a file different than Apache Errors | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-246168@lists.php.net to get a copy of this message | ||
>
>-----Original Message-----
>From: chris smith [mailto:dmagick@gmail.com]
>Sent: Friday, December 22, 2006 11:29 PM
>To: Shanon Swafford
>Cc: php-general@lists.php.net
>Subject: Re: [PHP] How to Separate PHP Errors to a file different than
Apache Errors
>
>
>On 12/23/06, Shanon Swafford <listbox@swaffordfamily.com> wrote:
>> Hi Guys,
>>
>> I just cut my website over to Apache2 and PHP5 on FC5.
>>
>> So now I'm clean up all the PHP Notices.
>>
>> Does anybody know the config directives I can put in my /etc/php.ini or
>> etc/httpd/conf.d/php.conf or /etc/httpd/conf/httpd.conf so that I could
>> separate the php errors file from the apache errors file?
>
>http://www.php.net/manual/en/ref.errorfunc.php
>
>Specifically 'error_log'.
>
>This will be commented out in a default php.ini file, search for it
>there, enable it and restart your webserver.
>
>Also the webserver user has to 'own' this file (as with it's other
>logs), so check permissions.
>--
Thanks Chris,
I've read that but either it is not possible or I'm still missing something.
This is my setup:
/etc/php.ini
error_log = /var/log/httpd/php_errors
/etc/httpd/conf/httpd.conf
ErrorLog logs/error_log
With this:
Command line php errors show up in php_errors which is good.
But Apache php errors generated by scripts served up by Apache as web pages
all show up in error_log.
I'd like these Apache errors to go into php_errors so I can keep my "Apache:
file not found type errors" and "PHP Syntax" errors separate.
Is this possible?
Thanks again,
Shanon