ID: 29313 Comment by: ProphetII at hotmail dot com Reported By: webmaster at behzad-m dot net Status: Bogus Bug Type: Session related Operating System: redhat PHP Version: 4.3.8 New Comment:
This flag has to be changed in the php.ini file output_buffering = on After that everything should work Previous Comments: ------------------------------------------------------------------------ [2004-07-23 11:32:59] ProphetII at hotmail dot com It's not a bug ! I had the same problem until I figured out this : ; Output buffering allows you to send header lines (including cookies) even ; after you send body content, at the price of slowing PHP's output layer a ; bit. You can enable output buffering during runtime by calling the output ; buffering functions. You can also enable output buffering for all files by ; setting this directive to On. If you wish to limit the size of the buffer ; to a certain size - you can use a maximum number of bytes instead of 'On', as ; a value for this directive (e.g., output_buffering=4096). output_buffering = on ------------------------------------------------------------------------ [2004-07-23 01:08:08] [EMAIL PROTECTED] Sorry, but your problem does not imply a bug in PHP itself. For a list of more appropriate places to ask for help using PHP, please visit http://www.php.net/support.php as this bug system is not the appropriate forum for asking support questions. Thank you for your interest in PHP. You probably have some spaces or new lines before the <? ------------------------------------------------------------------------ [2004-07-22 02:26:11] webmaster at behzad-m dot net Description: ------------ hi , when i use only this code : <?php session_start();?> i get this error : "Warning: session_start(): Cannot send session cookie - headers already sent by (output started at /home/novin/public_html/admin/test.php:1) in /home/novin/public_html/admin/test.php on line 1 " http://www.9vin.com/admin/test.php i have the same problem on an other domain of my server Reproduce code: --------------- <?php session_start();?> Expected result: ---------------- no error page !! Actual result: -------------- Warning: session_start(): Cannot send session cookie - headers already sent by (output started at /home/novin/public_html/admin/test.php:1) in /home/novin/public_html/admin/test.php on line 1 ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=29313&edit=1