Skip to main content

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

Comments

11 comments

  • Jcats
    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
    0
  • rangka_kacang
    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...
    0
  • Jcats
    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.

    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
    browse to it, 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
    0
  • rangka_kacang
    cPanel > Software > PHP Selector ibb.co/cneWgd WHM > Server Configuration > CloudLinux LVE Manager WHM > Software > MultiPHP Manager 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.
    0
  • Jcats
    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
    0
  • cPanelLauren
    @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:
    0
  • rangka_kacang
    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. 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. ibb.co/cVX9H phpinfo(); results to check if ioncube is enabled or not 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.
    0
  • Jcats
    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: 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? # rpm -qa |grep alt-php72-ioncube-loader
    0
  • rangka_kacang
    ----- 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 -----
    0
  • cPanelLauren
    Hi @rangka_kacang To confirm it's working as intended now?
    0
  • rangka_kacang
    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
    0

Please sign in to leave a comment.