WHM session permissions bug
Forum
  1. Forums
  2. CloudLinux and Control Panels
  3. CloudLinux and cPanel
  1. Ryan
  2. 28.09.2017
  3.  Subscribe via email
There was a WHM 64/66 bug with php session writing, however it looks like it's been fixed. However I'm still seeing evidence of it. I'm posting it here because I'm using CL alt-php with easyapache4 and I think it may have been for WHM users who use the native multiphp, but maybe not alt-php.

I posted a thread on the cpanel forums: https://forums.cpanel.net/threads/whm66-and-open_basedir-issues-with-session-save_path.610011/#post-2475291

Just curious if there is anything about this on CL side. Most notably right now my question is: where are my session files at? phpinfo() says /tmp but there aren't any files there. There also aren't any files in /opt/alt/php71/var/lib/php/session or /var/cpanel/php/sessions/ea-php71.

Ultimately my session are creating properly, but it looks like there is a problem 1% of the time at garbage collection.
Rate this post:
  1. 04.10.2017 19:10:44
  2. # 1
Vladimir Accepted Answer
Posts: 108
Joined: 04.07.2017
0
Votes
Undo
Hello.

session.save_path has been changed since cagefs-6.0-56. For the new installations of Alt-PHP packages session.save_path will be changed from /tmp to /opt/alt/phpNN/var/lib/php/session, where NN corresponds to Alt-PHP version.

But please note, that we virtualized /opt/alt/phpNN/var/lib/php/session directory for each user by means of CageFS.
For example:
# cat /etc/cagefs/cagefs.mp | grep session
@/var/cpanel/php/sessions/ea-php54,700
@/var/cpanel/php/sessions/ea-php55,700
@/var/cpanel/php/sessions/ea-php56,700
@/var/cpanel/php/sessions/ea-php70,700
@/opt/alt/php52/var/lib/php/session,700
@/opt/alt/php53/var/lib/php/session,700
@/opt/alt/php51/var/lib/php/session,700
@/opt/alt/php56/var/lib/php/session,700
@/opt/alt/php44/var/lib/php/session,700
@/opt/alt/php54/var/lib/php/session,700
@/opt/alt/php55/var/lib/php/session,700
@/opt/alt/php70/var/lib/php/session,700
@/opt/alt/php71/var/lib/php/session,700
  1. 10.10.2017 21:10:00
  2. # 2
Ryan Accepted Answer
Posts: 24
Joined: 18.10.2016
0
Votes
Undo
Cool thanks. So I guess I need to manually switch it... which I've done. Those entries were in cagefs.mp

So before I changed it, session path was set to /tmp which actual put them in /home/$user/.cagefs/tmp. However I don't see virtualization directive for /tmp in my cagefs.mp file. So I'm not really sure how it was working at all before. Unless /tmp is special in some way and doesn't need a directive. Maybe this is why garbage collection was having an issue?
  1. 13.09.2018 14:09:40
  2. # 3
Fabian Marsiglione Accepted Answer
Posts: 0
Joined: 28.05.2020
0
Votes
Undo
Hello

I´m having issues with sessions too
Apparently all is ok. For example i have a site with PHP 5.6 (alt56)
The session_save_path in phpinfo appears ok : /opt/alt/php56/var/lib/php/session

But somethign happens.. The php scripts loks like keep the sessions ok between files, but NOT between folders.
When we want to keep the session in different folder it not works
If we force the session_save_path to any folder inside the site, it works, but not working with /opt/alt/php56/var/lib/php/session

some permission issue maybe?

Thanks
Fabian
  1. 14.09.2018 13:09:19
  2. # 4
Vladimir Accepted Answer
Posts: 108
Joined: 04.07.2017
0
Votes
Undo
Hello,

Please submit a ticket to https://cloudlinux.zendesk.com, our techs will check the issue in place.
  1. 14.09.2018 17:09:59
  2. # 5
Fabian Marsiglione Accepted Answer
Posts: 0
Joined: 28.05.2020
0
Votes
Undo
Fixed!!

was other the problem :)

programming issue

Thanks
Fabian
  • Page :
  • 1


There are no replies made for this post yet.
Be one of the first to reply to this post!
Guest
Submit Your Response
Upload files or images for this discussion by clicking on the upload button below. Supports gif,jpg,png,zip,rar,pdf
• Insert • Remove Upload Files (Maximum File Size: 2 MB)
Captcha
To protect the site from bots and unauthorized scripts, we require that you enter the captcha codes below before posting your question.