Advertisement
Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/.
If we do not hit our goal we will be forced to close the site.

Current status: https://keepboardsalive.com/

Annual subs are best for most impact. If you are still undecided on going Ad Free - you can also donate using the Paypal Donate option. All contribution helps. Thank you.
https://www.boards.ie/group/1878-subscribers-forum

Private Group for paid up members of Boards.ie. Join the club.
Hi all, please see this major site announcement: https://www.boards.ie/discussion/2058427594/boards-ie-2026

php error not showing

  • 28-01-2007 06:58PM
    #1
    Registered Users, Registered Users 2 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, Registered Users 2 Posts: 5,333 ✭✭✭Cake Fiend


    die();

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


  • Registered Users, Registered Users 2 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, Registered Users 2 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, Registered Users 2 Posts: 6,683 ✭✭✭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