| |||||||
| Programming PHP, Perl, Ruby on Rails, AJAX, HTML, XHTML, CSS, JavaScript, MySQL and any other coding topics. |
![]() |
| | LinkBack | Thread Tools |
| | #1 (permalink) |
| NamePros Member | Whats this error about I have got this error and I dont have a glue what its about could any one shade any light on this. ------------ Warning: Cannot add header information - headers already sent by (output started at /usr/local/psa/home/vhosts/paulicon.co.uk/httpdocs/functions.php:66) in /usr/local/psa/home/vhosts/paulicon.co.uk/httpdocs/delete.php on line 22 ------------- Thanx in advance.
__________________ Paulicon Web design - Your one stop shop |
| |
| | #3 (permalink) |
| Senior Member | It basically means that your script has already sent some Headers to the browser meaning something like white space, or html or some other headers, and then attempting to do it again, but it can't because the headers have already been sent or something like that. ![]() Some possible things that could cause it is white space before your opening delimiter and all the possiblilites with what was mentioned above ![]() Example, these wouldn't work: PHP Code: PHP Code: |
| |
| | #5 (permalink) | |
| NamePros Regular | Quote:
__________________ --Alpha | |
| |
| | #6 (permalink) | |
| Senior Member | Quote:
| |
| |
| | #7 (permalink) |
| NamePros Member | Thanx i have sloved the problem. It was to do with where I was calling the php file fiunctions.php into the script e.g requre("functions.php"). It dident have anything to do with header being called twice cause it wasent. Strange!!
__________________ Paulicon Web design - Your one stop shop |
| |
| | #8 (permalink) | |
| Senior Member | Quote:
What did you do to fix it? Maybe move the require up before any other code or white space or something else? | |
| |
| | #9 (permalink) |
| NamePros Member | I moved the required field into an if else statement, ------------ if{ header("Location...... } else{ required("functions.php"); } ------------ This is a scaled down version of the code. It was strange because I run php4 on my test server and it worked fine, but when I uploaded to my online server which runs php3 it through up the error. Ah well the joys of programming
__________________ Paulicon Web design - Your one stop shop |
| |
| | #10 (permalink) | |
| Senior Member | Quote:
And yea, I have had that same error occur many times with php scripts. :beer: :webdev: | |
| |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| |