Hey guys,
I am having a problem with using this code on my webhost providers server:
<?
session_start();
$valid = "yes";
$_SESSION[valid] = $valid;
?>
<HTML>
<-- rest of code -->
</HTML>
They are using Windows NT, IIS/5.0, PHP 4.3.3 with register_global ON, and session.auto_start OFF
This is a letter that I wrote to my webhost provider:
----- Original Message -----
From: ShredDead-Metal
To:
[email protected] ;
[email protected]
Sent: Sunday, November 16, 2003 8:13 PM
Subject: Still having problem with PHP's start_session();
Hi,
I was wondering if the problem with me using PHP's sessions was fixed? This is the code I am using:
<?
session_start();
$valid = "yes";
$_SESSION[valid] = $valid;
?>
<HTML>
<-- rest of code -->
</HTML>
This page, among the rest of my session_start(); pages, works without one problem on my localhost system that uses Windows XP, Apache 1.3.24 and PHP 4.3.4. All I did was transfer it over to yours. The only difference between mine and yours is that my PHP.INI file under Sessions is this:
session.save_path = C:\WINDOWS\Temp
This is the complete error that comes up on my page when I try to use the above script:
Warning: session_start(): open(C:\PHP\sessiondata\sess_a56ce3d506d5fb7035a0a 650071364cf, O_RDWR) failed: No such file or directory (2) in d:\websites\ShredDead-Metal\main_page.php on line 2
Warning: session_start(): Cannot send session cookie - headers already sent by (output started at d:\websites\ShredDead-Metal\main_page.php:2) in d:\websites\ShredDead-Metal\main_page.php on line 2
Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at d:\websites\ShredDead-Metal\main_page.php:2) in d:\websites\ShredDead-Metal\main_page.php on line 2
Notice: Use of undefined constant valid - assumed 'valid' in d:\websites\ShredDead-Metal\main_page.php on line 4
Warning: Unknown(): open(C:\PHP\sessiondata\sess_a56ce3d506d5fb7035a0a 650071364cf, 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 (C:\PHP\sessiondata) in Unknown on line 0
Thanks for working with me
__________________________________________________ _______________________________________
Their response:
Hi:
We apologize for the delayed response. The path has been set to the correct directory. It seems the script is not reading the directory correctly. Session data is working correctly since we do see log files been written in.
__________________________________________________ _______________________________________
Is there something that I have done wrong or is it my provider. If the problem is them how do I go about fixing this. I would hate to know that my hard work has been left flat-lined due to them.
Thanks,
ShredDead