Milonic provide full featured pull down web menus for some of the worlds largest companies
click here to see what it can do for you

Download Milonic DHTML Menu
Buy Milonic DHTML Menu

Back To Start Of Archive
Taken From The Forum: Help & Support for DHTML Menu Version 5+
Forum Topic: Click to view post
Last Updated: Saturday July 14 2012 - 06:07:48

PHP, White Space and header() {SOLVED}


Poster: markwickens
Dated: Friday November 24 2006 - 23:21:54 GMT

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

:?

Sorted


Poster: markwickens
Dated: Saturday November 25 2006 - 9:56:48 GMT

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


Poster: Andy
Dated: Sunday December 3 2006 - 11:55:51 GMT

Quote:
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