PDA

View Full Version : headers already sent by !!!!!!


saher
12-19-01, 09:34 AM
pleas help if any one have the same problem:
i cant dminstrate my "vbb" this messsage all ready on the top of ll page:

#!/usr/local/bin/php #!/usr/local/bin/php #!/usr/local/bin/php #!/usr/local/bin/php #!/usr/local/bin/php

Warning: Cannot add header information - headers already sent by (output started at /www/j/jwal1/htdocs/vb/global.php:2) in /www/j/jwal1/htdocs/vb/admin/functions.php on line 1460

Warning: Cannot add header information - headers already sent by (output started at /www/j/jwal1/htdocs/vb/global.php:2) in /www/j/jwal1/htdocs/vb/admin/functions.php on line 1460
look at line 1460 wht say "
if ($cookiedomain) {
this is the line 1460 setcookie($name,$value,$expire,$cookiepath,$cookie domain);
} else {
setcookie($name,$value,$expire,$cookiepath);
}

}"
i aready do more change of all poweb server wnt to do but nothing

sophiespo
12-19-01, 12:28 PM
You have to find the pages generating the #!/usr/local/bin/php lines.. usually they are generated by files that are included in the page youve tried to display... for instance, if the page that displayed all those error messages was index.php then open index.php in notepad and look for lines like

include('anotherfile.php');

where anotherfile.php is the name of any other php file. Open up the 'anotherfile.php' and if it has the #!/usr/local/bin/php line at the top, take it out.

If you dont do this, and #!/usr/local/bin/php #!/usr/local/bin/php #!/usr/local/bin/php #!/usr/local/bin/php #!/usr/local/bin/php is still at the top of pages, you are going to have a very hard time trying to get cookies to work, as they are sent through the headers of webpages, and if the headers are already sent, then the cookie wont work.

sophie