Scripting: How to Disable PHP Functions
How to Disable PHP Functions
- Log in to your Control Panel.
- Go to CGI and Scripted Language Support.
- Click PHP Scripting.
- Your php.ini file is displayed in a text box at the bottom. Click Edit if you cannot edit the php.ini file text.
- Locate the following block of code within your php.ini file:
; This directive allows you to disable certain functions for security reasons.
; It receives a comma-delimited list of function names. This directive is
; *NOT* affected by whether Safe Mode is turned On or Off.
; http://php.net/disable-functions
disable_functions = - Just after 'disable_functions = ', write out the functions you want to disable (example: exec,passthru,popen). Here are a list of functions that are commonly disabled as a means to improve security:
- exec
- passthru
- shell_exec
- system,
- proc_open
- popen
- curl_exec
- curl_multi_exec
- parse_ini_file
- show_source
- Click Save.
Important: Some themes, plugins, and features for popular PHP-based website builders (such as WordPress) may rely on one or more of these functions. Disabling these functions may cause certain features to stop working (notably, some WordPress automatic backup plugins).