{"id":101,"date":"2019-09-05T17:44:00","date_gmt":"2019-09-05T17:44:00","guid":{"rendered":"https:\/\/hostup.org\/blog\/?p=101"},"modified":"2021-05-02T22:42:02","modified_gmt":"2021-05-02T22:42:02","slug":"install-ioncube-on-ubuntu-nginx","status":"publish","type":"post","link":"https:\/\/hostup.se\/en\/blog\/install-ioncube-on-ubuntu-nginx\/","title":{"rendered":"How to Install ionCube PHP Loader on Ubuntu &#038; Debian in NGINX"},"content":{"rendered":"\n<p>This tutorial shows you <strong>how to actually<\/strong> install the module ionCube PHP loader in Ubuntu &amp; Debian with the NGINX web server. The reason I am writing this tutorial even though there are many other similar ones is because they do not work. They have missed a step \ud83d\ude1b<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Step 1: Download &amp; Extract ionCube<\/h2>\n\n\n\n<p>Alright so lets download ionCube<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">wget https:\/\/downloads.ioncube.com\/loader_downloads\/ioncube_loaders_lin_x86-64.tar.gz<\/pre>\n\n\n\n<p>Then extract it!<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">tar -xvf ioncube_loaders_lin_x86*<\/pre>\n\n\n\n<p>Next you want to enter it:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">cd ioncube<\/pre>\n\n\n\n<p>Okay so from now on you need to start using your brain a bit :P. First type the command <strong>ls<\/strong> to list the files within the directory.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">ls<\/pre>\n\n\n\n<p>You will see multible similar files but with all of them having a different ending, 5.6, 7.0, 7,3 and so on. These are to your corresponding PHP version. You can check what PHP version you are running by running the following commad<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">php -v <\/pre>\n\n\n\n<p>So if you are using PHP version 7.3 you want to copy that file. But first we need to find out what extension directory you have. To do this:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">php -i | grep extension_dir<\/pre>\n\n\n\n<p>Here&#8217;s an example output:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>extension_dir =&gt; \/usr\/lib\/php\/20180731 =&gt; \/usr\/lib\/php\/20180731<\/code><\/pre>\n\n\n\n<p>\/usr\/lib\/php\/<strong>20180731<\/strong> will be different from mine.<\/p>\n\n\n\n<p>Okay so if you are using PHP version 7.3 you need to copy <strong>ioncube_loader_lin_7.3.so<\/strong> to your extension directory like so:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">cp \/ioncube\/ioncube_loader_lin_7.3.so \/usr\/lib\/php\/20180731<\/pre>\n\n\n\n<script async=\"\" src=\"https:\/\/pagead2.googlesyndication.com\/pagead\/js\/adsbygoogle.js\"><\/script>\n<ins class=\"adsbygoogle\" style=\"display:block; text-align:center;\" data-ad-layout=\"in-article\" data-ad-format=\"fluid\" data-ad-client=\"ca-pub-4376591297601343\" data-ad-slot=\"5387153895\"><\/ins>\n<script>\n     (adsbygoogle = window.adsbygoogle || []).push({});\n<\/script>\n\n\n\n<h2 class=\"wp-block-heading\">Step 2: Add the extension to the php.ini files<\/h2>\n\n\n\n<p>Next you want to add this configuration to both of your  php.ini configuration files. (don&#8217;t forget to replace the extension number with your own)<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>zend_extension = \/usr\/lib\/php\/20180731\/ioncube_loader_lin_7.3.so<\/code><\/pre>\n\n\n\n<p>Add the above configuration to he following files. This should be added right below <strong>[PHP]<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">nano \/etc\/php\/7.3\/cli\/php.ini<\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\">nano \/etc\/php\/7.3\/fpm\/php.ini<\/pre>\n\n\n\n<p>That&#8217;s it! Now all you need to do is to restart NGINX and PHP:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">systemctl restart nginx<\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\">systemctl restart php-fpm<\/pre>\n\n\n\n<p>You can confirm that it has been installed by running<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">php -v<\/pre>\n\n\n\n<p>It should print out something along these lines:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Copyright (c) 1997-2018 The PHP Group\nZend Engine v3.3.8, Copyright (c) 1998-2018 Zend Technologies\n    with the ionCube PHP Loader + ionCube24 v10.3.8, Copyright (c) 2002-2019, by ionCube Ltd.<\/code><\/pre>\n\n\n\n<p>We don&#8217;t have a donation button, but if this post helped you then please consider switching to us. We offer great <a href=\"https:\/\/hostup.org\/vps\" target=\"_blank\" rel=\"noopener\">VPS<\/a> solutions as well! Our servers are located in stockholm, so if you&#8217;re from Sweden feel free to check out our Swedish site too, and grab yourself a <a href=\"https:\/\/hostup.org\/vps\" target=\"_blank\" rel=\"noopener\">Stockholm VPS<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This tutorial shows you how to actually install the module ionCube PHP loader in Ubuntu &amp; Debian with the NGINX web server. The reason I am writing this tutorial even though there are many other similar ones is because they do not work. They have missed a step \ud83d\ude1b Step 1: Download &amp; Extract ionCube [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":145,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[17,10],"tags":[],"class_list":["post-101","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-linux","category-tutorials"],"blocksy_meta":[],"_links":{"self":[{"href":"https:\/\/hostup.se\/en\/blog\/wp-json\/wp\/v2\/posts\/101","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/hostup.se\/en\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/hostup.se\/en\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/hostup.se\/en\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/hostup.se\/en\/blog\/wp-json\/wp\/v2\/comments?post=101"}],"version-history":[{"count":4,"href":"https:\/\/hostup.se\/en\/blog\/wp-json\/wp\/v2\/posts\/101\/revisions"}],"predecessor-version":[{"id":221,"href":"https:\/\/hostup.se\/en\/blog\/wp-json\/wp\/v2\/posts\/101\/revisions\/221"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/hostup.se\/en\/blog\/wp-json\/wp\/v2\/media\/145"}],"wp:attachment":[{"href":"https:\/\/hostup.se\/en\/blog\/wp-json\/wp\/v2\/media?parent=101"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/hostup.se\/en\/blog\/wp-json\/wp\/v2\/categories?post=101"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/hostup.se\/en\/blog\/wp-json\/wp\/v2\/tags?post=101"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}