PDA

View Full Version : PHP Driving me INSANE!



duncanhall
March 30th, 2007, 07:38 AM
Ok, this seems absolutely ridiculous to me, and I'm ready to scream and start smashing things.

Basically, the PHP side of something I've been working on for a few months suddenly stopped working yesterday. As far as I'm aware I'd made no changes that would affect it, and upon inspection could not see anything wrong.

My problem is - and I'm guessing the two are tied together, not only has it stopped working, but I absolutely cannot get PHP to output any errors whatsoever, meaning I can't fix the bloody problem. I've tried typing the most hideously malformed and erroneous procedures I can imagine, yet PHP simply refuses to tell me anything. I tried turning on all error reporting, but get nothing. I'm temtped to smash my monitor into the wall.

Can anybody help??

The following simply returns a completely blank page:



<?php
error_reporting(E_ALL);
require_once("kllkdgj'kdfjg'j'dsjfg'#sdfljg'd;flgk.php");
?>


Even though that file obviosuly does not exist. What is going on?

Jeff Wheeler
March 30th, 2007, 08:03 AM
I’ve had the same problem. For me, PHP was sending all errors to the log; it was reporting everything, just not visibly. On a production server, that is how it always ought to be.

So, check your PHP error logs. (Your host might have changed this, or something.)

duncanhall
March 30th, 2007, 08:16 AM
Thanks for the reply, this really is winding me up. I have remote access to the server and I've been nosing around in the PHP.ini file. It seems that "display_errors" is set to Off, and "log_errors" is set to On. On first inspection therefore, you might think you were exactly right! However, I've tried changing "display_errors" to On and it made absolutely no difference. Is there a defualt place for the PHP error logs to be stored, I can't seem to find them?

Jeff Wheeler
March 30th, 2007, 05:59 PM
The config file should specify the location of the logs. Did you restart the server after updating the configuration?