Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

IonCube Loader 10, ea-php and alt-php confusion

Discussion in 'EasyApache' started by rangka_kacang, Jul 5, 2018.

  1. rangka_kacang

    rangka_kacang Active Member

    Joined:
    Jan 31, 2018
    Messages:
    35
    Likes Received:
    3
    Trophy Points:
    8
    Location:
    Malaysia
    cPanel Access Level:
    Root Administrator
    I'm using CloudLinux 7.5 + cPanel 72.0.7. I got really confused because under:

    WHM > Software > MultiPHP Manager > System PHP Version

    If I select this as ea-php72, my IonCube Loader will work.

    Code:
    # php -v
    
    ea-php-cli Copyright 2017 cPanel, Inc.
    PHP 7.2.6 (cli) (built: Jun 21 2018 16:32:10) ( NTS )
    Copyright (c) 1997-2018 The PHP Group
    Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies
        with the ionCube PHP Loader (enabled) + Intrusion Protection from ioncube24.com (unconfigured) v10.2.0, Copyright (c) 2002-2018, by ionCube Ltd.
        with Zend OPcache v7.2.6, Copyright (c) 1999-2018, by Zend Technologies
    but if I change it back to alt-php72, the IonCube Loader will no longer work.

    Code:
    # php -v
    ea-php-cli Copyright 2017 cPanel, Inc.
    PHP 7.2.7 (cli) (built: Jul  4 2018 08:15:29) ( NTS )
    Copyright (c) 1997-2018 The PHP Group
    Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies
    However, under cPanel > Software > Select PHP Version, the Current PHP version is set to 7.2 and IonCube Loader is enabled there. I'm getting really confused. Why is my cPanel using alt-php72 but my "php -v" is showing 7.2.6 (from the ea-php72).

    I just wanted to set the alt-php72 as the default System PHP Version and make the IonCube Loader 10 to work as well. How and where do set the php.ini? Enabling or disabling the checkbox for IonCube Loader at Server Configuration > Tweak Settings will not do any difference (because when I use alt-php72 as the default system PHP version, nothing will happen but if I use ea-php72 the tweak settings will work. Are you confuse yet? I know, me too. This whole ALT and EA clash is making my life a bit harder. All I want is a simple procedure to make all my future accounts to use alt-php72 by default with IonCube Loader enabled and they can use the PHP selector in cPanel interface (I have already disable the MultiPHP to avoid further confusion).

    Under WHM > Software > MultiPHP Manager, my domain is currently set using alt-php72 but that's weird why the IonCube Loader will not work if I use alt-php72 as the system default version? I need to manually set all other accounts to use alt-php72 to get the IonCube loader to work (or at least use use the 7.2.7 from ALT not 7.2.6 from EA).

    At this point, I'm not sure if I should post this issue to CloudLinux's forum, or under EasyApache category, or CloudLinux category? As you can see, I'd like to completely disable EasyApache MultiPHP and use CloudLinux's PHP Selector only but there's no easy way to do this, they both are working concurrently (just the matter of choosing them in the settings out of personal preferences) and the settings are too much of a burden for a newbie like me to handle, they are everywhere from LVE side, Tweak side, manual php.ini side, cPanel MultiPHP side, PHP Selector side, how how how?

    For reference: I recently run this command yum update alt-php72 --enablerepo=cloudlinux-updates-testing to see if I can get that IonCube Loader 10 to work if I choose alt-php72 as the default system php version but still no luck. Apart from that, I've already run yum install ea-php70-php-ioncube10 and yum install ea-php71-php-ioncube10 but there's isnt any yum install ea-php72-php-ioncube10 in the repo.
     
  2. Jcats

    Jcats Well-Known Member

    Joined:
    May 25, 2011
    Messages:
    720
    Likes Received:
    123
    Trophy Points:
    168
    Location:
    New Jersey
    cPanel Access Level:
    DataCenter Provider
    Yes this can be a bit of a pain because you are dealing with cPanel's MultiPHP and CloudLinux's PHP Selector.

    If you are using PHP-FPM you cannot use Cloudlinux's PHP selector so you may want to scrap PHP selector off the bat if that is the case, unless you plan on only using PHP-FPM for some account and not all.

    If PHP-FPM isn't a worry, then what I would recommend you doing is going into:

    WHM > EasyApache4

    customize the current profile, remove all PHP versions except for one, example PHP 7.0, then select all the extensions you want by default for that one PHP version, save.

    Then go into

    WHM > CloudLinux LVE Manager > Selector

    Set your 'Default php version' to PHP 7.2(not native).

    Then below that, I personally uncheck "native" all together.

    at the very bottom click the "Panel Default" option and click "Save".

    This will select all the PHP extensions you chose for the PHP version in EasyApache.

    You will want to do this for each PHP version there.

    Next, go to

    WHM > MultiPHP Manager

    Make sure you set "System PHP Version" to EA-PHP70 (or whichever EA version you chose in EasyApache).

    Make sure ALL cPanel accounts are set to the inherited version of PHP. This will make sure all cPanel accounts are now only able to use PHP versions from Cloudlinux's PHP Selector.

    I would also go to

    WHM > Feature Manager

    Edit your default and other feature list's that you use and disable both the:

    MultiPHP INI Editor
    MultiPHP Manager

    This way people don't get confused with how they should be changing PHP versions and options.

    So if you want to change the PHP version, enable/disable PHP extensions, and change PHP options like upload size, max execution time, etc, this is now all only from one single icon in cPanel:

    "Select PHP Version"

    Lastly, after all this is said and done, you might actually have issues with some accounts with missing extensions as Cloudlinux won't reset the extensions for the accounts even though you've set the default options so you may need to do them manually, especially the ones you require Ioncube for. If you have lots of accounts, you can reset them via SSH like so

    CloudLinux Documentation ( --reset-user-extensions )

    Code:
    for i in $(\ls /var/cpanel/users) ; do selectorctl --reset-user-extensions --version=7.0 --user=$i ; done
    That would reset all users extensions to use the default list you chose in EA for PHP 7.0, but just replace 7.0 with 7.2 as well if needed.

    That should about do it!
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. rangka_kacang

    rangka_kacang Active Member

    Joined:
    Jan 31, 2018
    Messages:
    35
    Likes Received:
    3
    Trophy Points:
    8
    Location:
    Malaysia
    cPanel Access Level:
    Root Administrator
    Hi there, thank you so much for the prompt reply and heads up. However what you suggested above is exactly my current setup.

    I just want to know how do I enable the IonCube Loader 10 extension if I choose alt-php72 as my default system php version. Right now the IonCube Loader is only available if I set the default system PHP version to ea-php72 but what makes me confuse is the domain in my MultiPHP setup is actually alt-php72 but when I do #php -v in my ssh it will show the php setup from the ea-php72 (7.2.6) not alt-php72 (7.2.7) because it doesnt have the IonCube loader as seen in the code on my first post...
     
  4. Jcats

    Jcats Well-Known Member

    Joined:
    May 25, 2011
    Messages:
    720
    Likes Received:
    123
    Trophy Points:
    168
    Location:
    New Jersey
    cPanel Access Level:
    DataCenter Provider
    Go in to the cPanel account, click "Select PHP Version", you will see all the extensions here.

    Is Ioncube checked?

    Also:

    Create a PHP script like 'i.php' in the domains public_html and enter in

    Code:
    <?php phpinfo(); ?>
    browse to it, http://domain.com/i.php

    What PHP version does it show, and what's it say for:

    Code:
    Configuration File (php.ini) Path  
    Loaded Configuration File  
    Scan this dir for additional .ini files
    Additional .ini files parsed

    That is the rpm for the cPanel MultiPHP extensions. You want the extensions enabled from Cloudlinux which wouldn't be done via yum as all those extensions are installed automatically when you run

    Code:
    yum groupinstall alt-php
    to enable extensions that are not enabled by default, you do that in the cPanel account itself via the "Select PHP Version".

    Again, don't set the PHP version in WHM > MultiPHP Manager, leave it set to the inherited PHP version.

    Then set the PHP version in cPanel > Select PHP Version

    although it should default to PHP 7.2 if that is what you set in WHM > CloudLinux LVE Manager > Selector
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  5. rangka_kacang

    rangka_kacang Active Member

    Joined:
    Jan 31, 2018
    Messages:
    35
    Likes Received:
    3
    Trophy Points:
    8
    Location:
    Malaysia
    cPanel Access Level:
    Root Administrator
    cPanel > Software > PHP Selector
    [​IMG]

    WHM > Server Configuration > CloudLinux LVE Manager
    [​IMG]

    WHM > Software > MultiPHP Manager
    [​IMG]

    Regarding the phpinfo(); I've done that too and it didn't help much because I'm actually checking the extension from the command line #php -v it will eventually print the same needed info regarding which enabled extension... The IonCube Loader extension is only enabled if I use ea-php72 as the system default php (even the domain is currently showing alt-php72 in MultiPHP Manager). However, if I use alt-php72, the IonCube Loader is not enabled which means the IonCube Loader is not loaded if I use alt-php72. Also, I've executed yum groupinstall alt-php.

    Should I just ignore the settings in MultiPHP Manager after all, this the the main reason for the whole confusion? I don't know how to explain my situation anymore.
     
    #5 rangka_kacang, Jul 6, 2018
    Last edited: Jul 6, 2018
  6. Jcats

    Jcats Well-Known Member

    Joined:
    May 25, 2011
    Messages:
    720
    Likes Received:
    123
    Trophy Points:
    168
    Location:
    New Jersey
    cPanel Access Level:
    DataCenter Provider
    Using php cli will not show the actual version of PHP being used for that account unless you are logged in as that cPanel user.

    If you are running it as root, it will show the binary for the inherited version of PHP set in MultiPHP.

    I am aware of the issue with Ioncube when you are using alt-php72, no need to restate.

    Can you set the version in MultiPHP to the inherited version of PHP. Yes it shouldn't matter and should work by selecting alt-php72 in MultiPHP but to keeps things 'orderly' do it this way, and then please paste the output from the phpinfo script for the location of the php.ini
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
    cPanelLauren likes this.
  7. cPanelLauren

    cPanelLauren Forums Analyst II
    Staff Member

    Joined:
    Nov 14, 2017
    Messages:
    3,517
    Likes Received:
    251
    Trophy Points:
    193
    Location:
    Houston
    cPanel Access Level:
    DataCenter Provider
    @Jcats is correct in this, the output from the phpinfo script would be extremely useful as well. If you don't know how to create one you can do so by creating a new file in the root directory of your domain for easiness name it phpinfo.php with the following contents:

    Code:
    <?php
    
    phpinfo();
    
    ?>
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  8. rangka_kacang

    rangka_kacang Active Member

    Joined:
    Jan 31, 2018
    Messages:
    35
    Likes Received:
    3
    Trophy Points:
    8
    Location:
    Malaysia
    cPanel Access Level:
    Root Administrator
    I guess you're right. the #php -v is showing the current php used by root but it will also affect users with inherit in MultiPHP.

    [​IMG]

    I changed the version in MultiPHP to inherit however the ioncube is only enabled if i set the system default PHP to use ea-php72 instead of alt-php72... no ioncube in alt-php72 (even after i check the ioncube extension in php selector) as seen in the phpinfo(); screenshot below.

    [​IMG]

    phpinfo(); results to check if ioncube is enabled or not

    [​IMG]

    For system PHP version ---> alt-php72
    Configuration File (php.ini) Path /opt/alt/php72/etc
    Loaded Configuration File /opt/alt/php72/etc/php.ini
    Scan this dir for additional .ini files /opt/alt/php72/link/conf
    Additional .ini files parsed /opt/alt/php72/link/conf/default.ini
    (can't find ioncube extension in the phpinfo)

    For system PHP version ---> ea-php72
    Configuration File (php.ini) Path /opt/alt/php72/etc
    Loaded Configuration File /opt/alt/php72/etc/php.ini
    Scan this dir for additional .ini files /opt/alt/php72/link/conf
    Additional .ini files parsed /opt/alt/php72/link/conf/alt_php.ini
    (ioncube extension is enabled here)

    Edit:

    Let me rewrite my sentence.

    I can't get IonCube loader to work on alt-php72 if it is set as the default system php version in WHM. However, if I use ea-php72 as the default system php version, the IonCube will work and enabled. This is confirmed by checking phpinfo(); for each alt-php72 or ea-php72. For your information: alt-php70 and alt-php71 also doesn't have IonCube loader but ea-php70 and ea-php71 have. The server is currently supporting PHP 7.0,7.1,7.2 and dropped support for PHP 5. But this whole alt-ea thingy is making me confused. For now, I just want to set the default system php version to alt-php72 while enabling IonCube Loader as well. That's all I want to do. If I can get this done, I'll rest my case... Btw, I can't uninstall ea-php70, ea-php71, ea-php72 all together I need to have at least a single ea-php version installed. I want to drop support for EasyApache totally and focus on CloudLinux's alt-php only.

    Thank you and sorry for the trouble. My English isn't that easy to understand as well... I hope you pardon me.
     
    #8 rangka_kacang, Jul 6, 2018
    Last edited: Jul 6, 2018
  9. Jcats

    Jcats Well-Known Member

    Joined:
    May 25, 2011
    Messages:
    720
    Likes Received:
    123
    Trophy Points:
    168
    Location:
    New Jersey
    cPanel Access Level:
    DataCenter Provider
    I actually understand what you are saying and have understood it since your very first post,but in order to really assist, need to get certain info from you first, and try to ensure things are in a state that makes it easier to rule certain things out.

    I am confused by your screenshot that shows Native PHP 7.2 while being able to select PHP extensions. Normally if using Native, you cannot change PHP extensions since PHP selector is relying on what is prebuilt in EA.

    Can you change the dropdown to just "7.2" (making sure to click "Set as current" after you select 7.2) in cPanel and leave MultiPHP in WHM set to inherit.

    I would then run the following:

    Code:
    cagefsctl --force-update
    Any change?

    Would also check the home directory and public_html for any php.ini / .user.ini's

    rename them if so.

    The rpm exists?

    Code:
    # rpm -qa |grep alt-php72-ioncube-loader
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
    rangka_kacang and cPanelLauren like this.
  10. rangka_kacang

    rangka_kacang Active Member

    Joined:
    Jan 31, 2018
    Messages:
    35
    Likes Received:
    3
    Trophy Points:
    8
    Location:
    Malaysia
    cPanel Access Level:
    Root Administrator
    -----

    Yes, I'm actually confused too (not sure how I got that just now, most probably from some caching the phpinfo() also needs awhile to refresh after I restarted apache) but it's ok now. I can use the PHP Selector normally and choose which version I want if I set the system php version to either ea-php72 or alt-php72 (since it's inherit now --- it will use the same php as the system default choosen in WHM). It was probably set to native before i change the account to use "inherit"...

    Let's say if I use ea-php72 as the system php version, the rest of the inherited accounts will use ea-php72 with IonCube loader enabled but if I use alt-php72 as the system php version, the rest of the inherited account will use alt-php72 without IonCube loader.

    Edit: regarding the "native screenshot" it was due to

    system default PHP version is alt-php. PHP Selector is disabled. Use cPanel MultiPHP manager instead.

    because I use alt-php72 as the system default. So, now I understand, I must use ea-php as the system default in order for me to be able to use the PHP selector. Ahh, I'm almost giving up....

    -----

    I've updated cagefsctl --force-update

    Also, there's no php.ini or user.ini in the public_html directory.

    -----

    # rpm -qa |grep alt-php72-ioncube-loader
    alt-php72-ioncube-loader-10.2.0-1.el7.cloudlinux.x86_64

    -----
     
    #10 rangka_kacang, Jul 6, 2018
    Last edited: Jul 6, 2018
  11. cPanelLauren

    cPanelLauren Forums Analyst II
    Staff Member

    Joined:
    Nov 14, 2017
    Messages:
    3,517
    Likes Received:
    251
    Trophy Points:
    193
    Location:
    Houston
    cPanel Access Level:
    DataCenter Provider
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  12. rangka_kacang

    rangka_kacang Active Member

    Joined:
    Jan 31, 2018
    Messages:
    35
    Likes Received:
    3
    Trophy Points:
    8
    Location:
    Malaysia
    cPanel Access Level:
    Root Administrator
    UPDATE: I finally got everything sorted out.

    Thank you so much for the guidance. Here's what I did.

    1. Home » Software » MultiPHP Manager
    System PHP Version is set to ea-php72

    In order to use PHP Selector in cPanel, I need to set the system default to ea-* instead of alt-* otherwise the PHP Selector will not work. Thus, selecting PHP version as 7.0, 7.1, 7.2 will give me the working PHP with IonCube Loader enabled if using the PHP Selector.

    2. Thank you for the "inherit" trick. In MultiPHP Manager, all the domains are using "inherit" with system default as "ea-php72". I can then use the PHP Selector in cPanel to choose my preferred PHP version (alt-php70, alt-php71, or alt-php72). I have double-checked all of these alt-* have IonCube Loader enabled.

    3. Most probably after I cagefsctl --force-update, the problem is solved.

    I hope you guys can improve more on UI/UX so that it's easier to understand especially for those non-native speaking or non-technical customer to manage. Also, this will not be an issue if I only use either ALT or EA. I didn't get this problem when I use CentOS but got confused with CloudLinux's alt/php selector stuff although the interface and features are better than of EasyApache...

    @Jcats I'll certainly buy you a beer if you happened to be near my place. Cheers, man!

    p/s It happens that I've asked this question 5 months ago (just that this time it's about IonCube Loader).
     
    #12 rangka_kacang, Jul 6, 2018
    Last edited: Jul 6, 2018
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice