Our Php pages on a new server that we have moved on are producing NO Erroe messages!Worse still even if I add a, for debugging:echo 'Hello World 0<p>';it does not even print that out.That is the page loads with completely nothing in it. But a digit 1 on the upper left corner!How do we tell the Php on this news server to output error messages?

Yes, I did that.So what are we looking for?What should we be changing to display Error messages to the browser as they occur?

ThanX,

WorldNews
—
2013-02-08T15:57:12Z —
#5

Hi,

I also added the code:

ini_set('display_errors',1); error_reporting(E_ALL);

just to see. But the Php page still comes back totally Blank!

Really amazing how strange stuff can pop up on a new server!

WorldNews
—
2013-02-08T16:04:48Z —
#6

2ndmouse,

Just to let you know I did a test but just removing a ; from a line of a Php page and the whole pageis displayed blank without any Error messages. So the problem is for sure with the Php.ini of the new server that results in it displaying no Php Errormessages but displays a blank page.

Even if you add this code:

ini_set('display_errors',1); error_reporting(E_ALL)

it still prints no Php Error messages! Which is death when it comes to Php programming

So do you all know which Php.ini setting we need to change to enable Php error messages to be displayed?

ThanX.

John_Betong
—
2013-02-08T16:05:37Z —
#7

Can you copy and paste your script inside and supply a link to the offending page.

WorldNews
—
2013-02-08T16:30:59Z —
#8

It is any page that has any error in it, shows up totally blank.That is as I said I took a Php page that is working fine, and just removed a ; from one of the lines, and thenit shows up as Blank too.

WorldNews
—
2013-02-08T21:07:39Z —
#9

2ndmouse,

So you have any ideas as to what we need to do to enable Php Error reporting on our new sever?

Again, a Php page with any error, will display as a totally Blank page rather than reporting the Error in that page.And I mean any Error, as simple as leaving off a ; or whatever results in a totally Blank page being returned by the server.

Create a file, upload it and run it - if PHP is active, it will display current config

SpacePhoenix
—
2013-02-08T21:32:01Z —
#10

Did you remember to restart the server after making the changes to phi.ini ?

John_Betong
—
2013-02-08T23:16:52Z —
#11

I have had this error with CodeIgniter and had to use echo LINE; die; to trace the flow and chase the errors.

Check the php_error log file, it should have lots of entries

SpacePhoenix
—
2013-02-09T00:15:27Z —
#12

What version of PHP are you using (what is reported by each "level" of error reporting varies a bit between versions of php

WorldNews
—
2013-02-09T04:13:40Z —
#13

SpacePhoenix,

Yes, I did re-start Apache after the change to the Php.ini file.

SpacePhoenix said:

Did you remember to restart the server after making the changes to phi.ini ?

WorldNews
—
2013-02-09T04:17:18Z —
#14

And it is PHP Version 5.3.3

But again it is NOT reporting any Error at all.Even the simplest Errors are causing a Blank page to be returned!!!So there is something strange (wrong) somewhere that is causing on this NEW server all of a sudden Php pages to come back Blank when any error occurs!

So what to do?

John_Betong
—
2013-02-09T04:42:27Z —
#15

WorldNews said:

And it is PHP Version 5.3.3

But again it is NOT reporting any Error at all.Even the simplest Errors are causing a Blank page to be returned!!!So there is something strange (wrong) somewhere that is causing on this NEW server all of a sudden Php pages to come back Blank when any error occurs!

So what to do?

Try inserting this on the page that you are calling:

<?php
echo "Hello World"; die;

If that works then I think you have a syntax error on the page and you will have to step through until you find the syntax error.

Best to do it by moving the die; halfway down the page:

if does not work work then move the die; halfway up

if does work work then move the die; halfway down again

repeat until you find the syntax error

SpacePhoenix
—
2013-02-09T04:47:39Z —
#16

WorldNews said:

ini_set('display_errors',1); error_reporting(E_ALL)

Try swapping around the order of them two lines

WorldNews
—
2013-02-10T05:47:10Z —
#17

SpacePhoenix, I swapped the 2 lines, that is now have at the top of the Page:

error_reporting(E_ALL);ini_set('display_errors',1);

And still nothing. That is again page comes back totally blank!Amazing You would thing something this basic and essential that is error reporting on a Php page would not take4 days to enable

SpacePhoenix said:

Try swapping around the order of them two lines

SpacePhoenix
—
2013-02-10T06:36:03Z —
#18

As it stands what are the current values for the following when you view the output of phpinfo()

Just wanted to let you know that I finally resolved this.The problem was due toerror_reportingappearing TWICE in Php.ini file.So the 2nd instance value was over riding the 1st instance which I had updated!

[QUOTE=SpacePhoenix;5317276]As it stands what are the current values for the following when you view the output of phpinfo()* display_errors* error_reporting