View previous topic :: View next topic |
Author |
Message |
ToCool -
Joined: 22 Aug 2002 Posts: 6 Location: Simpsonville, SC USA
|
Posted: Sat Aug 31, 2002 1:16 am Post subject: PHP session file problem |
|
|
I'm getting errors when php tries to find session files. The author of one of the scripts took a look and said, "my guess is your server session configuration needs changing, it wasn't working properly, it wasn't finding the session files maybe just a simple config change, i don't know offhand..."
Anyone else having these problems?
I've checked the server set-up per instructions on this site and I've run through the php.ini file with the above person.
Thanks _________________ ToCool
http://www.simpsonville.net |
|
Back to top |
|
|
aprelium -
Joined: 22 Mar 2002 Posts: 6800
|
Posted: Sat Aug 31, 2002 9:14 am Post subject: Re: PHP session file problem |
|
|
ToCool wrote: | I'm getting errors when php tries to find session files. The author of one of the scripts took a look and said, "my guess is your server session configuration needs changing, it wasn't working properly, it wasn't finding the session files maybe just a simple config change, i don't know offhand..."
Anyone else having these problems?
I've checked the server set-up per instructions on this site and I've run through the php.ini file with the above person.
Thanks |
This is a PHP setup problem. We guess this parameter is hidden somewhere in php.ini. We will investigate that and we will give you further information asap. _________________ Support Team
Aprelium - http://www.aprelium.com |
|
Back to top |
|
|
TheLinker -
Joined: 05 Apr 2002 Posts: 165 Location: Oslo, Norway
|
Posted: Sat Aug 31, 2002 9:17 am Post subject: Re: PHP session file problem |
|
|
Sessions using Abyss og PHP 4.2.2 seems to be working just fine.
For testing sessions, create a file called counter.php and paste in the following code:
Code: | <?php
session_start();
if ( !isset( $_SESSION["counter"] ) )
{
$_SESSION["counter"] = 0;
}
$_SESSION["counter"] += 1;
echo $_SESSION["counter"];
?>
|
When running and refreshing this php script, you will see a counter increasing in your browser... if you check your C:\PHP\sessiondata directory, you will see a new file created there. Inside this file you will find the "counter" variable, and the current number assigned.
If you close and reopen your browser and accesses the same php script again, you will see that the counter is reset and a new file is created in your sessiondata directory.
Hope this helps you out... :-) |
|
Back to top |
|
|
ToCool -
Joined: 22 Aug 2002 Posts: 6 Location: Simpsonville, SC USA
|
Posted: Sat Aug 31, 2002 1:28 pm Post subject: |
|
|
Quote: |
Sessions using Abyss og PHP 4.2.2 seems to be working just fine.
For testing sessions, create a file called counter.php and paste in the following code:
Code:
<?php
session_start();
if ( !isset( $_SESSION["counter"] ) )
{
$_SESSION["counter"] = 0;
}
$_SESSION["counter"] += 1;
echo $_SESSION["counter"];
?>
When running and refreshing this php script, you will see a counter increasing in your browser... if you check your C:\PHP\sessiondata directory, you will see a new file created there. Inside this file you will find the "counter" variable, and the current number assigned.
If you close and reopen your browser and accesses the same php script again, you will see that the counter is reset and a new file is created in your sessiondata directory.
|
The counter isn't increasing in my browser. What should I check to correct this problem? See http://www.simpsonville.net/counter.php
Thanks _________________ ToCool
http://www.simpsonville.net |
|
Back to top |
|
|
aprelium -
Joined: 22 Mar 2002 Posts: 6800
|
Posted: Sat Aug 31, 2002 2:38 pm Post subject: |
|
|
We checked the page and we've got that
Quote: |
Warning: open(C:\php\sessiondata C:\php\sessiondata\sess_a038341d4765427486fc010ec666f254, O_RDWR) failed: No such file or directory (2) in d:\Program Files\Abyss Web Server\htdocs\counter.php on line 3
1
Warning: open(C:\php\sessiondata C:\php\sessiondata\sess_a038341d4765427486fc010ec666f254, O_RDWR) failed: No such file or directory (2) in Unknown on line 0
Warning: Failed to write session data (files). Please verify that the current setting of session.save_path is correct (C:\php\sessiondata C:\php\sessiondata) in Unknown on line 0
|
which seems to be self explanatory: either you haven't directory C:\php\sessiondata or you have no write permission on this directory.
So check these and if needed locate the [Session] section in php.ini and set the following lines using a correct directory:
Code: |
; Argument passed to save_handler. In the case of files, this is the path
; where data files are stored. Note: Windows users have to change this
; variable in order to use PHP's session functions.
session.save_path = C:\Program Files\PHP\sessiondata ; argument passed to save_handler
|
_________________ Support Team
Aprelium - http://www.aprelium.com |
|
Back to top |
|
|
ToCool -
Joined: 22 Aug 2002 Posts: 6 Location: Simpsonville, SC USA
|
Posted: Sat Aug 31, 2002 3:26 pm Post subject: |
|
|
Thank You! I was missing the semi-colon. When I saw your example it hit me like a ton of bricks. Thanks again! _________________ ToCool
http://www.simpsonville.net |
|
Back to top |
|
|
|