Jump to content


Photo

No Error Reporting


  • Please log in to reply
7 replies to this topic

#1 scott532

scott532
  • Members
  • PipPip
  • Member
  • 14 posts
  • LocationSanta Barbara, CA. (USA)

Posted 28 August 2006 - 06:59 PM

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

#2 Orio

Orio
  • Staff Alumni
  • Advanced Member
  • 2,491 posts

Posted 28 August 2006 - 07:32 PM

Look into error_reporting()
I'd recommend you to use error_reporting(E_ALL) while debugging.

Orio.
Think you're smarty?

(Gone until 20 to November)

#3 wildteen88

wildteen88
  • Staff Alumni
  • Advanced Member
  • 10,482 posts
  • LocationUK, Bournemouth

Posted 29 August 2006 - 08:53 AM

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.

#4 Jenk

Jenk
  • Members
  • PipPipPip
  • Advanced Member
  • 778 posts

Posted 29 August 2006 - 12:17 PM

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.

for all errors other than parse errors, you can use runtime change.

#5 scott532

scott532
  • Members
  • PipPip
  • Member
  • 14 posts
  • LocationSanta Barbara, CA. (USA)

Posted 29 August 2006 - 05:20 PM

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 display_errors = Off. 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: chmod g+w /usr/local/...php.ini and it responded saying  operation not permitted. Why is it not permitted?
Thanks,
-Scott

#6 wildteen88

wildteen88
  • Staff Alumni
  • Advanced Member
  • 10,482 posts
  • LocationUK, Bournemouth

Posted 29 August 2006 - 05:23 PM

I'm a linux newb too, but I think you need to run sudo chmod g+w /usr/local/...php.ini.

#7 scott532

scott532
  • Members
  • PipPip
  • Member
  • 14 posts
  • LocationSanta Barbara, CA. (USA)

Posted 30 August 2006 - 09:13 AM

Hey wildteen... thanks for the sudo command it helped. what i ended up doing was this: sudo chmod a=rwx /usr/local/...php.ini in order to write to the file. Then i restarted my comp before I noticed any error messaging showing up on the pages.

#8 wildteen88

wildteen88
  • Staff Alumni
  • Advanced Member
  • 10,482 posts
  • LocationUK, Bournemouth

Posted 30 August 2006 - 12:32 PM

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




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users