On another (much less reputable than Frihost, of course
) hosting service, PHP errors result in a blank page even if error_reporting() is used. Is there any way to force a better behaviour?
Forcing PHP error reporting
If it doesn't obey php_ini, will .htaccess work?
Simplyw00x, I had the exact problem as you. I used:
In my config.php, and it worked for me. So... if you have a page that includes on main file then you can use error_reporting(1); and it displays.
HTH.
| Code: |
| error_reporting(1); |
In my config.php, and it worked for me. So... if you have a page that includes on main file then you can use error_reporting(1); and it displays.
HTH.
Hmm that doesn't seem to be working. Any other thoughts?
dude I guess it's time 2 contact the frihost support....
| Quote: |
| dude I guess it's time 2 contact the frihost support.... |
Dude I guess it's time to read the OP
Edit: Next time read the question properly!
OK, I would only recommend this if you know what you're doing because it could lead to all sorts of errors not being trapped properly but if you look here:
http://uk.php.net/errorfunc
In one of the posts at the bottom there is an example of how to set up your own error handling function. You could make one which served your own "An error has occurred" page (or whatever) then to keep the error information, log to a file.
If you're feeling particularly fanciful you could even get it to email you or something.
OK, I would only recommend this if you know what you're doing because it could lead to all sorts of errors not being trapped properly but if you look here:
http://uk.php.net/errorfunc
In one of the posts at the bottom there is an example of how to set up your own error handling function. You could make one which served your own "An error has occurred" page (or whatever) then to keep the error information, log to a file.
If you're feeling particularly fanciful you could even get it to email you or something.
