CyberPanel Community

ClosedPhp 8.1 ioncube extension

th
thecreator #1

Hi I couldn’t find the ioncube extension for php 8.1 in my cyberpanel. How can I install?

36 replies
th
thecreator #3

Hello, thanks for your reply.
I tried the below command but it didn’t work.

bash <(curl -Ls https://raw.githubusercontent.com/erenaksoy/lsws-ioncube-installer/main/install.sh)
za
zaku #4

read below post to get it work

th
thecreator #5

Which article are you talking about?
I read all the posts, but I can’t solve this error.

jo
josephgodwinke #6

@zaku here is the solution

Check your extension directory for your default assuming php 8.1 is default php -v

php -i | grep extension_dir

Try this :

sh <(curl https://raw.githubusercontent.com/josephgodwinkimani/cyberpanel-mods/main/php_ioncube_install.sh || wget -O - https://raw.githubusercontent.com/josephgodwinkimani/cyberpanel-mods/main/php_ioncube_install.sh)

Confirm using php -v you wil get something like:

PHP 7.4.33 (cli) (built: Nov  3 2022 07:46:18) ( NTS )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies
    with the ionCube PHP Loader + ionCube24 v12.0.3, Copyright (c) 2002-2022, by ionCube Ltd.
    with Zend OPcache v7.4.33, Copyright (c), by Zend Technologies
jo
josephgodwinke #8

Now i get you. You are using CentOs. Here is a fix for you:

$ cd ~ && wget https://downloads.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.tar.gz

$ tar -xvf ioncube_loaders_lin_x86-64.tar.gz

$ cp --verbose ioncube/ioncube_loader_lin_8.1.so /usr/local/lsws/lsphp81/lib64/php/modules/

$ echo "zend_extension=ioncube_loader_lin_8.1.so" >> /usr/local/lsws/lsphp81/etc/php.d/01-ioncube.ini

$ service lsws restart && service lscpd restart 
th
thecreator #9

File error message.

jo
josephgodwinke #10

I have edited that line please check again.

That path is for ubuntu distros only

th
thecreator #11

I am using CentOs 7. Again the file error output.

jo
josephgodwinke #12

Post the contents of ls /usr/local/lsws/lsphp81/

th
thecreator #13
bin etc include lib64 man share tmp
jo
josephgodwinke #14

Post the contents of ls /usr/local/lsws/lsphp81/etc/

th
thecreator #15
php.d php.ini php.ini.rpnew
jo
josephgodwinke #16

Post the contents of ls /usr/local/lsws/lsphp81/etc/php.d/

jo
josephgodwinke #18

Do you have 01-ioncube.ini in that list?

If you do rUn

echo "zend_extension=ioncube_loader_lin_8.1.so" >> usr/local/lsws/lsphp81/etc/php.d/01-ioncube.ini 
th
thecreator #19

No 01-ioncube.ini does not exist.

jo
josephgodwinke #20

Run

$ cd ~ && cp --verbose ioncube/ioncube_loader_lin_8.1.so /usr/local/lsws/lsphp81/lib64/php/modules/

za
zaku #21

need slash before usr > /usr
echo “zend_extension=ioncube_loader_lin_8.1.so” >> /usr/local/lsws/lsphp81/etc/php.d/01-ioncube.ini

th
thecreator #22

I did it now but no output. What’s next?

jo
josephgodwinke #23

Thanks @zaku for your input on the silly mistake

echo "zend_extension=ioncube_loader_lin_8.1.so" >> /usr/local/lsws/lsphp81/etc/php.d/01-ioncube.ini

service lsws restart && service lscpd restart 
th
thecreator #24

I did, there is no output, but there is no error.
And I restarted the service.

Does it need to work now? I couldn’t find it in php extensions in cyberpanel.

jo
josephgodwinke #25

RUn this php file under the website you are using php8.1

<?php
if(extension_loaded("IonCube Loader")) {     
  echo "IonCube Loader is Installed";
}
else {
  // No
}
?>
jo
josephgodwinke #26


Kindly consider Ubuntu 20.04 LTS or AlmaLinux 8.4 they are more stable with CyberPanel.

th
thecreator #27

I set the php version of the website I am using to 8.1. When I did this before, I was getting the warning that ioncube installation is required. But now the error is:

“Oops!
Something went wrong and we couldn’t process your request.
Please go back to the previous page and try again.”

Error: Call to a member function cssInjector() on null in

(The website works fine in version 7.4.)

Setting up a server from scratch right now will take some time, but I’ll do it at the appropriate time.

jo
josephgodwinke #28
“Oops!
Something went wrong and we couldn’t process your request.
Please go back to the previous page and try again.”

Error: Call to a member function cssInjector() on null in

Looks like a drupal, or whichever php framework/cms you are using, only issue. I always recommend my clients to use PHP7.4 and below. PHP8-8.1 has not been fully tested for production in my perspective. It is still buggy.

Have you tried to fix permissions for that website?

th
thecreator #29

Now I tried to fix the permissions but it didn’t work. I guess I need to ask the software developer the reason for this error as well.

How can I verify that the ionCube installation has been successfully installed? I couldn’t find this from the cyberpanel php extensions page. I will send it to the software developer.

jo
josephgodwinke #30
za
zaku #31

easiest way to check

/usr/local/lsws/lsphp81/bin/php -v

# /usr/local/lsws/lsphp81/bin/php -v
PHP 8.1.12 (cli) (built: Oct 25 2022 17:30:00) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.1.12, Copyright (c) Zend Technologies
    with the ionCube PHP Loader v12.0.3, Copyright (c) 2002-2022, by ionCube Ltd.
    with Zend OPcache v8.1.12, Copyright (c), by Zend Technologies
th
thecreator #32

This file did not work;
“This page isn’t working”

jo
josephgodwinke #33


Great confirms it is installed succesfully.

th
thecreator #34

So why is the php file not working?
Could I have done wrong somewhere?

jo
josephgodwinke #35

Let me test it. It should actually work. But if you are running another framework in same path it may refuse to read that file

th
thecreator #36

Thanks again for your help.
Have a nice day.

Sign in to reply