how to change session functions for windows users

Problems with the Windows version of XAMPP, questions, comments, and anything related.

how to change session functions for windows users

Postby ilustrate » 11. June 2005 04:25

I transplanted this tread of mine from the osCommerce forum


First I say...


Warning: session_start() [function.session-start]: open(/tmp\sess_4bb72da5641c10ce8b8e8e1fe845e41d, O_RDWR) failed: No such file or directory (2) in C:\apachefriends\xampp\xampp\htdocs\osCommerce\oscommerce-2.2ms2\catalog\admin\includes\functions\sessions.php on line 67

any idea where i need to put this directory or how to fix this new install

i'm installing this locally using my apache server from Xampp


also by the way. how do i go about setting permissions? i normally use smartftp but this is different because all the files are local. i'm using windows xp sp2.


[b]
Then someone answers...
[/b]

Change the session.save_path = ...

setting in php.ini to point to the directory where you want to store session files.

Change your session directory from /tmp to \tmp if you want to keep this directory.

Restart Apache.

Then I answer...

Thank you very much for your expert support . Could you enlighten me a little more? I found the php.ini in two places (xampp\xampp\php and xampp\xampp\apache\bin) which one do I alter?
Also, I'm understanding that I should "change your session directory from \tmp to \tmp if you want to keep this directory"

does this mean that the lines in php.ini should end up looking something like this...

before:

; variable in order to use PHP's session functions.
session.save_path= ".;c:\apachefriends\xampp\xampp\tmp"

after:

; variable in order to use PHP's session functions.
session.save_path= ".;c:\apachefriends\xampp\xampp/tmp"

thanks for any help you can continue providing...

Then he answer again...

I don't know exactly how xampp works as I don't use it - however, I would try changing the php.ini in the php directory.

Also, if you look in application_top.php, you'll see the line:
tep_session_save_path(SESSION_WRITE_DIRECTORY);


Which you should really comment out if you are setting the session_save_path manually.

Regarding the string, I don't know what the ".;" is for at the beginning - I would try:
session.save_path= "c:\apachefriends\xampp\xampp\tmp"

and manually create the tmp directory. You can use any directory here as long as it actually exists on the filesystem
Sorry about the "/", "\" confusion - one is used on Windows, the other on Linux.



And this is the snip (out of c:\apachefriends\xampp\xampp\php\php.ini) that we are talking about...

I need help...with this. The following says that windows users have to change this. What? and How do I change this? I appreciate his advice but I just need clarifying and more specific guidance.


[Session]
; Handler used to store/retrieve data.
session.save_handler = files

; 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:\apachefriends\xampp\xampp\tmp"
ilustrate
 
Posts: 8
Joined: 11. June 2005 03:47

Postby Dave_L » 11. June 2005 15:39

I can't help with the session problem, but phpinfo() will show you the path to the current php.ini file:

http://localhost/xampp/phpinfo.php

Look for "Configuration File (php.ini) Path" near the beginning of the output.
User avatar
Dave_L
 
Posts: 212
Joined: 23. October 2004 00:43

Postby ilustrate » 11. June 2005 21:44

Dave_L wrote:I can't help with the session problem, but phpinfo() will show you the path to the current php.ini file:

http://localhost/xampp/phpinfo.php

Look for "Configuration File (php.ini) Path" near the beginning of the output.
Thank you. At least this tells me which php.ini file I'm actually working with. That will reduce my work by 66% I'm still trying different things so if anyone has an ideas.......... let me know.......
ilustrate
 
Posts: 8
Joined: 11. June 2005 03:47


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 68 guests