Knowledge Base
MilesWeb / cPanel

How to Disable PHP Functions using Control Panel?

Approx. read time : 2 min

Steps to Disable PHP Functions :

1. Log in to Control Panel.

2. Go to CGI and then Scripted Language Support.

3. Click on PHP Scripting.

4. You can see your php.ini file that gets displayed in a text box at the bottom.

5. If your editing is disabled then click on Edit to make changes in the php.ini file.

6. Find the block of codes within your php.ini file as given below :

; – Using this directive you can disable certain functions for the security purposes.
This directive receives a comma-delimited list of function names. It is NOT affected by the status of Safe Mode i.e. even if it is On or Off.
; http://php.net/disable-functions
disable_functions=

7. Immediately after ‘disable_functions=’, write down the functions those you want to disable (for example exec, passthru, popen).

Here is a list that you can disable in order to improve security :

  • exec
  • passthru
  • shell_exec
  • system,
  • proc_open
  • popen
  • curl_exec
  • curl_multi_exec
  • parse_ini_file
  • show_source

8. Now click on Save.

That’s it.

These are some of the common PHP functions that are disabled usually. Performing this operation using the control panel is very easy.

You can also Read :

1) Change Control Panel Language (cPanel)

2) How to access control panel ?

3) Getting Started With cPanel

Sonam Wagh
With an interest in doing something creative daily, Sonam works as a Digital Marketing Executive. She likes to write technical blogs related to web hosting, digital marketing, and other IT topics. She also likes to spend her leisure time on social media to find different strategies for client engagement.