> ## Documentation Index
> Fetch the complete documentation index at: https://kb.hosting.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Disabling functions using the PHP disable_functions directive

> Learn to disable specific functions in PHP using the disable_functions directive with this guide, featuring instructions and code snippets.

This article describes how to use the **disable\_functions** directive in a custom *php.ini* file to disable specific functions.

<Warning>
  **Important**

  The information in this article only applies to certain types of hosting accounts. To determine whether or not the information below applies to your account, please see [this article](/docs/changing-php-settings-and-versions).

  📘 Note

  This article assumes that you have already set up a custom *php.ini* file on your web site. If you have not already set up a custom *php.ini* file, please read [this article](/docs/custom-php-ini-files) first.
</Warning>

## Using the disable\_functions directive

For security reasons, you may want to disable certain PHP functions. For example, the **exec** and **system** functions are particularly dangerous when they are used with unsanitized input values.

To disable a function, use a text editor to modify the **disable\_functions** directive in the *php.ini* file. This directive takes a comma-delimited list. For example, to disable the **exec** and **system** functions, use the following directive:

```
disable_functions = "exec, system"
```

If you want to re-enable the functions, modify the **disable\_functions** directive in the *php.ini* file as follows:

```
disable_functions = ""
```

<Tip>
  To verify the current value of the **disable\_functions** directive and other directives, you can use the **phpinfo()** function. For more information about how to do this, please see [this article](/docs/view-php-settings).
</Tip>

## More information

* To view a complete list of *php.ini* directives, please visit [http://www.php.net/manual/en/ini.list.php](http://www.php.net/manual/en/ini.list.php).

* For more information about the **disable\_functions** directive, please visit [https://secure.php.net/manual/en/ini.core.php#ini.disable-functions](http://secure.php.net/manual/en/ini.core.php#ini.disable-functions).

## Related articles

* [Custom php.ini files](/docs/custom-php-ini-files)

* [Using php.ini directives](/docs/using-php-ini-directives)
