FRIHOSTFORUMSFAQTOSBLOGSDIRECTORY
You are invited to Log in or Register a Frihost Account!

Forcing PHP error reporting

 


simplyw00x
On another (much less reputable than Frihost, of course Rolling Eyes) hosting service, PHP errors result in a blank page even if error_reporting() is used. Is there any way to force a better behaviour?
mathiaus
Maybe using .htaccess?
simplyw00x
If it doesn't obey php_ini, will .htaccess work?
Diablosblizz
Simplyw00x, I had the exact problem as you. I used:

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.
simplyw00x
Hmm that doesn't seem to be working. Any other thoughts?
manav
dude I guess it's time 2 contact the frihost support....
simplyw00x
Quote:
dude I guess it's time 2 contact the frihost support....

Dude I guess it's time to read the OP Smile
AftershockVibe
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.
Reply to topic    Frihost Forum Index -> Scripting -> Php and MySQL

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2007 Frihost, forums powered by phpBB.