Jump to content

Archived

This topic is now archived and is closed to further replies.

scott532

No Error Reporting

Recommended Posts

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

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
[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.

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
I'm a linux newb too, but I think you need to run [b]sudo chmod g+w /usr/local/...php.ini[/b].

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.