Page 1 of 1

[SOLVED] how to enable sessions

Posted: Fri Mar 19, 2004 7:22 am
by gamati
Hi! I have set up the newest Apache server and the newest php-interpreter on my personal computer at home. I could install apache allright to use the php interpreter, and i can use the features of php as well.
recently i tried to use sessions (well, i downloaded a script that needs sessions) and i go the following error message:

Code: Select all

Warning: session_start(): open(/tmp\sess_b8271ded77d56662b525c2cd07821db2, O_RDWR) failed: No such file or directory (2) in D:\wwwroot\phpwebsite\setup\setup.php on line 55

Warning: session_start(): Cannot send session cookie - headers already sent by (output started at D:\wwwroot\phpwebsite\setup\setup.php:55) in D:\wwwroot\phpwebsite\setup\setup.php on line 55

Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at D:\wwwroot\phpwebsite\setup\setup.php:55) in D:\wwwroot\phpwebsite\setup\setup.php on line 55


phpWebSite Version 0.9.3-2 - Installation Utility
phpWebSite failed a session test. If your PHP installation is not configured to allow sessions, you will not be able to run phpWebSite.

Warning: Unknown(): open(/tmp\sess_b8271ded77d56662b525c2cd07821db2, 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
my php.ini file looks like that and is saved in c:\windows\php.ini

Code: Select all

їSession]
session.save_handler = files
session.save_path = d:/wwwroot/tmp
session.use_cookies = 1
session.use_only_cookies = 1
session.name = PHPSESSID
session.auto_start = 1
session.cookie_lifetime = 0
session.cookie_path = /
session.cookie_domain = 
session.serialize_handler = php
session.gc_probability = 1
session.gc_divisor     = 100
session.gc_maxlifetime = 1440
session.bug_compat_42 = 1
session.bug_compat_warn = 1
session.referer_check =
session.entropy_length = 0
session.entropy_file =
session.cache_limiter = nocache
session.cache_expire = 180
session.use_trans_sid = 1
= "a=href,area=href,frame=src,input=src,form=,fieldset="
how can i make sessions run? i hope oyu can help me.
attila.

Posted: Fri Mar 19, 2004 7:25 am
by markl999
The session.save_path is at fault somewhere. Try changing d:/wwwroot/tmp to d:\wwwroot\tmp (not sure if the direction of the slashes matters, but worth a go) .. then be sure to restart apache.

Posted: Fri Mar 19, 2004 7:27 am
by twigletmac
If a restart doesn't do the trick (it should do if you didn't do it when changing the php.ini) then check the output of:

Code: Select all

<?php phpinfo(); ?>
and see if for some reason PHP is using the information in a different php.ini.

Mac

Thank you - Solved

Posted: Fri Mar 19, 2004 9:00 am
by gamati
Thank you for your suggestions!
d:/wwwroot/tmp worked allright and the restart was one part of the problem i think.
i had php.ini two times on my computer one in c:\windows and the other in c:\programme\internet\apache\php\
and i changed the not-used one all the time.

i am sorry, if i took your time.
thank you once more,

attila.