DoppyNL
July 7th, 2009, 07:17 AM
Hi people,
I'm having difficulty getting PHP to store it's errormessages in a file.
I've succesfully configured apache and php, wich is running fine from the browser.
The problem is that PHP doesn't leave errormessage's anywhere in a logfile.
Since it is a semi-production-server i've configured PHP to not display any error messages in php.ini:
display_errors = Off
display_startup_errors = Off
log_errors = On
Since I want an error log per virtual host, I've configured a bit further in the configuration-file.
DocumentRoot /home/sites/whatever/www/
php_admin_value open_basedir /home/sites/whatever/
php_admin_value upload_tmp_dir /home/sites/whatever/tmp/
php_admin_value error_log /home/sites/whatever/logs/error-php
ErrorLog /home/sites/whatever/logs/error-apache
CustomLog /home/sites/whatever/logs/access combined
LogLevel warn
This results in apache running some code in this virtual host, but encountering a fatal error, probably due to a syntax error in a php-script.
But because PHP-errors don't come up anywhere, it's quite difficult to solve the error.
Apache only creates the files "access" and "error-apache", not "error-php".
Question: How do I configure Apache/PHP so it saves the PHP-error-messages in a file?
It's fine if this is also the apache-error-file.
please help [-o<
I'm having difficulty getting PHP to store it's errormessages in a file.
I've succesfully configured apache and php, wich is running fine from the browser.
The problem is that PHP doesn't leave errormessage's anywhere in a logfile.
Since it is a semi-production-server i've configured PHP to not display any error messages in php.ini:
display_errors = Off
display_startup_errors = Off
log_errors = On
Since I want an error log per virtual host, I've configured a bit further in the configuration-file.
DocumentRoot /home/sites/whatever/www/
php_admin_value open_basedir /home/sites/whatever/
php_admin_value upload_tmp_dir /home/sites/whatever/tmp/
php_admin_value error_log /home/sites/whatever/logs/error-php
ErrorLog /home/sites/whatever/logs/error-apache
CustomLog /home/sites/whatever/logs/access combined
LogLevel warn
This results in apache running some code in this virtual host, but encountering a fatal error, probably due to a syntax error in a php-script.
But because PHP-errors don't come up anywhere, it's quite difficult to solve the error.
Apache only creates the files "access" and "error-apache", not "error-php".
Question: How do I configure Apache/PHP so it saves the PHP-error-messages in a file?
It's fine if this is also the apache-error-file.
please help [-o<