RE: [PHP] Headers Problem
Beauford wrote: I'm getting the following error. My question is, where would I use the ob_start() and ob_end_flush() function so I can get rid of this. I have read the PHP manual, but not quite getting it.Or if there is a better way? Don't work around the problem with output buffering; try fixing it. Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /usr/local/apache/htdocs/supreme/updates/update-corrections-write.php: 2) in /usr/local/apache/php/includes/restricted.inc on line 1 You must have session_start() before any output. You've placed it on line 1 of restricted.inc, but output was started on line 2 of update-corrections-write.php. If you're going to include restricted.inc and start a session, include it before there is output. Just a clarification, session_start() is on the first line of restricted.inc and restricted.inc is included on the first line of update-corrections-input.php. All update-corrections-write.php does is write info to a database and includes update-corrections-input.php on the last line. So I'm still not understanding where the output from update-corrections-write.php is coming from. Thanks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Headers Problem
From: Beauford [EMAIL PROTECTED] Just a clarification, session_start() is on the first line of restricted.inc and restricted.inc is included on the first line of update-corrections-input.php. All update-corrections-write.php does is write info to a database and includes update-corrections-input.php on the last line. So I'm still not understanding where the output from update-corrections-write.php is coming from. Sounds like you have a blank line as the first line in update-corrections-write.php. If ?php isn't the very first thing in the file, then this isn't going to work. ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Headers Problem
Yes, there was a blank line. Now I just have to test it to see if that was it. One other question though. It appears that Windows does not have this problem - the site in question is on a Linux box. Why would this be? The two sites are identical, I just use the Windows one for developing and testing. I have looked at both php.ini files, and other than the OS specific stuff, they are the same as well. Thanks again... -Original Message- From: CPT John W. Holmes [mailto:[EMAIL PROTECTED] Sent: December 24, 2003 8:52 AM To: Beauford Cc: 'PHP' Subject: Re: [PHP] Headers Problem From: Beauford [EMAIL PROTECTED] Just a clarification, session_start() is on the first line of restricted.inc and restricted.inc is included on the first line of update-corrections-input.php. All update-corrections-write.php does is write info to a database and includes update-corrections-input.php on the last line. So I'm still not understanding where the output from update-corrections-write.php is coming from. Sounds like you have a blank line as the first line in update-corrections-write.php. If ?php isn't the very first thing in the file, then this isn't going to work. ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Headers Problem
Beauford wrote: I'm getting the following error. My question is, where would I use the ob_start() and ob_end_flush() function so I can get rid of this. I have read the PHP manual, but not quite getting it.Or if there is a better way? Don't work around the problem with output buffering; try fixing it. Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /usr/local/apache/htdocs/supreme/updates/update-corrections-write.php:2) in /usr/local/apache/php/includes/restricted.inc on line 1 You must have session_start() before any output. You've placed it on line 1 of restricted.inc, but output was started on line 2 of update-corrections-write.php. If you're going to include restricted.inc and start a session, include it before there is output. -- ---John Holmes... Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/ php|architect: The Magazine for PHP Professionals www.phparch.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php