Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

php error not showing

Options
  • 28-01-2007 7:58pm
    #1
    Registered Users Posts: 4,475 ✭✭✭


    A client noticed that one of my php scripts wasn't working correctly, but didn't seem to be returning any error. I finally recreated the issue and after looking at the html source, discovered that although php was returning an error, it was within a html tag, in this case, <img error was here src="....">.

    Is there anything I can do (in php.ini or within my script) that would say cause php to die upon coming across an error. In this case, the error was an undefined variable. I always add error trapping and stuff for db errors, etc, ones that I can trap with ease, but an undefined variable inside an IMG tag? I'm beaten.


Comments

  • Registered Users Posts: 5,335 ✭✭✭Cake Fiend


    die();

    What was the error? Did it give you a hint as to what was causing it?


  • Registered Users Posts: 9,579 ✭✭✭Webmonkey


    I dont know it off top of my head but you can set the level of sensitivity(?) for errors, so that you will be notified or script ended.
    Doing proper error checking and using die() as above should stop most errors.


  • Registered Users Posts: 4,475 ✭✭✭corblimey


    Webmonkey, that's what I thought too, but I can't remember the command for it. I thought there was something sort of ERRORLEVEL setting you could put into the ini file or even directly into your php script, but a quick search online revealed nothing (presumably down to my search paramters)


  • Registered Users Posts: 6,509 ✭✭✭daymobrew


    corblimey wrote:
    Webmonkey, that's what I thought too, but I can't remember the command for it. I thought there was something sort of ERRORLEVEL setting you could put into the ini file or even directly into your php script, but a quick search online revealed nothing (presumably down to my search paramters)
    error_reporting( E_ALL )


Advertisement