find php ini file for apache fpm

The ionCube loader is the library used to load ionCube encoded files on the server. It is required to installed on the webserver to decode any ionCube encoded files before running. The ionCube provides a feature to encrypt your PHP script to keep them secure. It also keeps them secure from unauthorized uses.

This tutorial will help you to configure the ionCube loader with PHP on Ubuntu 20.04 Linux system.


We assume you already have PHP installed on your Ubuntu system. If not, you can follow these instructions to install required PHP version.

Step 1 – Download Ioncube Loader

First of all download the latest ioncube loaders php modules from ioncube from ioncube download page. Alternatively you can also use following command to download ioncube loaders. Also extract the downloaded archive under /usr/local directory.

tar xzf ioncube_loaders_lin_x86-64.tar.gz -C /usr/local

Step 2 – Find Correct PHP.ini

It is important to find the correct php configuration file (php.ini) to enable ionCube for that only. The php -i command provides you the details information about the active php version on command line interface.

You can grep the php.ini location by running command:

php -i | grep php.ini

Configuration File (php.ini) Path => /etc/php/7.4/cli
Loaded Configuration File => /etc/php/7.4/cli/php.ini

But, might be Apache have been configured with the another version of the PHP. To find that you need to put a phpinfo(); file on server web server document root.

find php ini file for apache fpm

By default PHP stored configuration files at the following location. For example, the configuration files for the PHP 7.4 are stored at below location

  • /etc/php/7.3/cli/php.ini #for PHP CLI
  • /etc/php/7.3/fpm/php.ini #for PHP FPM
  • /etc/php/7.3/apache/php.ini #for PHP with Apache

Step 3 – Configure ionCube Loader in PHP

Now, edit the required PHP configuration files or you may update in all the configuration files found above. Append the below code to the end of the files based on your PHP version.

 zend_extension = /usr/local/ioncube/

Make sure to replace /usr/local/ioncube/ file path with your matching PHP version file.

Step 4 – Test Configuration

All done. You have added ionCube settings to your php configuration. To verify the configuration, type:

php -v

PHP 7.4.8 (cli) (built: Jul 13 2020 16:46:22) ( NTS )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies
    with the ionCube PHP Loader + ionCube24 v10.4.1, Copyright (c) 2002-2020, by ionCube Ltd.
    with Zend OPcache v7.4.8, Copyright (c), by Zend Technologies

You will see that ionCube PHP loader has been configured with your PHP version. Similarly, to view configuration for Apache use phpinfo() file.


In this tutorial, you have learned to install and configure ionCube PHP Loader on Ubuntu 20.04 Linux system.

The post How To Install ionCube with PHP in Ubuntu 20.04 appeared first on TecAdmin.