PHP, White Space and header() {SOLVED}

Having problems with DHTML Menu? There is usually somebody here who knows the answer.
Post Reply
markwickens
Beginner
Beginner
Posts: 6
Joined: Wed Nov 15, 2006 9:08 am

PHP, White Space and header() {SOLVED}

Post by markwickens »

Has anyone encountered a problem using this menu system with php scripts??

My dev machine has had no php related probelms, but I have just uploaded to a test server and I'm having problems with a php header() call encountering white space in the milonic_src.js file (at least, that's what is reported).

I have edited out the line breaks and any extra spaces at the end of the lines - from all .js files - still to no avail.... although the dev machine is still quite happy with the result

:?
markwickens
Beginner
Beginner
Posts: 6
Joined: Wed Nov 15, 2006 9:08 am

Sorted

Post by markwickens »

This is becoming habitual; despite hours of checking and testing, I post a problem - only to go away and fix it for myself! Perhaps I shoud wait another one or two beers worth before posting next time.

In the end, it turned out that a reference to an external CSS file causing the header() error. Whilst the server was correctly reporting the error in the sense that it was reporting the header had already been sent, it was misleading me twowards the menu .js files as being the culprit - which they weren't.

There still remains the mysterry as to why my dev machine didn't barf at the CSS reference though......perhaps some things are best left unexplained.


Regards
User avatar
Andy
Milonic
Milonic
Posts: 3308
Joined: Sun May 19, 2002 8:23 pm
Location: Menu Developer
Contact:

Post by Andy »

There still remains the mysterry as to why my dev machine didn't barf at the CSS reference though......perhaps some things are best left unexplained.
There are many many server settings for PHP and if the dev server is not an exact match to the remote server it can cause confusion.

You might find that the dev server is reporting more errors than the remote server - have a look at the property error_reporting in your php.ini file - see if the value is the same or not.

Cheers,
Andy
Post Reply