View Full Version : PHP 5 warning session
Gimly
9th July 2009, 16:16
Hi All,
I've problem with session, in php script i've this warning :
Warning: Unknown: open(/var/lib/php5/sess_3f16fe202b755a37bb4c1d04d2a9acf7, O_RDWR) failed: Permission denied (13) 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 (/var/lib/php5) in Unknown on line 0
If script uses session for login on private party, the session are not save and user are reject ...
What is the correct path to work with ispconfig ?
Thank you :)
PS : warning are present in fcgi and suphp
sirrus
9th July 2009, 18:42
You should post some more informations. What URL did you try? Which version of ISPConfig? Please provide the output of
ls -la /var/lib/php5
Gimly
9th July 2009, 21:45
What URL did you try ?
The problem exist for over 300 website ...
Which version of ISPConfig?
Last stable (you can see it on my signature ...)
ns1:~# ls -al /var/lib/php5/
total 8
drwx-wx-wt 2 root root 4096 jui 9 20:39 .
drwxr-xr-x 28 root root 4096 jun 30 22:08 ..
ns1:~#
sirrus
9th July 2009, 22:36
Maybe your config files are wrong. This could be caused by a template.
The single config files under /etc/apache2/sites-enabled/* should habe a line like this:
php_admin_value session.save_path /var/www/clients/client1/web1/tmp
If this is not the case please edit /usr/local/ispconfig/server/conf/vhost.conf.master to represent this (only a snippet - the file should be several lines long):
<tmpl_if name='php' op='==' value='mod'>
# mod_php enabled
AddType application/x-httpd-php .php .php3 .php4 .php5
php_admin_value sendmail_path "/usr/sbin/sendmail -t -i -fwebmaster@<tmpl_var name='domain'>"
php_admin_value upload_tmp_dir <tmpl_var name='document_root'>/tmp
php_admin_value session.save_path <tmpl_var name='document_root'>/tmp
php_admin_value open_basedir <tmpl_var name='document_root'>:/usr/share/php5
</tmpl_if>
Gimly
9th July 2009, 22:53
I add this value php_admin_value session.save_path <tmpl_var name='document_root'>/tmp
to suphp and cgi, now I test.
I'll become later to confirm the solution :)
Gimly
10th July 2009, 08:53
It work fine for all website ^^ but not for ISPConfig :
https://www.espace4you.org:81/
you can access by https://ns1.espace4you.org:81/ without error, but the valid SSL certificate is for www.espace4you.org and not ns1.espace4you.org and I want to my customers (clients) access by www.espace4you.org.
If you have an idea ?
thank you :)
sirrus
10th July 2009, 10:24
ISPConfig needs to be modified in
/etc/apache2/sites-enabled/000-ispconfig.vhost
but this should be a fcgi handled domain. Therefor you should modify
/var/www/php-fcgi-scripts/ispconfig/.php-fcgi-starter
And the issue with SSL is caused by your certificate. You need to create a new certificate - this can be selfsigned as it is now. I suggest to buy a "real" certificate for this domain.
till
10th July 2009, 11:07
Warning: Unknown: open(/var/lib/php5/sess_3f16fe202b755a37bb4c1d04d2a9acf7, O_RDWR) failed: Permission denied (13) 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 (/var/lib/php5) in Unknown on line 0
Just close all browser windows so that you get a new session for ISPConfig. This error is normal if you use e.g. fcgi while you had mod_php used before in ispconfig as the session file is owned by a different user then and the session file gets deleted when you close all browser windows.
Gimly
10th July 2009, 14:51
Thank you for your precision Till :)
vBulletin® v3.8.4, Copyright ©2000-2010, Jelsoft Enterprises Ltd.