Hi,
I am running PHP4 (the latest stable release) on Windows ME with Apache 1.3.22 (Win). It works OK except for sessions. When I create a session, it gives the following errors in the browser:
===============================
Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at c:\program files\apache group\apache\htdocs\session.php:7) in c:\program files\apache group\apache\htdocs\session.php on line 9
Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at c:\program files\apache group\apache\htdocs\session.php:7) in c:\program files\apache group\apache\htdocs\session.php on line 9
Warning: Unknown(): Your script possibly relies on a session side-effect which existed until PHP 4.2.3. Please be advised that the session extension does not consider global variables as a source of data, unless register_globals is enabled. You can disable this functionality and this warning by setting session.bug_compat_42 or session.bug_compat_warn to off, respectively. in Unknown on line 0
===============================
The code that I use is this:
==============================
<html>
<head>
<title>Session Test</title>
</head>
<body>
<?php
session_start();
$thisVar = "test";
session_register("thisVar"
;
?>
Variable: '<?php echo $_SESSION['thisVar']; ?>'
</body>
</html>
==============================
I am guessing I need to set a configuration flag, but where? httpd.conf? .htaccess?
Thanks,
Jonathan Daniels
I am running PHP4 (the latest stable release) on Windows ME with Apache 1.3.22 (Win). It works OK except for sessions. When I create a session, it gives the following errors in the browser:
===============================
Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at c:\program files\apache group\apache\htdocs\session.php:7) in c:\program files\apache group\apache\htdocs\session.php on line 9
Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at c:\program files\apache group\apache\htdocs\session.php:7) in c:\program files\apache group\apache\htdocs\session.php on line 9
Warning: Unknown(): Your script possibly relies on a session side-effect which existed until PHP 4.2.3. Please be advised that the session extension does not consider global variables as a source of data, unless register_globals is enabled. You can disable this functionality and this warning by setting session.bug_compat_42 or session.bug_compat_warn to off, respectively. in Unknown on line 0
===============================
The code that I use is this:
==============================
<html>
<head>
<title>Session Test</title>
</head>
<body>
<?php
session_start();
$thisVar = "test";
session_register("thisVar"
?>
Variable: '<?php echo $_SESSION['thisVar']; ?>'
</body>
</html>
==============================
I am guessing I need to set a configuration flag, but where? httpd.conf? .htaccess?
Thanks,
Jonathan Daniels