Problem creating sessions
Posted: Thu Feb 26, 2004 8:03 pm
Hi
I am using PHP 4.3.4 on Apache 2.0.48 running on WinXP pro.
I am trying to create a session using PHP. my script is as follows:
<?
session_start();
$counter=1;
print($counter);
$counter++;
session_register("counter");
?>
But when i run this script on my local pc(apache 2.0.48, php 4.3.4 installed) i get the following messages: -
Warning: session_start(): open(/tmp\sess_686a7d32a236d9381de7dd2eaa5bfb21, O_RDWR) failed: No such file or directory (2) in D:\inetpub\wwwroot\New Text Document.php on line 2
Warning: session_start(): Cannot send session cookie - headers already sent by (output started at D:\inetpub\wwwroot\New Text Document.php:2) in D:\inetpub\wwwroot\New Text Document.php on line 2
Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at D:\inetpub\wwwroot\New Text Document.php:2) in D:\inetpub\wwwroot\New Text Document.php on line 2
1
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
Warning: Unknown(): open(/tmp\sess_686a7d32a236d9381de7dd2eaa5bfb21, O_RDWR) failed: No such file or directory (2) in Unknown on line 0
Warning: Unknown(): Failed to write session data (files). Please verify that the current setting of session.save_path is correct (/tmp) in Unknown on line 0
i have added d:\inetpub\wwwroot\tmp\ to the php.ini file as session.save_path
Can anybody tell me whats the problem or do i have to make some adjustments to the apache or php configurations.
I am using PHP 4.3.4 on Apache 2.0.48 running on WinXP pro.
I am trying to create a session using PHP. my script is as follows:
<?
session_start();
$counter=1;
print($counter);
$counter++;
session_register("counter");
?>
But when i run this script on my local pc(apache 2.0.48, php 4.3.4 installed) i get the following messages: -
Warning: session_start(): open(/tmp\sess_686a7d32a236d9381de7dd2eaa5bfb21, O_RDWR) failed: No such file or directory (2) in D:\inetpub\wwwroot\New Text Document.php on line 2
Warning: session_start(): Cannot send session cookie - headers already sent by (output started at D:\inetpub\wwwroot\New Text Document.php:2) in D:\inetpub\wwwroot\New Text Document.php on line 2
Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at D:\inetpub\wwwroot\New Text Document.php:2) in D:\inetpub\wwwroot\New Text Document.php on line 2
1
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
Warning: Unknown(): open(/tmp\sess_686a7d32a236d9381de7dd2eaa5bfb21, O_RDWR) failed: No such file or directory (2) in Unknown on line 0
Warning: Unknown(): Failed to write session data (files). Please verify that the current setting of session.save_path is correct (/tmp) in Unknown on line 0
i have added d:\inetpub\wwwroot\tmp\ to the php.ini file as session.save_path
Can anybody tell me whats the problem or do i have to make some adjustments to the apache or php configurations.