How to install ioncube loader on easyengine + php 7

I need to test chat engine from arrowchat and as usual I try to document the process in this blog. Arrowchat provide trial for 10 days. This version encrypted with ioncube and the server need to use ioncube loader.

I learn the hard way just to try arrowchat install display 🙂

ee site create chat.score.com –mysql –php7

Remove php 5.6 from system

ee stack remove –php

Check running php process :
ps ax | grep php
1068 ?        Ss     0:00 php-fpm: master process (/etc/php/7.0/fpm/php-fpm.conf)

Copy file .so

ls /usr/lib/php/
20121212  20131226  20151012  20160303  7.0  php-helper  php-maintscript-helper  php7.0-fpm-reopenlogs  session-clean

ls /usr/lib/php/20160303/

igbinary.so  imagick.so  memcache.so  memcached.so  msgpack.so  redis.so  xdebug.so

Send ioncube lader

scp Downloads/ioncube/ioncube_loader_lin_7.0.so root@ip:/root

mv /root/ioncube_loader_lin_7.0.so /usr/lib/php/20160303/

php.ini add in last one :

nano nano /etc/php/7.0/fpm/php.ini

zend_extension = /usr/lib/php/20160303/ioncube_loader_lin_7.0.so

restart nginx and friends

ee stack restart

PHP5.6-FPM is not installed
Restart : nginx     [OK]
Restart : php7.0-fpm[OK]
Restart : mysql     [OK]
Restart : postfix   [OK]

Upload arrowchat

scp Downloads/arrowchat_trial_v2.0.1.zip root@ip:/root

mv /root/arrowchat_trial_v2.0.1.zip .

cat ../ee-config.php

<?php
define(‘DB_NAME’, ‘chat_score_com’);
define(‘DB_USER’, ‘chat_score_com’);
define(‘DB_PASSWORD’, ‘yMlgjwRHUDpQv23’);
define(‘DB_HOST’, ‘localhost’);

tail -f ../logs/error.log
2017/04/18 03:34:56 [error] 2404#0: *28 FastCGI sent in stderr: “PHP message: PHP Fatal error:  The file /var/www/chat.score.com/htdocs/arrowchat/index.php was encoded by the ionCube Encoder for PHP 5.0 and cannot run under PHP 7.0.
Please ask the provider of the script to provide a version encoded with the ionCube Encoder for PHP 5.6. in Unknown on line 0” while reading response header from upstream, client: 36.77.133.96, server: chat.score.com, request: “GET /arrowchat/ HTTP/1.1”, upstream: “fastcgi://127.0.0.1:9070”, host: “chat.score.com”

Reinstall php 5.6

ee stack install –php

Remove php 7.0

ee stack remove –php7

PHP 7.0 not supported.
Are you sure you to want to remove from server.
Package configuration will remain on server after this operation.
Any answer other than “yes” will be stop this operation :  yes
Removing packages, please wait…
Successfully removed packages
PHP5.6-fpm found on system.
Verifying and installing missing packages,

Reupload ioncube for php 5.6

scp Downloads/ioncube/ioncube_loader_lin_5.6.so root@ip:/root

mv /root/ioncube_loader_lin_5.6.so /usr/lib/php/20151012/

edit php.ini

nano /etc/php/5.6/fpm/php.ini

zend_extension = /usr/lib/php/20151012/ioncube_loader_lin_5.6.so

Restart nginx

ee stack restart –nginx
Restart : nginx     [OK]

Update php version to old one

ee site update chat.score.com –php7=off

Summary :

If you want to try arrowchat then you’ll need make sure that you use php 5.6 🙂 . NO php 7 support at this moment.