# Solved: Apache/PHP error reporting



## andythepandy (Jul 2, 2006)

Hi,
I have a basic setup with apache and php running on my computer. When I use my other computer with the same setup, the errors that are thrown by php are formatted with line breaks between each error. However on this computer, all the errors appear in one constant line without line breaks making it actually very hard to read.

Any ideas on how to right this?

Thanks,
Andy


----------



## tomdkat (May 6, 2006)

Are both computers running the same operating system and version of PHP? Are these errors appearing in the browser or in an Apache log?

Peace...


----------



## andythepandy (Jul 2, 2006)

Same version of php, however the one with the formatted errors is xp and the other is windows 7

Thanks


----------



## tomdkat (May 6, 2006)

Ok, then I would start there. I would see if there is a PHP/W7 "thing" causing the errors to be displayed without line breaks.

These errors are displaying in your browser window, correct? Which version of PHP are you running?

Peace...


----------



## andythepandy (Jul 2, 2006)

I have just installed a apache/php package on my usb memory stick, plugged it into the win7 machine and run a script with errors - they showed up just fine! It must be something in my configuration files on the pc but I don't know where to look/what to look for

Thanks


----------



## tomdkat (May 6, 2006)

tomdkat said:


> Are these errors appearing in the browser or in an Apache log?





tomdkat said:


> These errors are displaying in your browser window, correct? Which version of PHP are you running?


Peace...


----------



## andythepandy (Jul 2, 2006)

The errors are showing in the browser window but not in the apache error.log.
PHP version is 5.3.2


----------



## tomdkat (May 6, 2006)

Cool. How are you displaying the PHP errors you get? Or are these error messages being generated by Zend, itself?

Peace...


----------



## andythepandy (Jul 2, 2006)

Sorry, I don't quite get what you mean. I'm not using Zend, I'm using EasyPHP.


----------



## tomdkat (May 6, 2006)

Zend is the name of the "PHP engine". So, I'm asking if the errors that are malformed are being generated by the PHP engine itself (like syntax error messages in PHP files) or are they being generated by PHP code you wrote to print messages returned by functions while debugging a script.

What kinds of errors are you getting? Database related errors? Syntax errors in scripts?

Peace...


----------



## andythepandy (Jul 2, 2006)

Oh right sorry. They are being made by the php engine. The errors are just syntax errors that came up when I was making a script.

Thanks


----------



## tomdkat (May 6, 2006)

Well, this seems to be a pretty obscure issue. 

The ONLY thing I can think of is HTML error reporting might be enabled in one PHP configuration and not the other.

According to this list, the HTML error reporting directive (html_errors) defaults to "True".

See if you can determine if the error pages you're getting are HTML or not. When PHP generates the syntax error, look at the source of the page you get and see if it has HTML tags or not. Do that on the machine that displays fine and the one that doesn't.

Outside of this setting, I have NO clue as to the difference in behavior. 

Peace...


----------



## andythepandy (Jul 2, 2006)

haha! brilliant, mine was set to off. I set it to on and it works perfectly!

Thanks very much,
Andy


----------



## tomdkat (May 6, 2006)

You have GOT to be JOKING!!!!! Are you SERIOUS?????? Wow, that's just nuts!!!

Thanks for the update. I'm literally floored that was it since I had absolutely NO CLUE if that directive would be related at all. Talk about getting lucky!  LOL

Peace...


----------



## andythepandy (Jul 2, 2006)

Yep, it's working absolutely fine now, each error under the last like it should be! Good suggestion!


----------

