Селектор PHP не работает
Форум
  1. Forums
  2. General
  3. General Discussion
  1. Sven Amend
  2. Thursday, 11 December 2014
  3.  Subscribe via email
Hello COmmunity,

i am new on CloudLinux and i would like to install multiple php versions on my hosts an change between this versions using the CloudLinux Tool PHP Selector.

i have done the following Commands on CLoudLinux:


yum install cagefs
/usr/sbin/cagefsctl –init
/usr/sbin/cagefsctl --enable-all
yum install lvemanager
yum groupinstall alt-php
yum update cagefs lvemanager

 the Command Line Tools of PHP Selector changes the PHP versions, but php -v shows the installed php 5.4.35 everytime. What have i done wrong?
Rate this post:
  1. 11.12.2014 12:12:44
  2. # 1
Bogdan Accepted Answer
Posts: 709
Joined: 26.06.2013
0
Votes
Undo
Hello,
do you run \'php -v\' as a user or as root? You change PHP version for user so have to login to user first:

su -l username -s /bin/bash

If it\'s really under user please show as user:

whoami
ls -la /usr/local/bin/php
ls -la /etc/cl.selector/php-cli
ls -la /opt/alt/php*/usr/bin/php
  1. 12.12.2014 02:12:10
  2. # 2
Sven Amend Accepted Answer
Posts: 7
Joined: 11.12.2014
0
Votes
Undo
I have run php -v as root and as specific user but in both situations i became php 5.4.35 as active version but i have selected php 5.5 as default in the lvemanager selector.
  1. 12.12.2014 02:12:06
  2. # 3
Sven Amend Accepted Answer
Posts: 7
Joined: 11.12.2014
0
Votes
Undo
I loged in with my specific user "user1"


whoami:
user1

 ls -la /usr/local/bin/php
-rwxr-xr-x 1 root root 28207732 10. Dez 17:57 /usr/local/bin/php*

 ls -la /etc/cl.selector/php-cli
File or Directory not found

ls -la /opt/alt/php*/usr/bin/php
-rwxr-xr-x 1 root root 1767280 28. Okt 13:13 /opt/alt/php44/usr/bin/php*
-rwxr-xr-x 1 root root 3166824 28. Okt 14:42 /opt/alt/php51/usr/bin/php*
-rwxr-xr-x 1 root root 3475632 28. Okt 15:58 /opt/alt/php52/usr/bin/php*
-rwxr-xr-x 1 root root 4188760 29. Okt 17:36 /opt/alt/php53/usr/bin/php*
-rwxr-xr-x 1 root root 4733856 18. Nov 12:49 /opt/alt/php54/usr/bin/php*
-rwxr-xr-x 1 root root 4925920 18. Nov 11:07 /opt/alt/php55/usr/bin/php*
-rwxr-xr-x 1 root root 4922336 18. Nov 15:08 /opt/alt/php56/usr/bin/php*
  1. 12.12.2014 02:12:36
  2. # 4
Sven Amend Accepted Answer
Posts: 7
Joined: 11.12.2014
0
Votes
Undo
Thread can be closed now the php selector is working correctly, i dont know why it was not working already yesterday
  1. 12.12.2014 04:12:02
  2. # 5
Bogdan Accepted Answer
Posts: 709
Joined: 26.06.2013
0
Votes
Undo
ls -la /usr/local/bin/php
-rwxr-xr-x 1 root root 28207732 10. Dez 17:57 /usr/local/bin/php*
if php version changed for that user this will be a symlink to proper version, but here is regular file. Maybe you did a typo when swiching versions manually, actually if server is without any panels command to run from root is:


selectorctl --set-user-current=5.5 --user=username



Anyway, good to hear it works now.
  • 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.