Valhalla Legends Archive

Programming => Web Development => Topic started by: Arthas on June 11, 2004, 03:10 PM

Title: [PHP] Error with headers(yay).
Post by: Arthas on June 11, 2004, 03:10 PM
Here is the URL: http://www.SonsOfAzeroth.org/forums

Does anyone know what the crap is going wrong?

Also, the working version of this site is located here:

http://eclipse.servershost.net/~slybone/

I am trying to copy the entire forums from one account to another...
Title: Re:[PHP] Error with headers(yay).
Post by: Tuberload on June 11, 2004, 03:24 PM
You have to send header information before you send the rest of the data or you will get the error you are getting.

For example, let's say somewhere you are trying to echo something to the browser, and then you try and send some header information.
Title: Re:[PHP] Error with headers(yay).
Post by: j0k3r on June 11, 2004, 04:17 PM
Quote from: Tuberload on June 11, 2004, 03:24 PM
You have to send header information before you send the rest of the data or you will get the error you are getting.

For example, let's say somewhere you are trying to echo something to the browser, and then you try and send some header information.

To be a bit more clear (I got confused while reading that, but he's right), at the VERY top of your script you have to send the header information, before everything else (including <html> tag, I think).
Title: Re:[PHP] Error with headers(yay).
Post by: Arthas on June 12, 2004, 02:16 AM
Yes, but this is vbulletin. It works PERFECTLY on one server, and fucks up on the other, wtf?
Title: Re:[PHP] Error with headers(yay).
Post by: Arthas on June 12, 2004, 03:53 AM
Nevermind... Seems having multiple lines after ?> fucks up your script.
Title: Re:[PHP] Error with headers(yay).
Post by: Adron on June 12, 2004, 04:18 AM
Quote from: Arthas on June 12, 2004, 02:16 AM
Yes, but this is vbulletin. It works PERFECTLY on one server, and fucks up on the other, wtf?

One possibility is that there's a global setting on the working site that says to buffer all output.