• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion
  • Inviting everyone to the UX test of a new security feature in the WP Toolkit
    For WordPress site owners, threats posed by hackers are ever-present. Because of this, we are developing a new security feature for the WP Toolkit. If the topic of WordPress website security is relevant to you, we would be grateful if you could share your experience and help us test the usability of this feature. We invite you to join us for a 1-hour online session via Google Meet. Select a convenient meeting time with our friendly UX staff here.

session.save_path problem

fabrizioi

Basic Pleskian
Hi to all,

I have activated a new linux dedicated server with centos5.4 and plesk8.6

I came from experience from plesk8.x/window2008, so this is first time on linux/plesk

I have problem with php and the session.save_path.

I have read the following kb
http://kb.odin.com/en/6781

When I set the environment like explain in the article the site became very slowly, it is possible ? Why ?

If, for example, I move the session save path to a folder inside the web directory for example:

/var/www/vhosts/<domain>/httpdocs/tmp

The site works well, but this is incorrect and insecure because the sessions cannot be stored in a web directory I believe.

So I'd like to know which is the correct way to configure the session.save_path.

After any change I reconfigure the vhost.conf with:

websrvmng --reconfigure-vhost ....

And I restart the httpd service.

For the session I use the Pear/Auth Class that works well in windows environment for my experience.

Any help are appreciate.

Bye.
 
in /etc/php.ini change the session_path to /tmp
if you use su_php and you have for each domain your own php.ini then you can do there and then can be custom path
 
Hi,

Thanks for the replay.

So if I have correct understand:

I can edit php.ini and set session.save.path = /etc/tmp/

I must also integrate the "php_admin_value openbase_dir" located in /var/www/vhosts/<domain>/conf/vhost.conf with the /etc/tmp/ ?

I don't know su-php

It is possible and/or reccomended to store session in a layout like this: /tmp/sess_domain1/ /tmp/sess_domain2 and so on ?

Php garbage collector work well also in this situation ?


Bye
 
Hi,

I have found this article very very intresting, thanks for sharing.

I have apply some fix to my server, like explain in the article.

I have a question about the session.save_path.

The session file created in ./tmp have the apache:apache user:group setting.

This is correct ? Or I must install suPhp ? (I do not use any software at the moment listed in the article)

Bye
 
Yes, apache:apache is normal for files created by a php script (via apache) in /tmp.

Indeed, any file created by php anywhere in the filesystem will likely be apache:apache.

Only if you use su-php (not recommended unless you really know what you are doing, even with lvalic's wonderful info) will the owndership be different.

Faris.
 
Back
Top