How do you force error messages, if a page is blank?

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
simonmlewis
DevNet Master
Posts: 4435
Joined: Wed Oct 08, 2008 3:39 pm
Location: United Kingdom
Contact:

How do you force error messages, if a page is blank?

Post by simonmlewis »

We are trying a new host, but when we use /index.php, which should produce something, it comes up blank.

when we view it on the current live site, it works. When I view it locally, it works. On their, we get a white page with no errors. Even the error log is clear.

It's on cPanel. I best not mentioning the host's name, unless asked.

Have you come across this before?

Code: Select all

<?php
 session_start();
include "dbconn.php"; 
echo "test";
?>
when I put in the session code, that is what kills it.
Love PHP. Love CSS. Love learning new tricks too.
All the best from the United Kingdom.
User avatar
Celauran
Moderator
Posts: 6427
Joined: Tue Nov 09, 2010 2:39 pm
Location: Montreal, Canada

Re: How do you force error messages, if a page is blank?

Post by Celauran »

Try adding this

Code: Select all

ini_set('display_errors', '1');
error_reporting(-1);
Post Reply