Re: [PHP] logging erros and user access to logs
Németh Zoltán wrote: 2007. 03. 15, csütörtök keltezéssel 16.08-kor Jason Joines ezt írta: Richard Lynch wrote: On Thu, March 15, 2007 2:47 pm, Jason Joines wrote: Richard Lynch wrote: On Thu, March 15, 2007 8:25 am, Jason Joines wrote: Richard Lynch wrote: Get the errors OFF the web page (display_errors OFF) and into the ?php error_reporting(E_PARSE); ini_set('display_errors','On'); ini_set('display_startup_errors','On'); include('mypage.php'); ? Then when debugging was done, just delete the debug script. I moved it to a test server and could get it to work but only if display_errors was set to on in the global php.ini file. I can't do that on the production server. The manual says display_errors can be overridden in a script. I used ini_get() to see if the value was actually being changed, it was. However, it still doesn't print the errors unless the global ini is set. Any ideas as to why it's not working? Put ?php phpinfo();? into the mypage.php and see if its Master and Local values are different for display_errors. If they are, then it worked, and you SHOULD see the errors. Well they weren't different so I guess it didn't work. Seems odd to me that get_ini would show it has having been changed but phpinfo doesn't. Sounds like a bug to me -- They ought to at least agree on what the setting is, even if you weren't allowed to change it... Check the bug reports and file one, I guess: http://bugs.php.net I thought I might try a modification of your virtual hosts suggestion. Perhaps create a virtual host with the same document root as the main virtual host but turn display_errors on globally for the debug vhost using phpflag. First I tried it in a .htaccess file and then in my main apache config file, httpd.conf. Each time resulted in the error: Invalid command 'phpflag', perhaps mis-spelled or defined by a module not included in the server configuration. you misspelled it, there is no phpflag command actually. there is php_flag command and php_value command which you can use in .htaccess files (php_flag for flags which can have On/Off states only, php_value for others) hope that helps Zoltán Németh I'm starting to think that all of the ini override stuff was implemented in a later version of PHP than I'm using. Haven't figured out when it was implemented yet though. Jason === Thanks, that was it. Now I can turn on display_errors in the apache config files or htaccess via php_flag. However, I never did get ini_set to work. Jason === -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] logging erros and user access to logs
Jason Joines-3 wrote: Richard Lynch wrote: On Thu, March 15, 2007 8:25 am, Jason Joines wrote: Richard Lynch wrote: Get the errors OFF the web page (display_errors OFF) and into the ?php error_reporting(E_PARSE); ini_set('display_errors','On'); ini_set('display_startup_errors','On'); include('mypage.php'); ? Then when debugging was done, just delete the debug script. I moved it to a test server and could get it to work but only if display_errors was set to on in the global php.ini file. I can't do that on the production server. The manual says display_errors can be overridden in a script. I used ini_get() to see if the value was actually being changed, it was. However, it still doesn't print the errors unless the global ini is set. Any ideas as to why it's not working? Put ?php phpinfo();? into the mypage.php and see if its Master and Local values are different for display_errors. If they are, then it worked, and you SHOULD see the errors. Well they weren't different so I guess it didn't work. Seems odd to me that get_ini would show it has having been changed but phpinfo doesn't. Jason === -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php phpinfo() only reflects values set in php.ini (globally), http.conf (f.e. per vhost) or .htaccess (per folder and below) and only if phpinfo is called from inside that folder/vhost. ini_set is only in the scope of your script. so you can't test the effects of your ini_set values using phpinfo() at all. you have to test the behaviour of the script or put a corresponding echo ini_get('...') after your ini_set. -- View this message in context: http://www.nabble.com/logging-erros-and-user-access-to-logs-tf3403238.html#a9718409 Sent from the PHP - General mailing list archive at Nabble.com. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] logging erros and user access to logs
On 3/28/07, Juergen Wind [EMAIL PROTECTED] wrote: Jason Joines-3 wrote: Richard Lynch wrote: On Thu, March 15, 2007 8:25 am, Jason Joines wrote: Richard Lynch wrote: Get the errors OFF the web page (display_errors OFF) and into the ?php error_reporting(E_PARSE); ini_set('display_errors','On'); ini_set('display_startup_errors','On'); include('mypage.php'); ? Then when debugging was done, just delete the debug script. I moved it to a test server and could get it to work but only if display_errors was set to on in the global php.ini file. I can't do that on the production server. The manual says display_errors can be overridden in a script. I used ini_get() to see if the value was actually being changed, it was. However, it still doesn't print the errors unless the global ini is set. Any ideas as to why it's not working? Put ?php phpinfo();? into the mypage.php and see if its Master and Local values are different for display_errors. If they are, then it worked, and you SHOULD see the errors. Well they weren't different so I guess it didn't work. Seems odd to me that get_ini would show it has having been changed but phpinfo doesn't. Jason === -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php phpinfo() only reflects values set in php.ini (globally), http.conf (f.e. per vhost) or .htaccess (per folder and below) and only if phpinfo is called from inside that folder/vhost. ini_set is only in the scope of your script. so you can't test the effects of your ini_set values using phpinfo() at all. you have to test the behaviour of the script or put a corresponding echo ini_get('...') after your ini_set. You can simply put the phpinfo() at the end of your script. It will show the ini_set items. If you don't believe me, try this script: ?php ini_set(allow_url_fopen,Off); phpinfo(); ? Under local value it will show you Off, and on master value it will show On (Atleast that's how i configured it :) ) Tijnema -- View this message in context: http://www.nabble.com/logging-erros-and-user-access-to-logs-tf3403238.html#a9718409 Sent from the PHP - General mailing list archive at Nabble.com. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] logging erros and user access to logs
Juergen Wind wrote: phpinfo() only reflects values set in php.ini (globally), http.conf (f.e. per vhost) or .htaccess (per folder and below) and only if phpinfo is called from inside that folder/vhost. ini_set is only in the scope of your script. so you can't test the effects of your ini_set values using phpinfo() at all. you have to test the behaviour of the script or put a corresponding echo ini_get('...') after your ini_set. to make it clear: my comment was meant for a separate file with phpinfo(); in it. but you can put phpinfo inside your script (after ini_set of course) like so: ?php ini_set('display_errors', 'Off'); error_reporting( E_ALL ); ini_set('error_log', 'LocalPhpErr.log'); ini_set('session.save_path', '/bad'); phpinfo(4); // core only session_start(); ? -- View this message in context: http://www.nabble.com/logging-erros-and-user-access-to-logs-tf3403238.html#a9718417 Sent from the PHP - General mailing list archive at Nabble.com. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] logging erros and user access to logs
Tijnema ! wrote: You can simply put the phpinfo() at the end of your script. It will show the ini_set items. If you don't believe me, try this script: ?php ini_set(allow_url_fopen,Off); phpinfo(); ? Under local value it will show you Off, and on master value it will show On (Atleast that's how i configured it :) ) Tijnema that just came into my mind when i hit the submit button ;) but as the OP told us he coulndt see any effect in phpinfo i thought he used phpinfo in a separate file. -- View this message in context: http://www.nabble.com/logging-erros-and-user-access-to-logs-tf3403238.html#a9721912 Sent from the PHP - General mailing list archive at Nabble.com. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] logging erros and user access to logs
2007. 03. 15, csütörtök keltezéssel 16.08-kor Jason Joines ezt írta: Richard Lynch wrote: On Thu, March 15, 2007 2:47 pm, Jason Joines wrote: Richard Lynch wrote: On Thu, March 15, 2007 8:25 am, Jason Joines wrote: Richard Lynch wrote: Get the errors OFF the web page (display_errors OFF) and into the ?php error_reporting(E_PARSE); ini_set('display_errors','On'); ini_set('display_startup_errors','On'); include('mypage.php'); ? Then when debugging was done, just delete the debug script. I moved it to a test server and could get it to work but only if display_errors was set to on in the global php.ini file. I can't do that on the production server. The manual says display_errors can be overridden in a script. I used ini_get() to see if the value was actually being changed, it was. However, it still doesn't print the errors unless the global ini is set. Any ideas as to why it's not working? Put ?php phpinfo();? into the mypage.php and see if its Master and Local values are different for display_errors. If they are, then it worked, and you SHOULD see the errors. Well they weren't different so I guess it didn't work. Seems odd to me that get_ini would show it has having been changed but phpinfo doesn't. Sounds like a bug to me -- They ought to at least agree on what the setting is, even if you weren't allowed to change it... Check the bug reports and file one, I guess: http://bugs.php.net I thought I might try a modification of your virtual hosts suggestion. Perhaps create a virtual host with the same document root as the main virtual host but turn display_errors on globally for the debug vhost using phpflag. First I tried it in a .htaccess file and then in my main apache config file, httpd.conf. Each time resulted in the error: Invalid command 'phpflag', perhaps mis-spelled or defined by a module not included in the server configuration. you misspelled it, there is no phpflag command actually. there is php_flag command and php_value command which you can use in .htaccess files (php_flag for flags which can have On/Off states only, php_value for others) hope that helps Zoltán Németh I'm starting to think that all of the ini override stuff was implemented in a later version of PHP than I'm using. Haven't figured out when it was implemented yet though. Jason === -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] logging erros and user access to logs
On Thu, March 15, 2007 4:08 pm, Jason Joines wrote: Invalid command 'phpflag', perhaps mis-spelled or defined by a module php_flag error_reporting 0 Or, perhaps, these days: php_value error_reporting 0 I forget what the outcome of the php_flag debacle was... but phpflag with no _ in it ain't never gonna work, no matter what version you got. -- Some people have a gift link here. Know what I want? I want you to buy a CD from some starving artist. http://cdbaby.com/browse/from/lynch Yeah, I get a buck. So? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] logging erros and user access to logs
Jason Joines-3 wrote: My users want to be able to debug their scripts, see mysql errors, and such. Using mysql_error(), and display_errors, problems such as non-existent databases, or variable and such seem to get printed to the screen. However, syntax errors do not. They get written to the global php log, for example, PHP Parse error: parse error, unexpected T_ECHO, expecting ',' or ';' when a semi-colon is missing. I can't just give all system users access to the global log. I saw an example at http://www.php.net/manual/en/ref.errorfunc.php#ini.display-errors that seemed to suggest including the script to debug in something like this demodebug.php script would do the trick: ?php error_reporting(E_PARSE); ini_set('display_errors','On'); ini_set('display_startup_errors','On'); include('demo.php'); ? When I remove a semi-colon from demo.php and load demodebug.php in the browser, nothing is displayed on the screen. The error still goes to the global log. I'm running PHP 4.3 on Apache 2. I have these settings in my php.ini: error_reporting = E_ALL ~E_NOTICE display_errors = Off display_startup_errors = Off I thought the above debugdemo.php script was basically supposed to do a local override so that script could display the errors. Is there any good way to let users see all the errors from their scripts. Jason Joines = -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php let your users put #... php_value error_reporting 6143 #E_ALL #php_value error_reporting 6135 # ~E_NOTICE php_flag display_errors On php_flag log_errors On php_value error_log myPhpErr.log # into there .htaccess file or - if you don't want to allow that - # ini_set('error_log', 'myPhpErr.log'); into there scripts -- View this message in context: http://www.nabble.com/logging-erros-and-user-access-to-logs-tf3403238.html#a9524926 Sent from the PHP - General mailing list archive at Nabble.com. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] logging erros and user access to logs
Richard Lynch wrote: Get the errors OFF the web page (display_errors OFF) and into the logs and provide your users with logs for their own domains with vhosts. On Wed, March 14, 2007 11:02 am, Jason Joines wrote: My users want to be able to debug their scripts, see mysql errors, and such. Using mysql_error(), and display_errors, problems such as non-existent databases, or variable and such seem to get printed to the screen. However, syntax errors do not. They get written to the global php log, for example, PHP Parse error: parse error, unexpected T_ECHO, expecting ',' or ';' when a semi-colon is missing. I can't just give all system users access to the global log. I saw an example at http://www.php.net/manual/en/ref.errorfunc.php#ini.display-errors that seemed to suggest including the script to debug in something like this demodebug.php script would do the trick: ?php error_reporting(E_PARSE); ini_set('display_errors','On'); ini_set('display_startup_errors','On'); include('demo.php'); ? When I remove a semi-colon from demo.php and load demodebug.php in the browser, nothing is displayed on the screen. The error still goes to the global log. I'm running PHP 4.3 on Apache 2. I have these settings in my php.ini: error_reporting = E_ALL ~E_NOTICE display_errors = Off display_startup_errors = Off I thought the above debugdemo.php script was basically supposed to do a local override so that script could display the errors. Is there any good way to let users see all the errors from their scripts. Jason Joines = -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php Unfortunately, the separate logs for separate virtual hosts doesn't work for this situation. It is a college web server with about 300 users and 20 departments, each with their own site in the same virtual host and many thousand pages. I need to be able to have users turn on error display while creating/debugging their script and then turn it off. The above solution from php.net would be ideal. The suggestion was to use a script like this, say call it mypagedebug.php, and include the script to be debugged, say mypage.php, like so: ?php error_reporting(E_PARSE); ini_set('display_errors','On'); ini_set('display_startup_errors','On'); include('mypage.php'); ? Then when debugging was done, just delete the debug script. I moved it to a test server and could get it to work but only if display_errors was set to on in the global php.ini file. I can't do that on the production server. The manual says display_errors can be overridden in a script. I used ini_get() to see if the value was actually being changed, it was. However, it still doesn't print the errors unless the global ini is set. Any ideas as to why it's not working? Jason === -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] logging erros and user access to logs
On 3/15/07, Jason Joines [EMAIL PROTECTED] wrote: Richard Lynch wrote: Get the errors OFF the web page (display_errors OFF) and into the logs and provide your users with logs for their own domains with vhosts. On Wed, March 14, 2007 11:02 am, Jason Joines wrote: My users want to be able to debug their scripts, see mysql errors, and such. Using mysql_error(), and display_errors, problems such as non-existent databases, or variable and such seem to get printed to the screen. However, syntax errors do not. They get written to the global php log, for example, PHP Parse error: parse error, unexpected T_ECHO, expecting ',' or ';' when a semi-colon is missing. I can't just give all system users access to the global log. I saw an example at http://www.php.net/manual/en/ref.errorfunc.php#ini.display-errors that seemed to suggest including the script to debug in something like this demodebug.php script would do the trick: ?php error_reporting(E_PARSE); ini_set('display_errors','On'); ini_set('display_startup_errors','On'); include('demo.php'); ? When I remove a semi-colon from demo.php and load demodebug.php in the browser, nothing is displayed on the screen. The error still goes to the global log. I'm running PHP 4.3 on Apache 2. I have these settings in my php.ini: error_reporting = E_ALL ~E_NOTICE display_errors = Off display_startup_errors = Off I thought the above debugdemo.php script was basically supposed to do a local override so that script could display the errors. Is there any good way to let users see all the errors from their scripts. Jason Joines = Might it be that when you include a new file that ini settings are reset? I don't know if it is the problem, just a thought :) Tijnema -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php Unfortunately, the separate logs for separate virtual hosts doesn't work for this situation. It is a college web server with about 300 users and 20 departments, each with their own site in the same virtual host and many thousand pages. I need to be able to have users turn on error display while creating/debugging their script and then turn it off. The above solution from php.net would be ideal. The suggestion was to use a script like this, say call it mypagedebug.php, and include the script to be debugged, say mypage.php, like so: ?php error_reporting(E_PARSE); ini_set('display_errors','On'); ini_set('display_startup_errors','On'); include('mypage.php'); ? Then when debugging was done, just delete the debug script. I moved it to a test server and could get it to work but only if display_errors was set to on in the global php.ini file. I can't do that on the production server. The manual says display_errors can be overridden in a script. I used ini_get() to see if the value was actually being changed, it was. However, it still doesn't print the errors unless the global ini is set. Any ideas as to why it's not working? Jason === -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] logging erros and user access to logs
On Thu, March 15, 2007 8:25 am, Jason Joines wrote: Richard Lynch wrote: Get the errors OFF the web page (display_errors OFF) and into the ?php error_reporting(E_PARSE); ini_set('display_errors','On'); ini_set('display_startup_errors','On'); include('mypage.php'); ? Then when debugging was done, just delete the debug script. I moved it to a test server and could get it to work but only if display_errors was set to on in the global php.ini file. I can't do that on the production server. The manual says display_errors can be overridden in a script. I used ini_get() to see if the value was actually being changed, it was. However, it still doesn't print the errors unless the global ini is set. Any ideas as to why it's not working? Put ?php phpinfo();? into the mypage.php and see if its Master and Local values are different for display_errors. If they are, then it worked, and you SHOULD see the errors. -- Some people have a gift link here. Know what I want? I want you to buy a CD from some starving artist. http://cdbaby.com/browse/from/lynch Yeah, I get a buck. So? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] logging erros and user access to logs
On Thu, 15 Mar 2007, Richard Lynch wrote: Date: Thu, 15 Mar 2007 14:35:45 -0500 (CDT) From: Richard Lynch [EMAIL PROTECTED] To: Jason Joines [EMAIL PROTECTED] Cc: php-general@lists.php.net Subject: Re: [PHP] logging erros and user access to logs On Thu, March 15, 2007 8:25 am, Jason Joines wrote: Richard Lynch wrote: Get the errors OFF the web page (display_errors OFF) and into the ?php error_reporting(E_PARSE); ini_set('display_errors','On'); ini_set('display_startup_errors','On'); include('mypage.php'); ? Then when debugging was done, just delete the debug script. I moved it to a test server and could get it to work but only if display_errors was set to on in the global php.ini file. I can't do that on the production server. The manual says display_errors can be overridden in a script. I used ini_get() to see if the value was actually being changed, it was. However, it still doesn't print the errors unless the global ini is set. Any ideas as to why it's not working? Put ?php phpinfo();? into the mypage.php and see if its Master and Local values are different for display_errors. If they are, then it worked, and you SHOULD see the errors. -- Some people have a gift link here. Know what I want? I want you to buy a CD from some starving artist. http://cdbaby.com/browse/from/lynch Yeah, I get a buck. So? Well they weren't different so I guess it didn't work. Seems odd to me that get_ini would show it has having been changed but phpinfo doesn't. Jason === -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] logging erros and user access to logs
Richard Lynch wrote: On Thu, March 15, 2007 8:25 am, Jason Joines wrote: Richard Lynch wrote: Get the errors OFF the web page (display_errors OFF) and into the ?php error_reporting(E_PARSE); ini_set('display_errors','On'); ini_set('display_startup_errors','On'); include('mypage.php'); ? Then when debugging was done, just delete the debug script. I moved it to a test server and could get it to work but only if display_errors was set to on in the global php.ini file. I can't do that on the production server. The manual says display_errors can be overridden in a script. I used ini_get() to see if the value was actually being changed, it was. However, it still doesn't print the errors unless the global ini is set. Any ideas as to why it's not working? Put ?php phpinfo();? into the mypage.php and see if its Master and Local values are different for display_errors. If they are, then it worked, and you SHOULD see the errors. Well they weren't different so I guess it didn't work. Seems odd to me that get_ini would show it has having been changed but phpinfo doesn't. Jason === -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] logging erros and user access to logs
On Thu, March 15, 2007 2:47 pm, Jason Joines wrote: Richard Lynch wrote: On Thu, March 15, 2007 8:25 am, Jason Joines wrote: Richard Lynch wrote: Get the errors OFF the web page (display_errors OFF) and into the ?php error_reporting(E_PARSE); ini_set('display_errors','On'); ini_set('display_startup_errors','On'); include('mypage.php'); ? Then when debugging was done, just delete the debug script. I moved it to a test server and could get it to work but only if display_errors was set to on in the global php.ini file. I can't do that on the production server. The manual says display_errors can be overridden in a script. I used ini_get() to see if the value was actually being changed, it was. However, it still doesn't print the errors unless the global ini is set. Any ideas as to why it's not working? Put ?php phpinfo();? into the mypage.php and see if its Master and Local values are different for display_errors. If they are, then it worked, and you SHOULD see the errors. Well they weren't different so I guess it didn't work. Seems odd to me that get_ini would show it has having been changed but phpinfo doesn't. Sounds like a bug to me -- They ought to at least agree on what the setting is, even if you weren't allowed to change it... Check the bug reports and file one, I guess: http://bugs.php.net -- Some people have a gift link here. Know what I want? I want you to buy a CD from some starving artist. http://cdbaby.com/browse/from/lynch Yeah, I get a buck. So? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] logging erros and user access to logs
Richard Lynch wrote: On Thu, March 15, 2007 2:47 pm, Jason Joines wrote: Richard Lynch wrote: On Thu, March 15, 2007 8:25 am, Jason Joines wrote: Richard Lynch wrote: Get the errors OFF the web page (display_errors OFF) and into the ?php error_reporting(E_PARSE); ini_set('display_errors','On'); ini_set('display_startup_errors','On'); include('mypage.php'); ? Then when debugging was done, just delete the debug script. I moved it to a test server and could get it to work but only if display_errors was set to on in the global php.ini file. I can't do that on the production server. The manual says display_errors can be overridden in a script. I used ini_get() to see if the value was actually being changed, it was. However, it still doesn't print the errors unless the global ini is set. Any ideas as to why it's not working? Put ?php phpinfo();? into the mypage.php and see if its Master and Local values are different for display_errors. If they are, then it worked, and you SHOULD see the errors. Well they weren't different so I guess it didn't work. Seems odd to me that get_ini would show it has having been changed but phpinfo doesn't. Sounds like a bug to me -- They ought to at least agree on what the setting is, even if you weren't allowed to change it... Check the bug reports and file one, I guess: http://bugs.php.net I thought I might try a modification of your virtual hosts suggestion. Perhaps create a virtual host with the same document root as the main virtual host but turn display_errors on globally for the debug vhost using phpflag. First I tried it in a .htaccess file and then in my main apache config file, httpd.conf. Each time resulted in the error: Invalid command 'phpflag', perhaps mis-spelled or defined by a module not included in the server configuration. I'm starting to think that all of the ini override stuff was implemented in a later version of PHP than I'm using. Haven't figured out when it was implemented yet though. Jason === -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] logging erros and user access to logs
My users want to be able to debug their scripts, see mysql errors, and such. Using mysql_error(), and display_errors, problems such as non-existent databases, or variable and such seem to get printed to the screen. However, syntax errors do not. They get written to the global php log, for example, PHP Parse error: parse error, unexpected T_ECHO, expecting ',' or ';' when a semi-colon is missing. I can't just give all system users access to the global log. I saw an example at http://www.php.net/manual/en/ref.errorfunc.php#ini.display-errors that seemed to suggest including the script to debug in something like this demodebug.php script would do the trick: ?php error_reporting(E_PARSE); ini_set('display_errors','On'); ini_set('display_startup_errors','On'); include('demo.php'); ? When I remove a semi-colon from demo.php and load demodebug.php in the browser, nothing is displayed on the screen. The error still goes to the global log. I'm running PHP 4.3 on Apache 2. I have these settings in my php.ini: error_reporting = E_ALL ~E_NOTICE display_errors = Off display_startup_errors = Off I thought the above debugdemo.php script was basically supposed to do a local override so that script could display the errors. Is there any good way to let users see all the errors from their scripts. Jason Joines = -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] logging erros and user access to logs
Get the errors OFF the web page (display_errors OFF) and into the logs and provide your users with logs for their own domains with vhosts. On Wed, March 14, 2007 11:02 am, Jason Joines wrote: My users want to be able to debug their scripts, see mysql errors, and such. Using mysql_error(), and display_errors, problems such as non-existent databases, or variable and such seem to get printed to the screen. However, syntax errors do not. They get written to the global php log, for example, PHP Parse error: parse error, unexpected T_ECHO, expecting ',' or ';' when a semi-colon is missing. I can't just give all system users access to the global log. I saw an example at http://www.php.net/manual/en/ref.errorfunc.php#ini.display-errors that seemed to suggest including the script to debug in something like this demodebug.php script would do the trick: ?php error_reporting(E_PARSE); ini_set('display_errors','On'); ini_set('display_startup_errors','On'); include('demo.php'); ? When I remove a semi-colon from demo.php and load demodebug.php in the browser, nothing is displayed on the screen. The error still goes to the global log. I'm running PHP 4.3 on Apache 2. I have these settings in my php.ini: error_reporting = E_ALL ~E_NOTICE display_errors = Off display_startup_errors = Off I thought the above debugdemo.php script was basically supposed to do a local override so that script could display the errors. Is there any good way to let users see all the errors from their scripts. Jason Joines = -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- Some people have a gift link here. Know what I want? I want you to buy a CD from some starving artist. http://cdbaby.com/browse/from/lynch Yeah, I get a buck. So? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php