Sponsored by NuSphere - PHP Software for PHP Application Developers - On Sale This Week for $100 off


PHP Tutorials and Scripts   




Title: Session Errors in PHP Applications    Marked Cool    (Review this resource)
Author: davidlo
Posted On: 2004-12-20
Category: Home > PHP Hints and Tips

Popularity: 1 points out of 10    

Description: A cause of session errors in premade PHP Applications and a solution

Total Hits: 863     Total Votes: 0     Total Points: 0 (0 reviews)    

Page Navigation:  [1]


Error: headers already sent




Seeing errors like these?

Warning : session_start() [ function.session-start]: Cannot send session cookie - headers already sent by (output started in /pathtofile/file.php) in /pathtofile/file2.php on line 45

Although not common with home made applications, these sometimes headache causing errors will show up on the blog, portal, forum, or image gallery that you just installed. The culprit is that there are extra carriage returns after the ending ?> tag in some PHP file (usually the config.php file) To fix this errors, simply go through all the files, looking for extra carriage returns and removing them.



Page Navigation:  [1]



© Copyright 2003-2008 www.php-editors.com. The ultimate PHP Editor and PHP IDE site.