cooldude832 Posted November 24, 2007 Share Posted November 24, 2007 A friend of mine (seriously not me) has a server that they can't get to the php.ini to add error reporting (display errors is off) how can i get a temp solution on a page-page basis of error reporting??? Quote Link to comment Share on other sites More sharing options...
trq Posted November 24, 2007 Share Posted November 24, 2007 <?php error_reporting(E_ALL) ; ini_set('display_errors','1'); ?> Quote Link to comment Share on other sites More sharing options...
revraz Posted November 24, 2007 Share Posted November 24, 2007 If he puts a php.ini file in his webroot, it will use that instead of the webhost one. Quote Link to comment Share on other sites More sharing options...
cooldude832 Posted November 24, 2007 Author Share Posted November 24, 2007 I tried that revraz with what I wanted similar to a .htaccess mod no good. Quote Link to comment Share on other sites More sharing options...
cooldude832 Posted November 24, 2007 Author Share Posted November 24, 2007 <?php error_reporting(E_ALL) ; ini_set('display_errors','1'); ?> I did that right on the top of my page (pre any thing else) and it still loads a blank page on an error Quote Link to comment Share on other sites More sharing options...
trq Posted November 24, 2007 Share Posted November 24, 2007 If he puts a php.ini file in his webroot, it will use that instead of the webhost one. That only works when php has been setup cgi, not as an apache module. <?php error_reporting(E_ALL) ; ini_set('display_errors','1'); ?> I did that right on the top of my page (pre any thing else) and it still loads a blank page on an error There really is nothing more you can do. A note from the manual... Note: Although display_errors may be set at runtime (with ini_set()), it won't have any affect if the script has fatal errors. This is because the desired runtime action does not get executed. Quote Link to comment Share on other sites More sharing options...
cooldude832 Posted November 24, 2007 Author Share Posted November 24, 2007 I know where its dying on, but of course I can't get the sql error back cause its being stupid, he actualyl got ahold of the site admin and they are trying to help. Quote Link to comment Share on other sites More sharing options...
trq Posted November 24, 2007 Share Posted November 24, 2007 I know where its dying on, but of course I can't get the sql error back cause its being stupid PHP doesn't think, therefor cannot be 'stupid'. Post your code. l got ahold of the site admin and they are trying to help The server admin shouldn't turn on display_errors as it will open the entire server up to problems. display_errors should be disabled on production servers, hence, you should test on another server where you have the ability to turn on error_reporting and display_errors without effecting others. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.