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
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

php error not showing

  • 28-01-2007 6: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,335 ✭✭✭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,570 ✭✭✭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