Page 1 of 1

php sessions, different problem

Posted: Thu Oct 05, 2006 2:58 pm
by excultus
Hi guys!
I have a problem with php sessions, I always get the

Code: Select all

Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at index.php:1) in /.....index.php on line 10

Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /..../index.php on line 10
warning.
And I do NOT have blank space in the begining of the file as it works perfectlz on my php instalation at home but when I upload to the server I get this...
Headers are obviouslz sent but I dont know where...
This is the incriminated piece of code

Code: Select all

<?php
  
  // define debug level, 0 for no debugging, 1 for debugging enabled
	define("DEBUG", 0);
	
  // insert required scripts/libaries
  require_once("libs/smarty/Smarty.class.php");
  require_once("config.php");
  
  session_start();
help me please :cry:

Posted: Thu Oct 05, 2006 3:01 pm
by volka
Do you use an editor that sets a BOM?

Posted: Thu Oct 05, 2006 3:17 pm
by excultus
ahh looks as I am...
I use PSPad and saving the file to UTF-8.. is there any way I could go on using UTF-8 and not getting the warnings? to continue using UTF-8 but not inserting the leading char?

You helped me much, thanks!!