joraff Posted November 20, 2008 Share Posted November 20, 2008 IIS 6, Windows Server 2003, PHP 5.2.6 If a script raises a PHP Warning or PHP Notice, then the error message is displayed but the php output and HTML is not rendered. If i disable error reporting locally via ini_set() or error_reporting(), then the page displays just fine. I couldn't find any initiatives that would specifically address this, nor did google do much help - mainly because I don't know what I'm searching for. Does anyone know whats going on? Quote Link to comment https://forums.phpfreaks.com/topic/133566-php-pages-not-displaying-if-a-warning-or-notice-is-brought-up/ Share on other sites More sharing options...
mpiekarski Posted January 29, 2009 Share Posted January 29, 2009 Hello, Locate your php.ini (easiest way would be to create a .php file with the following contents and then visit it in a browser: <?php phpinfo(); ?> Then, locate that php.ini file and set the following directives (if they are not set): error_reporting = E_ALL & ~E_NOTICE This should clear up your problems. That will hide all of your notices and coding warnings. Keep in mind that it is not suggested to display default errors on production websites. Instead, it is suggested to simply log them. Please try visiting the following URL to gather more information on php.ini and all of the features and directives that are able to be modified / customized. http://us.php.net/manual/en/ini.list.php. Please keep in mind: Before you modify your php.ini file, ALWAYS MAKE A BACKUP. Also, within IIS, whenever you change php.ini, if you want the changes to take effect then you have to restart iis. The easiest way to perform that operation is to go to: 1. Start 2. Click Run 3. (Without the quotes) Type "iisreset" 4. Click OK 5. A black box will pop up reporting that it is stopping and starting a few services. Once IIS is back up and running, the box will close again on its own. Quote Link to comment https://forums.phpfreaks.com/topic/133566-php-pages-not-displaying-if-a-warning-or-notice-is-brought-up/#findComment-749475 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.