Session Warnings and cache_limiter warning

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
EverToDesign
Forum Newbie
Posts: 10
Joined: Sat Oct 11, 2003 9:38 am

Session Warnings and cache_limiter warning

Post by EverToDesign »

Hey below I get this error message the first time i Login.
Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at /usr/local/apache/www/www.everto.com/htdocs/admin/dvdtemp3.php:2) in /usr/local/apache/www/www.everto.com/htdocs/admin/includes/functions.inc.php on line 96

Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /usr/local/apache/www/www.everto.com/htdocs/admin/dvdtemp3.php:2) in /usr/local/apache/www/www.everto.com/htdocs/admin/includes/functions.inc.php on line 96

Below is my session statement:
session_cache_limiter('nocache');

session_start();
$_SESSION[admin_id] = $id;
$_SESSION[valid] = "YES";
$_SESSION[username] = $loginuser;
$_SESSION[pass] = $loginpassword;

Am I missing something? This works fine on another server but I think its PHP Version is slightly older, but should that make a difference? Any one know how to get rid of those warnings?

Thanks in advance
Cruzado_Mainfrm
Forum Contributor
Posts: 346
Joined: Sun Jun 15, 2003 11:22 pm
Location: Miami, FL

Post by Cruzado_Mainfrm »

session_cache_limiter('nocache'); is returning a warning or error, u must write:
@session_cache_limiter('nocache');
User avatar
m3mn0n
PHP Evangelist
Posts: 3548
Joined: Tue Aug 13, 2002 3:35 pm
Location: Calgary, Canada

Post by m3mn0n »

[big_search]php sessions[/big_search]
Post Reply