scott532 Posted August 28, 2006 Share Posted August 28, 2006 Hi, I'm using php on my localhost. When I deliberately try to make an error connecting to my MySQL DB, all I get is a white page, no errors. How can I change the error reporting to be on (using Mac OS X)?Thanks,Scott Quote Link to comment https://forums.phpfreaks.com/topic/18930-no-error-reporting/ Share on other sites More sharing options...
Orio Posted August 28, 2006 Share Posted August 28, 2006 Look into [url=http://www.php.net/manual/en/function.error-reporting.php]error_reporting()[/url]I'd recommend you to use error_reporting(E_ALL) while debugging.Orio. Quote Link to comment https://forums.phpfreaks.com/topic/18930-no-error-reporting/#findComment-81781 Share on other sites More sharing options...
wildteen88 Posted August 29, 2006 Share Posted August 29, 2006 You also want to make sure the display_errors directive is turned on too in order to get the errors to be displayed to the browser. To turn this setting on you need to edit the php.ini. Quote Link to comment https://forums.phpfreaks.com/topic/18930-no-error-reporting/#findComment-82066 Share on other sites More sharing options...
Jenk Posted August 29, 2006 Share Posted August 29, 2006 [quote author=wildteen88 link=topic=105974.msg423838#msg423838 date=1156841597]You also want to make sure the display_errors directive is turned on too in order to get the errors to be displayed to the browser. To turn this setting on you need to edit the php.ini.[/quote]for all errors other than parse errors, you can use runtime change. Quote Link to comment https://forums.phpfreaks.com/topic/18930-no-error-reporting/#findComment-82132 Share on other sites More sharing options...
scott532 Posted August 29, 2006 Author Share Posted August 29, 2006 Hi, i'm a definate unix no0b so be easy on me ::). Here's my problem. I'm in php.ini and it is read only. I can see [b]display_errors = Off[/b]. I need to turn it to on, but it won't let me write to this file. I also went back and used the following command: [b]chmod g+w /usr/local/...php.ini[/b] and it responded saying [b]operation not permitted[/b]. Why is it not permitted? Thanks,-Scott Quote Link to comment https://forums.phpfreaks.com/topic/18930-no-error-reporting/#findComment-82331 Share on other sites More sharing options...
wildteen88 Posted August 29, 2006 Share Posted August 29, 2006 I'm a linux newb too, but I think you need to run [b]sudo chmod g+w /usr/local/...php.ini[/b]. Quote Link to comment https://forums.phpfreaks.com/topic/18930-no-error-reporting/#findComment-82332 Share on other sites More sharing options...
scott532 Posted August 30, 2006 Author Share Posted August 30, 2006 Hey wildteen... thanks for the sudo command it helped. what i ended up doing was this: [b]sudo chmod a=rwx /usr/local/...php.ini[/b] in order to write to the file. Then i restarted my comp before I noticed any error messaging showing up on the pages. Quote Link to comment https://forums.phpfreaks.com/topic/18930-no-error-reporting/#findComment-82682 Share on other sites More sharing options...
wildteen88 Posted August 30, 2006 Share Posted August 30, 2006 If you use Apache you just need to restart Apache and not your computer for any new chnages from the server configuration files (httpd.conf or php.ini) to take affect Quote Link to comment https://forums.phpfreaks.com/topic/18930-no-error-reporting/#findComment-82746 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.