hi guys, my first post so greetings to everyone.
i had this problem before and im not entirely sure how i fixed it but it worked, basically i have problems with sessions and cookies, my php script isn't putting down a cookie, it tells me
Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent
and
Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent
it also gives filenames there as well.
since i am running this on a school server they require me to add this line:
#!/usr/local/bin/php
before anything else. and also call the file .cgi and not .php. my previous site used to work fine until they added those rules in and im not sure if there's something wrong with my coding. basically my code starts off:
#!/usr/local/bin/php
<?
include 'functions.inc';
session_start();
?>
<html>
<head>
<title>iTrader</title>
</head>
<body>
<?
etc... then at some point within the document i call
session_register('$uname');
$sessionid = session_id();
echo $sessionid;
and the session id appears but the cookie isn't set, everytime i move to a different page or whatnot the session id changes.
all help very much appreciated,
thanks