1
votes

I used Putty to install ioncube loader. Used php -v to check and it shows

Zend Engine v2.4.0, Copyright (c) 1998-2014 Zend Technologies with the ionCube PHP Loader (enabled) + Intrusion Protection from ioncube24.com (unconfigured) v5.0.19, Copyright (c) 2002-2015, by ionCube Ltd.

However, I inserted a page with the following code in my website to check:

<?php
phpinfo();
?>

but it doesn't show that ioncube loader is enabled.

I also used:

<?php
echo var_export(extension_loaded('ionCube Loader') ,true);

and it returned false.

My Server API is CGI/FastCGI so I have already included

zend_extension = /usr/local/ioncube/ioncube_loader_lin_5.4.so

in the following file /etc/php5/cgi/php.ini

I wonder if it's really working or not?

2

2 Answers

1
votes

A common mistake over time is having a different major PHP version for CLI and the web server, so perhaps your website does not use PHP 5.4. Another gotcha is using a different php.ini for website and cli, or having a php.ini in the same location as a web request that, on a cgi system, overrides that main php.ini. The web server software or fastcgi pool in this case may also need to be restarted.

0
votes

First of all, go to your terminal and type which php this will show you the directory of the particular php.ini file that is currently being used by the php installed on your computer.

Open the php.ini file and make you have added this line zend_extension = /usr/local/ioncube/ioncube_loader_lin_5.4.so before any other Zend extension is loaded on the php.ini file.

Also note that the ionCube loader ioncube_loader_lin_5.4.so will only for PHP 5.4.* only.

Make sure you have copied the file into the directory you stated, you can verify by tying cd ~ and then sudo find /usr/local/ioncube/ioncube_loader_lin_5.4.so to make sure the file is situated there, if it is the terminal will return the file name showing it found it.

Now save the changes made on your php.ini file and run the command sudo apachectl restart (for Apache servers) to restart your server.

Test with php -v from your terminal again.

Hope this helps.