I have the following lines of code in a script to store a sesison level variable :
$a="hello";
session_start();
session_register("a");
But, whenever I run the php script (on PWS/Win98) I get the following warning messages and the session variable is never created :
Warning: Cannot send session cookie - headers already sent by (output started at D:\test\Index.php:2) in D:\test\Index.php on line 5
Warning: Cannot send session cache limiter - headers already sent (output started at D:\test\Index.php:2) in D:\test\Index.php on line 5
Warning: open(/tmp\sess_47f63190e0ceb03c4a33a53daea2b064, O_RDWR) failed: m (2) in D:\test\Index.php on line 5
Any help is appreciated. Also I would like to know whether there is a startup init file/script in PHP like there is a global.asa in ASP.
Thanks.