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??? Link to comment https://forums.phpfreaks.com/topic/78635-truning-on-error-reporting/ 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'); ?> Link to comment https://forums.phpfreaks.com/topic/78635-truning-on-error-reporting/#findComment-397901 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. Link to comment https://forums.phpfreaks.com/topic/78635-truning-on-error-reporting/#findComment-397902 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. Link to comment https://forums.phpfreaks.com/topic/78635-truning-on-error-reporting/#findComment-397903 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 Link to comment https://forums.phpfreaks.com/topic/78635-truning-on-error-reporting/#findComment-397905 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. Link to comment https://forums.phpfreaks.com/topic/78635-truning-on-error-reporting/#findComment-397908 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. Link to comment https://forums.phpfreaks.com/topic/78635-truning-on-error-reporting/#findComment-397910 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. Link to comment https://forums.phpfreaks.com/topic/78635-truning-on-error-reporting/#findComment-397912 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.