Announcement

Collapse
No announcement yet.

PHP Selector not working

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • PHP Selector not working

    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?

  • #2
    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:

    Code:
    su -l username -s /bin/bash
    If its really under user please show as user:

    Code:
    whoami
    
    ls -la /usr/local/bin/php
    
    ls -la /etc/cl.selector/php-cli
    
    ls -la /opt/alt/php*/usr/bin/php

    Comment


    • #3
      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.

      Comment


      • #4
        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*

        Comment


        • #5
          Thread can be closed now the php selector is working correctly, i dont know why it was not working already yesterday

          Comment


          • #6
            > 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:

            Code:
            selectorctl --set-user-current=5.5 --user=username
            Anyway, good to hear it works now.

            Comment

            Working...
            X