getmizanur Posted December 1, 2010 Share Posted December 1, 2010 elloo, i have php script that works fine on a dev server however on staging server it is a blank page. i have set 'error_reporting(E_ALL) ' and ini_set('dsiplay_errors', 1) however only information i get is some notices and no fatal errors. i'm aware that php stops executing if there is a fatal error (and appears as blank screen), is there some sort of directive in 'php.ini' which stop php from executing when there are notices. thanks in advanced Quote Link to comment https://forums.phpfreaks.com/topic/220391-php-blank-page/ Share on other sites More sharing options...
DavidAM Posted December 1, 2010 Share Posted December 1, 2010 Notices CAN stop a page from working. If a notice occurs before a header() or session_start() or set_cookie() or other function that wants to send a header to the browser, then that function call will fail. Of course you should get a notice or warning (I don't know which). So, look for a message about headers already sent. If you post your code and error messages, we may be able spot some potential problems, but my crystal ball is a bit foggy today. Quote Link to comment https://forums.phpfreaks.com/topic/220391-php-blank-page/#findComment-1141979 Share on other sites More sharing options...
requinix Posted December 1, 2010 Share Posted December 1, 2010 Even if you spelled "display_errors" correctly in your code, ini_set() in a file won't affect PHP if there are parse errors. Which are 99% of the time the causes of blank screens. You have to change error_reporting and display_errors in your php.ini to be able to see typical parse errors. Quote Link to comment https://forums.phpfreaks.com/topic/220391-php-blank-page/#findComment-1141980 Share on other sites More sharing options...
getmizanur Posted December 1, 2010 Author Share Posted December 1, 2010 i realised that you cam check for syntax error by execute php script on the command line. in this case, i forgot to install php5_mysql package, d'oh. Quote Link to comment https://forums.phpfreaks.com/topic/220391-php-blank-page/#findComment-1142016 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.