Селектор PHP не меняет версию PHP
Форум
  1. Forums
  2. CloudLinux and Control Panels
  3. CloudLinux and cPanel
  1. Havri
  2. Tuesday, 20 June 2017
  3.  Subscribe via email
Hello,

I have an issue with PHP Selector where it won't select the correct version.

I just installed a new server with Cloudlinux 7 + cPanel. It runs EA4 + CageFS + PHP Selector. I'm using PHP 7.0 as native EA PHP version. I let users choose the PHP version from PHP Selector.

For the EA4, I installed the Hardened PHP from the Imunify360 settings tab, which gives me PHP 5.3, 5.4, 5.5, 5.6, 7.0 and 7.1 to run as native. As previously mentioned, I keep PHP 7.0 as native. After that, I installed Cloudlinux alt-php and enabled the same versions for PHP Selector (5.3, 5.4, 5.5, 5.6, 7.0 and 7.1).

From WHM -> MultiPHP Manager the MultiPHP Manager works fine and can change the PHP versions instantly. After seeing that it works, I put the account on "Inherited" in the MultiPHP Manager. Going to PHP Selector, when I try to change the version, it just doesn't work. It still shows me the MultiPHP version inherited from the settings in MultiPHP Manager.

Is there a log for me to look at and try to debug this myself? Is there a setting that needs to be checked?

Thank you.
Rate this post:
  1. 20.06.2017 15:06:54
  2. # 1
Bogdan Accepted Answer
Posts: 709
Joined: 26.06.2013
0
Votes
Undo
Hi,

What is on a top of my head is ea-apache24-mod_suexec package. Please check if you have it installed.

If package is there - place simple PHP script to identify if php works as user and if it enter CageFS:

<?php

echo 'Current php process is running as: ';

$processUser = posix_getpwuid(posix_geteuid());
print $processUser['name'];

echo '<br><br> List files in / , compare if same in real filesystem or you see CageFS <br>';
$dir = '/';
$files1 = scandir($dir);
print_r($files1);

?>


Otherwise just create a support ticket with us and we will check your server.
  1. 21.06.2017 11:06:27
  2. # 2
Havri Accepted Answer
Posts: 26
Joined: 30.07.2015
0
Votes
Undo
Hello,

With your tests, I see that the user is somehow not in CageFS. When I issue `cagefsctl --list-enabled`, I get the following:

[[email protected] /]# cagefsctl --list-enabled
1 enabled user(s)
myuser

But when I use your script, the files and folders are the one actually on the server. Should I reinstall CageFS or should I update to the beta version?

[[email protected] /]# rpm -qa | grep cage
cagefs-safebin-6.0-39.el7.cloudlinux.x86_64
cagefs-6.0-39.el7.cloudlinux.x86_64

Also, when I try to access cPanel -> Select PHP Version, it doesn't show me that the user isn't inside Cagefs, although it should.


Regarding suexec, I have the following package installed:

[[email protected] /]# rpm -qa | grep -i suexec
ea-apache24-mod_suexec-2.4.25-9.9.3.cpanel.x86_64

This EA4 profile was installed through the Imunify360 Hardened PHP.

Thank you.
  1. 21.06.2017 12:06:27
  2. # 3
Bogdan Accepted Answer
Posts: 709
Joined: 26.06.2013
0
Votes
Undo
CageFS reinstall will not help, it is something in apache configs.

If you see a right username with my script, however directory list from server / instead of cagefs / - I bet you run RUID2 module which is not supported by CageFS/PHP-Selector .

Check our compatibility matrix: http://docs.cloudlinux.com/index.html?compatiblity_matrix.html
  1. 21.06.2017 13:06:55
  2. # 4
Havri Accepted Answer
Posts: 26
Joined: 30.07.2015
0
Votes
Undo
Hello,

I've never used mod_ruid2 and it wasn't installed with the EA4 profile. I checked the EA4 profile in the WHM interface which was installed through Imunify360 profile and mod_ruid2 is currently not installed on the server. Checking rpm for this package returns zero results:

[[email protected] log]# rpm -qa | grep -i ruid
[[email protected] log]#

Let me know what you think this might be.
  1. 21.06.2017 13:06:58
  2. # 5
Bogdan Accepted Answer
Posts: 709
Joined: 26.06.2013
0
Votes
Undo
Well Ok, it's time to create support ticket with us so we can check your server.
  1. 21.06.2017 13:06:00
  2. # 6
Havri Accepted Answer
Posts: 26
Joined: 30.07.2015
0
Votes
Undo
Hello,

Ok. I opened a ticket.
  1. 26.06.2017 08:06:37
  2. # 7
Havri Accepted Answer
Posts: 26
Joined: 30.07.2015
0
Votes
Undo
Hello,

The Cloudlinux support team found the problem. Suexec was installed from cPanel repos, which meant it didn't have lve support for the user to enter CageFS (so PHP Selector couldn't work). To disable the EA4 repo from cPanel and enable the cloudlinux one, run the following command:

cd ~; wget https://repo.cloudlinux.com/cloudlinux/sources/cloudlinux_ea3_to_ea4; sh cloudlinux_ea3_to_ea4 --convert

This can be found in the documentation here:

http://docs.cloudlinux.com/index.html?cpanel_easyapache_4.html

Also the recommendation was not to install the Hardened PHP profile from the Imunify360 interface, as PHP from Cloudlinux is already patched for security.

Thank you.
  1. 20.04.2018 18:04:02
  2. # 8
Fernando Guerra Accepted Answer
Posts: 0
Joined: 15.09.2019
0
Votes
Undo
Hi,

I experiment this same error, we use in server the follow config:

Cpanel + Cloudlinux (Lve, PHP-Selector, DB-Governor, etc) + EA3, we would to like change from EA3 to EA4, somebody can help me to do this change? some guide to follow?
  1. 23.04.2018 08:04:16
  2. # 9
Posts: 187
Joined: 31.01.2017
0
Votes
Undo
Fernando,

If the steps described at http://docs.cloudlinux.com/index.html?cpanel_easyapache_4.html did not help you, please contact our support by submitting a ticket at https://cloudlinux.zendesk.com
  1. 27.08.2018 16:08:45
  2. # 10
Deepesh Kalawat Accepted Answer
Posts: 0
Joined: 15.09.2019
0
Votes
Undo
[*] Same issue I am having no reply to my ticket :p
  1. 31.08.2018 13:08:58
  2. # 11
Posts: 187
Joined: 31.01.2017
0
Votes
Undo
[*] Same issue I am having no reply to my ticket :p

Please, provide me with a ticket ID so I can track it.
  1. 09.11.2018 22:11:25
  2. # 12
Max Accepted Answer
Posts: 0
Joined: 15.09.2019
0
Votes
Undo
I'm experiencing the same issue second time during past few days. Still trying to figure out why is it happening and how to fix it.
  1. 12.11.2018 19:11:00
  2. # 13
Posts: 187
Joined: 31.01.2017
0
Votes
Undo
Max,

Please, submit a ticket with us at https://cloudlinux.zendesk.com so we can help you with the issue
  • Page :
  • 1


There are no replies made for this post yet.
Be one of the first to reply to this post!
гость
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.