• Please be aware: Kaspersky Anti-Virus has been deprecated
    With the upgrade to Plesk Obsidian 18.0.64, "Kaspersky Anti-Virus for Servers" will be automatically removed from the servers it is installed on. We recommend that you migrate to Sophos Anti-Virus for Servers.
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

Forwarded to devs session.save_path differs by PHP Version ...

futureweb

Regular Pleskian
TITLE:
session.save_path differs by PHP Version ...
PRODUCT, VERSION, OPERATING SYSTEM, ARCHITECTURE:
Plesk Onyx Version 17.0.17 Update #23
PROBLEM DESCRIPTION:
Hey there,
I just noticed that the session.save_path is different for the multiple PHP Versions you deliver with Plesk Onyx.
- 5.6.30 FastCGI --> session.save_path = "/usr/tmp/phpSess"
- 7.1.3 FastCGI --> session.save_path = "/var/lib/php/session"

We had an issue where a PHP 7.1.3 Hosting had no access to /var/lib/php/session (it was chmod 755 - root:apache on one of our Servers we upgraded to Onyx while /var/lib/php/session is 777 - root:root)

Guess those pathes should be consistent over all different PHP Versions you deliver?

bye from snowy Austria
Andreas Schnederle-Wagner​
STEPS TO REPRODUCE:
have a look into Plesk delivered default Config​
ACTUAL RESULT:
Package default session.save_path (Plesk delivered default php.ini) differs on different Versions
- 5.6.30 FastCGI --> session.save_path = "/usr/tmp/phpSess"
- 7.1.3 FastCGI --> session.save_path = "/var/lib/php/session"
EXPECTED RESULT:
All PHP Versions should have the same default session.save_path ...
- 5.6.30 FastCGI --> session.save_path = "/usr/tmp/phpSess"
- 7.1.3 FastCGI --> session.save_path = "/usr/tmp/phpSess"
ANY ADDITIONAL INFORMATION:
Plesk was updated from 12.5 to Onyx (may be the source of the chmod issue???)
YOUR EXPECTATIONS FROM PLESK SERVICE TEAM:
Confirm bug
 
Last edited:
Could you please specify ACTUAL RESULT and EXPECTED RESULT.
It is mandatory requirement.
Thanks.
 
Hi futureweb,

pls. include the output of the commands:

Code:
find /opt/plesk/ -type f -name "*.*" -exec grep --color -Hni "session.save_path" {} \;

Code:
find /etc/ -type f -name "*.*" -exec grep --color -Hni "session.save_path" {} \;

Code:
ls -ld / /var/ /var/lib/ /var/lib/php/ /var/lib/php/session/
 
find /opt/plesk/ -type f -name "*.*" -exec grep --color -Hni "session.save_path" {} \;
Code:
CT-359-bash-4.1# find /opt/plesk/ -type f -name "*.*" -exec grep --color -Hni "session.save_path" {} \;
/opt/plesk/php/5.2/etc/php.ini:1026:;     session.save_path = "N;/path"
/opt/plesk/php/5.2/etc/php.ini:1042:;     session.save_path = "N;MODE;/path"
/opt/plesk/php/5.2/etc/php.ini:1046:session.save_path = "/var/lib/php/session"
/opt/plesk/php/5.2/etc/php.ini:1092:;       (see session.save_path above), then garbage collection does *not*
/opt/plesk/php/5.2/etc/php.ini.orig:1026:;     session.save_path = "N;/path"
/opt/plesk/php/5.2/etc/php.ini.orig:1042:;     session.save_path = "N;MODE;/path"
/opt/plesk/php/5.2/etc/php.ini.orig:1046:session.save_path = "/var/lib/php/session"
/opt/plesk/php/5.2/etc/php.ini.orig:1092:;       (see session.save_path above), then garbage collection does *not*
Binary file /opt/plesk/php/5.2/lib64/php/modules/redis.so matches
/opt/plesk/php/5.6/etc/php.ini:1247:;     session.save_path = "N;/path"
/opt/plesk/php/5.6/etc/php.ini:1263:;     session.save_path = "N;MODE;/path"
/opt/plesk/php/5.6/etc/php.ini:1268:session.save_path = "/usr/tmp/phpSess"
/opt/plesk/php/5.6/etc/php.ini:1344:;       (see session.save_path above), then garbage collection does *not*
/opt/plesk/php/5.6/etc/php.ini.orig:1396:;     session.save_path = "N;/path"
/opt/plesk/php/5.6/etc/php.ini.orig:1412:;     session.save_path = "N;MODE;/path"
/opt/plesk/php/5.6/etc/php.ini.orig:1417:session.save_path = "/var/lib/php/session"
/opt/plesk/php/5.6/etc/php.ini.orig:1501:;       (see session.save_path above), then garbage collection does *not*
/opt/plesk/php/5.6/etc/php.ini.rpmnew:1424:;     session.save_path = "N;/path"
/opt/plesk/php/5.6/etc/php.ini.rpmnew:1440:;     session.save_path = "N;MODE;/path"
/opt/plesk/php/5.6/etc/php.ini.rpmnew:1445:session.save_path = "/var/lib/php/session"
/opt/plesk/php/5.6/etc/php.ini.rpmnew:1529:;       (see session.save_path above), then garbage collection does *not*
Binary file /opt/plesk/php/5.6/lib64/php/modules/redis.so matches
Binary file /opt/plesk/php/5.6/lib64/php/modules/phar.so matches
/opt/plesk/php/7.0/etc/php.ini:1319:;     session.save_path = "N;/path"
/opt/plesk/php/7.0/etc/php.ini:1335:;     session.save_path = "N;MODE;/path"
/opt/plesk/php/7.0/etc/php.ini:1340:session.save_path = "/var/lib/php/session"
/opt/plesk/php/7.0/etc/php.ini:1424:;       (see session.save_path above), then garbage collection does *not*
Binary file /opt/plesk/php/7.0/lib64/php/modules/phar.so matches
/opt/plesk/php/5.5/etc/php.ini:1247:;     session.save_path = "N;/path"
/opt/plesk/php/5.5/etc/php.ini:1263:;     session.save_path = "N;MODE;/path"
/opt/plesk/php/5.5/etc/php.ini:1268:session.save_path = "/usr/tmp/phpSess"
/opt/plesk/php/5.5/etc/php.ini:1344:;       (see session.save_path above), then garbage collection does *not*
/opt/plesk/php/5.5/etc/php.ini.orig:1366:;     session.save_path = "N;/path"
/opt/plesk/php/5.5/etc/php.ini.orig:1382:;     session.save_path = "N;MODE;/path"
/opt/plesk/php/5.5/etc/php.ini.orig:1387:session.save_path = "/var/lib/php/session"
/opt/plesk/php/5.5/etc/php.ini.orig:1471:;       (see session.save_path above), then garbage collection does *not*
/opt/plesk/php/5.5/etc/php.ini.rpmnew:1366:;     session.save_path = "N;/path"
/opt/plesk/php/5.5/etc/php.ini.rpmnew:1382:;     session.save_path = "N;MODE;/path"
/opt/plesk/php/5.5/etc/php.ini.rpmnew:1387:session.save_path = "/var/lib/php/session"
/opt/plesk/php/5.5/etc/php.ini.rpmnew:1471:;       (see session.save_path above), then garbage collection does *not*
Binary file /opt/plesk/php/5.5/lib64/php/modules/redis.so matches
Binary file /opt/plesk/php/5.5/lib64/php/modules/phar.so matches
/opt/plesk/php/7.1/etc/php.ini:1334:;     session.save_path = "N;/path"
/opt/plesk/php/7.1/etc/php.ini:1350:;     session.save_path = "N;MODE;/path"
/opt/plesk/php/7.1/etc/php.ini:1355:session.save_path = "/var/lib/php/session"
/opt/plesk/php/7.1/etc/php.ini:1439:;       (see session.save_path above), then garbage collection does *not*
Binary file /opt/plesk/php/7.1/lib64/php/modules/redis.so matches
Binary file /opt/plesk/php/7.1/lib64/php/modules/phar.so matches
/opt/plesk/php/5.3/etc/php.ini:1247:;     session.save_path = "N;/path"
/opt/plesk/php/5.3/etc/php.ini:1263:;     session.save_path = "N;MODE;/path"
/opt/plesk/php/5.3/etc/php.ini:1268:session.save_path = "/usr/tmp/phpSess"
/opt/plesk/php/5.3/etc/php.ini:1344:;       (see session.save_path above), then garbage collection does *not*
/opt/plesk/php/5.3/etc/php.ini.orig:1469:;     session.save_path = "N;/path"
/opt/plesk/php/5.3/etc/php.ini.orig:1485:;     session.save_path = "N;MODE;/path"
/opt/plesk/php/5.3/etc/php.ini.orig:1490:session.save_path = "/var/lib/php/session"
/opt/plesk/php/5.3/etc/php.ini.orig:1566:;       (see session.save_path above), then garbage collection does *not*
/opt/plesk/php/5.3/etc/php.ini.rpmnew:1469:;     session.save_path = "N;/path"
/opt/plesk/php/5.3/etc/php.ini.rpmnew:1485:;     session.save_path = "N;MODE;/path"
/opt/plesk/php/5.3/etc/php.ini.rpmnew:1490:session.save_path = "/var/lib/php/session"
/opt/plesk/php/5.3/etc/php.ini.rpmnew:1566:;       (see session.save_path above), then garbage collection does *not*
Binary file /opt/plesk/php/5.3/lib64/php/modules/redis.so matches
Binary file /opt/plesk/php/5.3/lib64/php/modules/phar.so matches
/opt/plesk/php/5.4/etc/php.ini:1247:;     session.save_path = "N;/path"
/opt/plesk/php/5.4/etc/php.ini:1263:;     session.save_path = "N;MODE;/path"
/opt/plesk/php/5.4/etc/php.ini:1268:session.save_path = "/usr/tmp/phpSess"
/opt/plesk/php/5.4/etc/php.ini:1344:;       (see session.save_path above), then garbage collection does *not*
/opt/plesk/php/5.4/etc/php.ini.orig:1365:;     session.save_path = "N;/path"
/opt/plesk/php/5.4/etc/php.ini.orig:1381:;     session.save_path = "N;MODE;/path"
/opt/plesk/php/5.4/etc/php.ini.orig:1386:session.save_path = "/var/lib/php/session"
/opt/plesk/php/5.4/etc/php.ini.orig:1462:;       (see session.save_path above), then garbage collection does *not*
/opt/plesk/php/5.4/etc/php.ini.rpmnew:1365:;     session.save_path = "N;/path"
/opt/plesk/php/5.4/etc/php.ini.rpmnew:1381:;     session.save_path = "N;MODE;/path"
/opt/plesk/php/5.4/etc/php.ini.rpmnew:1386:session.save_path = "/var/lib/php/session"
/opt/plesk/php/5.4/etc/php.ini.rpmnew:1462:;       (see session.save_path above), then garbage collection does *not*
Binary file /opt/plesk/php/5.4/lib64/php/modules/redis.so matches
Binary file /opt/plesk/php/5.4/lib64/php/modules/phar.so matches

find /etc/ -type f -name "*.*" -exec grep --color -Hni "session.save_path" {} \;
Code:
CT-359-bash-4.1# find /etc/ -type f -name "*.*" -exec grep --color -Hni "session.save_path" {} \;
/etc/psa-webmail/roundcube/php.ini:27:session.save_path = "/usr/tmp/phpSess"
/etc/psa-webmail/horde/horde/php.ini:27:session.save_path = "/usr/tmp/phpSess"
/etc/php.ini:1247:;     session.save_path = "N;/path"
/etc/php.ini:1263:;     session.save_path = "N;MODE;/path"
/etc/php.ini:1268:session.save_path = "/usr/tmp/phpSess"
/etc/php.ini:1344:;       (see session.save_path above), then garbage collection does *not*
/etc/php.ini.saved_by_psa.05.07;18:11:1247:;     session.save_path = "N;/path"
/etc/php.ini.saved_by_psa.05.07;18:11:1263:;     session.save_path = "N;MODE;/path"
/etc/php.ini.saved_by_psa.05.07;18:11:1268:session.save_path = "/var/lib/php/session"
/etc/php.ini.saved_by_psa.05.07;18:11:1344:;       (see session.save_path above), then garbage collection does *not*
/etc/php.ini.saved_by_psa:1246:;     session.save_path = "N;/path"
/etc/php.ini.saved_by_psa:1262:;     session.save_path = "N;MODE;/path"
/etc/php.ini.saved_by_psa:1267:session.save_path = "/var/lib/php/session"
/etc/php.ini.saved_by_psa:1343:;       (see session.save_path above), then garbage collection does *not*
/etc/php.ini.fwbak:1247:;     session.save_path = "N;/path"
/etc/php.ini.fwbak:1263:;     session.save_path = "N;MODE;/path"
/etc/php.ini.fwbak:1268:session.save_path = "/var/lib/php/session"
/etc/php.ini.fwbak:1344:;       (see session.save_path above), then garbage collection does *not*
/etc/php.ini.saved_by_psa.08.11;19:46:1247:;     session.save_path = "N;/path"
/etc/php.ini.saved_by_psa.08.11;19:46:1263:;     session.save_path = "N;MODE;/path"
/etc/php.ini.saved_by_psa.08.11;19:46:1268:session.save_path = "/usr/tmp/phpSess"
/etc/php.ini.saved_by_psa.08.11;19:46:1344:;       (see session.save_path above), then garbage collection does *not*
/etc/php.d/memcache.ini:34:;session.save_path="tcp://localhost:11211?persistent=1&weight=1&timeout=1&retry_interval=15"
/etc/php-fpm.d/www.conf:225:php_value[session.save_path] = /var/lib/php/session

ls -ld / /var/ /var/lib/ /var/lib/php/ /var/lib/php/session/ /usr/ /usr/tmp/ /usr/tmp/phpSess
Code:
CT-359-bash-4.1# ls -ld / /var/ /var/lib/ /var/lib/php/ /var/lib/php/session/ /usr/ /usr/tmp/ /usr/tmp/phpSess
dr-xr-xr-x 27 root root     4096 Jan 23 22:12 /
drwxr-xr-x 13 root root     4096 Apr 18 03:10 /usr/
drwxrwxrwt  4 root root     4096 Apr 18 04:31 /usr/tmp/
drwxrwxrwx  2 root root   659456 Apr 18 11:27 /usr/tmp/phpSess
drwxr-xr-x 23 root root     4096 Oct  3  2012 /var/
drwxr-xr-x 35 root root     4096 Apr 18 04:36 /var/lib/
drwxr-xr-x  3 root root     4096 Aug 11  2016 /var/lib/php/
drwxrwxrwx  2 root apache 548864 Apr 18 11:27 /var/lib/php/session/

Note: only on 1 Server the /var/lib/php/session Path was 755 - on our other Plesk Servers it's 777 - so maybe there was an Update Issue Plesk 12 --> Onyx on this Server? (not 100% sure which Plesk Version it was before we updated to Onyx ...)
 
Last edited:
Hi futureweb,

pls. note: Outputs from the command line are far better to read in CODE - brackets instead of inside QUOTES in a forum ( and smileys won't appear there ^^ ). ;)

In addition, your output reflects some "misconfigurations" at the vendor "php.ini". Plesk even corrected this by making a backup:
Code:
/etc/php.ini.saved_by_psa:1267:session.save_path = "/var/lib/php/session"
AND
/etc/php.ini.saved_by_psa.05.07;18:11:1268:session.save_path = "/var/lib/php/session"
Code:
/etc/php.ini.saved_by_psa.08.11;19:46:1268:session.save_path = "/usr/tmp/phpSess"
... and afterwards changes it to the correct path.

Afterwards another software/module on your server did some changes:
Code:
/etc/php.ini.fwbak:1268:session.save_path = "/var/lib/php/session"
... so that the current vendor "php.ini" stays at:
Code:
/etc/php.ini:1268:session.save_path = "/usr/tmp/phpSess"


You have an interfering software/module here, not related to Plesk, which misconfigures your vendor php.ini. ;)
 
changed to CODE formatting! :)

weird - on all those Servers there is ONLY Plesk installed - no other Software / special Modules.
But all those Servers has been updated Plesk 12 --> 12.5 --> Onyx. (some of them started even with earlier Versions of Plesk)

Possible the cause can be somewhere within the Upgrades? (only an uneducated guess ...)
 
Possible the cause can be somewhere within the Upgrades? (only an uneducated guess ...)
Sorry, I doubt that... no...

Plesk never used "/usr/tmp/phpSess" as far that I remember since version 8.0 ;)
 
alright - then I have really no clue what is happening here ... hehe ... will investigate further ... thx for taking the time looking into this and sorry for stealing your time! ;-)

Andreas
 
From developers:

Plesk never uses "/usr/tmp/phpSess" as session.save_path - it is manual customization.
Plesk uses session.save_path = "/var/lib/php/session" on all versions of plesk-php.
So request is invalid.
 
Hi futureweb,

to investigate the root cause, consider another "find" search, as for example:
Code:
find / -type f -name "*.*" -exec grep --color -Hni "phpSess" {} \;
( ... will take some time, depending to your disk(s) amounts on your server :p )
 
Back
Top