Announcement

Collapse
No announcement yet.

Process List Shows Native PHP Running When It Isnt

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

  • Process List Shows Native PHP Running When It Isnt

    I have PHP selector on giving my accounts the choice between CLs versions of PHP56, PHP70 and PHP71.

    Most are now on PHP71 and if I pull up a web page to display PHPINFO (temporarily enabled for the purpose) it shows the same version.

    If I disable modules or modify PHP options in the selected version, this is reflected in the behaviour of the account.

    So it appears to all intents and purposes as if the selected PHP version is running.

    But!

    If I create a PHP script in the same account which is set to take a long time to run so I can see it in the process list (ps -ef) or by looking in WHMs interface version of the same, I see it showing that its running under the native PHP 5.6.

    Eg.

    49457 (Trace) (Kill) accountname 0 0.55 0.20 /opt/cpanel/ea-php56/root/usr/bin/php-cgi /home/accountname/public_html/slowphp.php

    The same script outputs PHPINFO which shows:

    PHP Version 7.1.3

    Is this normal? Any thoughts on what the hecks going on?

    TY!

  • #2
    Hello,

    Those files from CageFS inside are actually a symbolic links to right binaries, e.g.:

    Code:
    # su -l bogdan1
    
    [bogdan1@cl7 ~]$ ls -la /opt/cpanel/ea-php56/root/usr/bin/php-cgi
    
    lrwxrwxrwx 1 root root 23 Apr  6 09:05 /opt/cpanel/ea-php56/root/usr/bin/php-cgi -> /etc/cl.selector/ea-php
    
    [bogdan1@cl7 ~]$ ls -la /etc/cl.selector/ea-php
    
    lrwxrwxrwx 1 bogdan1 bogdan1 3 Apr  4 13:57 /etc/cl.selector/ea-php -> php
    
    [bogdan1@cl7 ~]$ ls -la /etc/cl.selector/php
    
    lrwxrwxrwx 1 root root 30 Apr  4 13:57 /etc/cl.selector/php -> /opt/alt/php52/usr/bin/php-cgi
    
    [bogdan1@cl7 ~]$ ls -la /opt/alt/php52/usr/bin/php-cgi
    
    -rwxr-xr-x 1 root 984 3420824 Feb 25 18:13 /opt/alt/php52/usr/bin/php-cgi
    And from outside they are visible as regular EA files instead of alt-php files.

    Comment


    • #3
      Thanks for your reply!

      So this is expected behaviour?

      Does it mean I absolutely have to have the native PHP from cPanel in place in order for it to work, even if not one account/user is still using the native PHP version?

      Comment


      • #4
        Thanks for your reply!

        So this is expected behaviour?

        Does it mean I absolutely have to have the native PHP from cPanel in place in order for it to work, even if not one account/user is still using the native PHP version?

        Comment


        • #5
          For some reason my replies are hidden. You can see them if you hit the quotation mark next to where they should be shown.

          Comment


          • #6
            Last try...

            Thanks for your reply!

            So this is expected behaviour?

            Does it mean I absolutely have to have the native PHP from cPanel in place in order for it to work, even if not one account/user is still using the native PHP version?

            Comment


            • #7
              > Thanks for your reply!
              >
              > So this is expected behaviour?
              >
              > Does it mean I absolutely have to have the native PHP from cPanel in place in order for it to work, even if not one account/user is still using the native PHP version?

              Yes, that is expected behaviour. That is how selector works from CageFS inside. Yes, at least one native php version is required to have things working properly.

              Comment

              Working...
              X