Php Error Blank Screen
Contents |
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings php white page no errors and policies of this site About Us Learn more about Stack php shows blank page Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs apache php blank page no errors Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 6.2 million programmers, just like you, helping each other. Join them;
Blank Php Page Template
it only takes a minute: Sign up PHP's white screen of death up vote 55 down vote favorite 29 Now that I'm starting to get back into PHP, I'm starting to remember why I gave it up in the first place. The most annoying thing on my plate at the moment is what I've come to term "PHP's white screen drupal white screen of death". When PHP gets a fatal error due to syntax or whatever, it seems like it will always die without actually sending anything to the browser. I've added the following to my .htaccess, and it seems to work most of the time, but it doesn't work in these cases. php_value display_errors 1 php_value display_startup_errors 1 php_value error_reporting 2147483647 # E_ALL Am I missing something? At the moment I feel like I need to hit refresh every few lines of code I write, lest I make a mistake and have to search through many pages trying to track down that one little mistake I made... EDIT: For example, given the two lines of code below: $foo = array(':language' => $languageId; $foo = array(':language' => $languageId); The first will exhibit the white screen of death (ie, nothing at all printed to the browser), while the second will execute happily. php error-handling error-reporting wsod share|improve this question edited Dec 10 '12 at 5:23 hakre 134k26216390 asked Sep 25 '09 at 3:36 Matthew Scharley 61.6k39151197 Also see stackoverflow.
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of php error logs this site About Us Learn more about Stack Overflow the company Business
Php Display_errors
Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask
Error_reporting
Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 6.2 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up http://stackoverflow.com/questions/1475297/phps-white-screen-of-death PHP blank white page, no errors up vote 1 down vote favorite 2 I have a PHP page that I developed locally and worked fine. Upon uploading it to a server I now just get a blank white screen? It is the exact same code, works fine locally but doesnt remotely. I have tried setting on error reporting but that still doesn t http://stackoverflow.com/questions/22911552/php-blank-white-page-no-errors give me any errors, just a blank white screen. EDIT ---------- The code: $firstname = $phone = $email = $picture = $sqlcon = ""; $firstnameErr = $phoneErr = $emailErr = $pictureErr = $sqlErr = $filterErr = ""; $statusmsg = ""; $newpicture = $registered = "false"; if ($_SERVER["REQUEST_METHOD"] == "POST") { // If the user has not entered a firstname and has not entered details previously if ((empty($_POST["firstname"])) && empty($_POST["hfirst"])) { $firstnameErr = "Firstname is required for submission"; } else { if (!empty($_POST["firstname"])) { $firstname = $_POST["firstname"]; } else { $firstname = $_POST["hfirst"]; } if (!preg_match("/^[a-zA-Z ]*$/", $firstname)) { $firstnameErr="Please ensure you have entered only characters for your first name"; } } // If the user has not entered a phone number and has not entered details previously if ((empty($_POST["phone"])) && (empty($_POST["hphone"]))) { $phoneErr = "Please ensure you have entered a phone number"; } else { if (!empty($_POST["phone"])) { $phone = $_POST["phone"]; } else { $phone = $_POST["hphone"]; } if (!is_numeric($phone)) { $phoneErr = "Please ensure you have entered a valid phone number"; } } if ((empty($_POST["email"])) && (empty($_POST["hemail"]))) { $emailErr = "Please ensure you have entered you
your are presented with a blank white page, aka ‘white screen of death'. It does not even show any error message. http://thecancerus.com/the-white-screen-of-death/ We end up thinking what happened, we refresh the webpage but usually nothing changes. Why this happens? This happens because your host has switched off error reporting(for good reasons). So whenever their is a fatal error in your PHP script, and you have error reporting turned off you are presented with white screen of death. So how to remedy it? Their php error are two ways to get out of this situation, Changes in php.ini file If you can have access to php.ini file then change the display error property to On. display_errors = On Also make sure that error reporting property is at least set to error_reporting = E_ALL & ~E_NOTICE & ~E_STRICT Changes in the file In case where you don't have page no errors access to php.ini file, you can set these property in PHP script itself. Simply add following at the very start of your PHP script error_reporting(E_ALL); ini_set('display_errors',TRUE); If you are using some, open source package like Drupal, Joomla or WordPress then put these codes in the index.php file in the root directory, right at top. It is also possible that even though you see a blank page, but when you view the source you see the whole html code. This happens when you might miss proper closing an html tag, like script,