How to Install phpBolt Loader in CentOS 7

phpBolt is a free software suite consisting of a PHP encoder, package foundry, bundler, a real time site intrusion detection and error reporting application as well as a loader.

PHP encoder is an application for PHP software protection: used to secure, encrypt and license PHP source code. phpBolt loader is an extension used to load PHP files protected and encoded using PHP encoder. It is mostly used in commercial software applications to protect their source code and prevent it from being visible.

In this article, we will show how to install and configure phpBolt Loader with PHP in CentOS 7 and RHEL 7 distributions.

Prerequisites:

Your server must have a running web server (Apache or Nginx) with PHP installed. If you don’t have a web server and PHP on your system, you can install them using yum package manager as shown.

Step 1: Install Apache or Nginx Web Server with PHP

1. If you already have a running web server Apache or Nginx with PHP installed on your system, you can jump to the Step 2, otherwise use the following yum command to install them.

-------------------- Install Apache with PHP --------------------
# yum install httpd php php-cli	php-mysql

-------------------- Install Nginx with PHP -------------------- 
# yum install nginx php php-fpm php-cli	php-mysql

 

2. After installing Apache or Nginx with PHP on your system, start the web server and make sure to enable it to auto start at system boot time using following commands.

-------------------- Start Apache Web Server --------------------
# systemctl start httpd
# systemctl enable httpd

-------------------- Start Nginx + PHP-FPM Server --------------------
# systemctl start nginx
# systemctl enable nginx
# systemctl start php-fpm
# systemctl enable php-fpm

 

Step 2: Download phpBolt Loader

3. Go to the phpbolt website and download the bolt.so file, but before that first you need to check whether your system is running on 64-bit or 32-bit architecture using the following command.

# uname -a

Linux appteam.it 3.10.0-1127.el7.x86_64 #1 SMP Tue Mar 31 23:36:51 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux

 

The above output clearly shows that the system is running on 64-bit architecture.

As per your Linux system architecture type download the phpBolt loader files into /tmp directory using following wget command.

-------------------- For 64-bit System --------------------
# cd /tmp
# wget https://phpbolt.com/wp-content/uploads/2019/09/phpBolt-extension-1.0.1.zip

-------------------- For 32-bit System --------------------
# cd /tmp
# wget https://phpbolt.com/wp-content/uploads/2019/09/phpBolt-extension-1.0.1.zip

 

4. Then unzip the downloaded file using the tar command and move into the decompressed folder. Then run the ls command to list the numerous phpBolt loader files for different PHP versions.

# unzip phpBolt-extension-1.0.1.zip
# cd phpBolt-extension-1.0.1/
$ ls -l

 

Output:

[root@sv0 phpBolt-extension-1.0.1]# ls -l
totale 0
drwxr-xr-x 6 root root 120 9 set 2019 linux 32
drwxr-xr-x 6 root root 120 9 set 2019 linux 64
drwxr-xr-x 5 root root 100 9 set 2019 mac-64
drwxr-xr-x 6 root root 140 9 set 2019 windows x64

 

Step 3: Install phpBolt phpBolt for PHP

5. There will be different phpBolt loader files for various PHP versions, you need to select the right phpBolt loader for your installed PHP version on your server. To know the php version installed on your server, run the command.

php -v

 

Output:

[root@sv0 phpBolt-extension-1.0.1]# php -v
PHP 7.3.17 (cli) (built: Apr 14 2020 08:29:22) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.3.17, Copyright (c) 1998-2018 Zend Technologies
    with the ionCube PHP Loader + ionCube24 v10.3.9, Copyright (c) 2002-2019, by ionCube Ltd.

 

The above output clearly shows that the system is using PHP 7.3.17 version, in your case it should be different version.

6. Next, find the location of the extension directory for PHP version 7.3.17, it is where the phpBolt loader file will be installed. From the output of this command, the directory is /usr/lib64/php/modules.

# php -i | grep extension_dir

extension_dir => /usr/lib64/php/modules => /usr/lib64/php/modules

 

7. Next we need to copy phpBolt loader for our PHP 7.3.17 version to the extension directory (/usr/lib64/php/modules).

cp /tmp/phpBolt-extension-1.0.1/"linux 64/"linux 64 - php73"/bolt.so /usr/lib64/php/modules/bolt_loader_lin_7.3.so

 

Note: Make sure to replace the PHP version and extension directory in the above command according to your system configuration.

Step 4: Configure phpBolt Loader for PHP

8. Now we need to configure phpBolt loader to work with PHP, in the php.ini file.

# vim /etc/php.ini

 

[PHP]
extension = /usr/lib64/php/modules/bolt_loader_lin_7.3.so
;;;;;;;;;;;;;;;;;;;
; About php.ini ;
;;;;;;;;;;;;;;;;;;;
; PHP's initialization file, generally called php.ini, is responsible for
; configuring many of the aspects of PHP's behavior.

Note: Make sure to replace the extension directory and PHP version in the above command according to your system configuration.

9. Then save and exit the file. Now we need to restart the Apache or Nginx web server for the phpBolt loaders to come into effect.

-------------------- Start Apache Web Server --------------------
# systemctl restart httpd

-------------------- Start Nginx + PHP-FPM Server --------------------
# systemctl restart nginx
# systemctl restart php-fpm

Step 5: Test phpBolt Loader

Sample Encrypted File

Download sample encrypted php file for testing. It is “hello world” program.

Encryption key: kyc7fh

I added following code in mycode.php file.

<?php echo 'hello world'; 

 

Download encrypted file

 

 

 

 

 

Impostazioni sulla privacy salvate!
GDPR Center

When you visit a website, it can store or retrieve information on your browser, mainly in the form of cookies. Check your personal cookie services here.

Questi cookie sono necessari per il funzionamento del sito Web e non possono essere disattivati nei nostri sistemi.

Usiamo WooCommerce come sistema di acquisto. Per l'elaborazione del carrello e dell'ordine verranno memorizzati 2 cookie. Questi cookie sono strettamente necessari e non possono essere disattivati.
  • woocommerce_cart_hash
  • woocommerce_items_in_cart

Rifiuta tutti i servizi
Accetta tutti i servizi

Menu principale