https://help.superhosting.bg/en/php-extension-activation.html
  • bg
  • en

Hosting, Domains, Cloud, Virtual Private Servers (VPS), Managed VPS, SSL Certificates

How to Enable a PHP Module/Extension in Your Hosting Account?

PHP
php.ini, php extension php.ini, activate php extensio, enable php extension

Enabling a PHP module via PHP Manager by SuperHosting

info-iconPHP modules can easily be activated and deactivated through PHP Manager by SuperHosting in cPanel.

PHP modules with all Linux hosting plans are managed through cPanel -> "PHP Manager by SuperHosting" -> PHP modules management section. After the modifications in PHP Manager are performed, the new PHP settings will apply for the entire account and all hosted websites.

Enabling a PHP module through php.ini file link-to-this-section

To activate a PHP module/extension manually, you can use the php.ini file.

Depending on the PHP protocol handler of the hosting account, activation instructions might vary. You first need to check whether the CGI or FastCGI protocol is used.

For your convenience we have created a script to clarify protocol details, as well as instructions for directives and modules configuration. The script name is php.php and you can download it here. Upload the script to the website directory where settings will be configured. Then run it through a web browser as follows:

http://mysupersite.com/php.php

Replace mysupersite.com with your domain name.

This hosting account uses the FastCGI protocol handler for PHP

You will find a system php.ini file named php-fcgi.ini in your account's home directory. Use the File manager or Text editor to modify the file. Add the following line to the file:

php-fcgi.ini
extension=phpmodule.so
Replace phpmodule with the name of the PHP module that has to be enabled.

info-iconImportant: This line is different for the Zend Guard Loader and IonCube Loader modules and it changes depending on the active PHP version. You can find the respective lines in the supported PHP modules list.

To apply the php-fcgi.ini file for the hosting account, you first need to specify it in the php.fcgi file.

Check if there is such a file in the account's home directory. In case it does not exist, you should create it. Important: The php.fcgi file must have 755 permissions. Make sure the file contains the following lines. If it does not, add them manually:

php.fcgi
#!/bin/bash
DEFAULTPHPINI=/home/cpaneluser/php-fcgi.ini
exec /usr/bin/php -c ${DEFAULTPHPINI}
Replace cpaneluser with your cPanel username.

To apply the changes to the entire hosting account, make sure the .htaccess file in the home directory contains the following lines: If it does not, add them manually:

.htaccess
<IfModule mod_fcgid.c>
AddHandler fcgid-script .php
FcgidWrapper /home/cpaneluser/php.fcgi .php
</IfModule>
Replace cpaneluser with your cPanel username.

Then check if the PHP module is enabled by using the phpinfo() function.

This hosting account uses a CGI handler protocol for PHP

You will find a system php.ini file named php-fcgi.ini in your account's home directory. Use File manager or Text editor to modify the file. Add the following line to the file:

php.ini
extension=phpmodule.so
phpmodule – replace this with the name of the PHP module that has to be enabled.

info-iconImportant: This line is different for the Zend Guard Loader and IonCube Loader modules and it changes depending on the active PHP version. You can find the respective lines in the supported PHP modules list.

By default the php.ini file is applied only for the directory where it is located. To apply changes to the entire hosting account, make sure that the .htaccess file in the home directory contains the following lines. If it does not, add them manually:

.htaccess
<IfModule mod_env.c>
SetEnv PHPRC /home/cpaneluser/php.ini
</IfModule>
Replace cpaneluser with your cPanel username.

Then check if the PHP module is enabled by using the phpinfo() function.

info-iconNote: In case you experience any difficulties with configuration, do not hesitate to contact SuperHosting.BG technical support team.

500px270px
SuperHosting.BG
    PHP
  • PHP Manager by SuperHosting
    In cPanel you can change the PHP settings for all hosting plans offered by SuperHosting.BG. You can change the PHP version, enable or disable PHP modules and change PHP directives. This... »
  • How to View My PHP Settings (Version, Directives, Modules)?
    For the PHP directives there are system values set by default. You can get information about them by calling the phpinfo() function. By using phpinfo you can view the PHP version, enabled PHP... »
  • PHP Modules (PHP Extensions)
    PHP modules are extensions mostly written in C language. They can be compiled with PHP to enable static loading (as part of the binary file) or dynamic loading (with the... »
  • How to Install and Use a PEAR Package?
    To start using a PEAR Package, first install it into your hosting account and then enable it for the PHP application/script. Installing a PEAR Package Automatic Installation in cPanel PEAR Packages are automatically... »
  • PEAR Packages
    PEAR (PHP Extension and Application Repository) is a framework and distribution system for reusable PHP components. PEAR packages are bundles of files written in PHP that can be embedded into PHP applications. PEAR packages... »
All rights reserved © 2005-2017 , www.superhosting.bg