How to Disable/Enable PHP_Function in cPanel

Estimated reading: 3 minutes 353 views

Managing a website involves various technical tasks, one of which is handling the PHP functions through your hosting control panel, commonly known as cPanel. PHP functions can be critical for your site’s functionality but may also pose security risks if not properly managed. Whether you’re a beginner or someone with a bit of technical know-how looking to secure your website further or customize its capabilities, learning how to disable or enable PHP functions in cPanel is essential. This blog aims to guide you through that process. So, let’s get started.

What are PHP Functions?

PHP is a scripting language that’s used to create dynamic content on websites. PHP functions are blocks of code within PHP used to perform specific tasks. In some cases, you might need to disable certain PHP functions to enhance security, or enable them to expand your site’s functionality.

Why Disable PHP Functions?

Disabling specific PHP functions is mainly a security measure. Certain functions can be used by hackers to execute malicious commands or scripts that compromise your website’s security. For example, the exec() function allows PHP to execute system commands, which can be very dangerous if exploited by an attacker.

How to Disable/Enable PHP_Function in cPanel

1. Log in to cPanel

Start by logging into your cPanel account.

2. Go to the Software Section

Look for a section called “Software” and click on “MultiPHP INI Editor.”

3. Open the Editor

In the MultiPHP INI Editor, find and click on “Editor Mode.” Then, choose the domain name you want to manage from a list. This selects where you want to make changes.

4. Disable Functions

In the editor, you’ll see a line that says disable_functions = # # # #. Here, type the names of the PHP functions you want to turn off, separated by commas. For example, if you want to disable exec, system, passthru, and others, you would write:

disable_functions = exec, system, passthru, pcntl_exec, popen, proc_open, shell_exec

Then, click on “Save” to apply the changes.

5. Enable Functions

If you want to turn any disabled functions back on, simply remove their names from the disable_functions line. Then, save your changes again.

That’s it! These steps will help you manage PHP functions for your website through cPanel. Make sure to check your website after making changes to ensure everything works as expected.

Conclusion

Disabling or enabling PHP functions through cPanel is a way to manage your website’s functionality and security. While it may seem technical, following these steps can make the process straightforward, even for beginners. Always remember to proceed with caution when making changes to PHP settings, as incorrect configurations can potentially break your site. If in doubt, consult with a professional web developer or reach out to your hosting provider’s support team

Share this Doc

How to Disable/Enable PHP_Function in cPanel

Or copy link

CONTENTS