Enable or disable PHP functions using the PHP disable_functions directive

Tutorials cPanel | disable_functions | cpanel | php | functions
This article will present the necessary steps to enable and disable some PHP functions using the PHP disable_functions directive
by Mihai BobriucViews 889Updated now 1 yearPublished 31/05/2018

Introduction

  • PHP uses a lot of functions that can be enabled or disabled using the PHP disable_functions directive. This directive can be edited directly from the cPanel interface. As a safety measure it is recommended to disable all PHP functions that are not used by your application.To disable a PHP function, we'll add it to the list of the disable_functions directive, and to enable it, we'll remove it from the list.
    As an example we will disable the mail function ().

Requirement

  • To edit disable_functions, we will need the cPanel login data, received in the email with the administration data.

Steps

  • First we will login to the cPanel control panel.

Logare cont cPanel

  •  Once we have logged into the control panel, we will go to the Software section and click on Select PHP Version.

Select PHP version din SOFTWARE

  • In the next window we will have the possibility to change the PHP version and enable or disable various PHP extensions.
    To edit disable_functions, we will click on Switch to PHP Options.

Switch To PHP Options

  • The next window will contain a list of existing PHP directives, including disable_functions. Also in this list we will find the directive
     suhosin.executor.eval.blacklist. If your application does not use functions that are included in encrypted PHP code, it is recommended to disable all functions in this directive. Activating and deactivating functions from suhosin.executor.eval.blacklist it is done the same as at disable_functions.

Current PHP version

  • To make changes, we will click on the disable_functions field and add or remove the desired function. In our example we will add the mail() function and click the Apply button.

disable_functions

  • After all the desired values ​​have been changed, we will click on the Save button at the bottom of the list. After saving, we will be greeted by a confirmation message: Settings Saved.

Salvarea modificari current PHP version

  • From now on, all functions in the disable_functions directive field will be disabled. In the case of our example, the mail() function will no longer be able to be used in PHP scripts.

Notă :

This tutorial is only valid for shared cPanel accounts.

Similar Articles

14
Creating a mailbox in cPanelTutorials cPanel | email | cpanel | add
The cPanel panel allows the creation of an unlimited number of email boxes associated with hosted domains. This tutorial will explain the necessary steps to create and access an e-mail box.
by Mihai BobriucViews 2362Updated now 1 yearPublished 28/06/2017
5
Enabling Cloudflare services in cPanelTutorials Cloudflare | cpanel | cloudflare | protection
This article will describe the steps required to enable Cloudflare services for domains hosted on your cPanel control panel
by Mihai BobriucViews 1527Updated now 11 monthsPublished 26/09/2017
1
Adding an MX record to the cPanel admin panel, redirecting your mail server to GoogleTutorials Email | mx | mx records | mx registration | dns | email
How to add MX Records and forward mail to the Google mail server
by Mihai BobriucViews 1516Updated now 1 yearPublished 21/07/2017
1
Adding an addon domain in cPanelTutorials cPanel | cpanel | domain | addon
The process of adding an addon domain in cPanel
by Ana RednicViews 1353Updated now 1 yearPublished 31/01/2018
1
Enable DNSSEC in ROTLDTutorials Domains | dnssec | domain | rotld
This tutorial will describe the steps required to enable DNSSEC on a .ro domain in the ROTLD panel
by Ana RednicViews 1077Updated now 1 yearPublished 25/10/2018