Koozali.org: home of the SME Server
Legacy Forums => Experienced User Forum => Topic started by: Michael Roed on February 03, 2003, 05:02:11 PM
-
Symptom:
php doesn't report syntax error or any other errors . . . . . even missing ";" is not reported back to the client browser. it makes it hard to debug.
Question:
What does it take to make esmith/php to report php errors back to the browser.
-
PHP is set to log its errors to syslog messages by default. You can access these logs through the admin web pages.
If you want to log errors to the client then the /etc/php.ini file is where you need to go.
For quick and nasty debug sessions, you can change the php.ini file directly, but if you want it switched on for a longer time, I'd do something like the following:
To switch client debugging on:
mkdir -p /etc/e-smith/templates-custom/etc/php.ini
cd /etc/e-smith/templates-custom/etc/php.ini
copy /etc/e-smith/templates/etc/php.ini/30* .
/sbin/e-smith/expand-template /etc/php.ini
And when you want to switch client debugging off:
rm /etc/e-smith/templates-custom/etc/php.ini/30*
/sbin/e-smith/expand-template /etc/php.ini
Regards,
Luke
-
Thanx Luke!
But I get "Permission denied" and I dont know how to change permission on that file.
So how do I do that???
Thanx,
Michael
-
Just a small note: That should of been 'cp'... not 'copy' in the original instructions.
-
Is the rest of the syntax 100%? I cant get it to work. Theres still no error displayed in the browser when there is an error in my PHP programming.
I just want to modify my php.ini so that it always shows errors in the browser.
/Michael