how to enable shell_exec in cpanel?

Today, We want to share with you warning: shell_exec() has been disabled for security reasons.In this post we will show you system() has been disabled for security reasons, hear for shell_exec() has been disabled for security reasons cpanel we will give you demo and example for implement.In this post, we will learn about PHP Merge Multiple PDF Files With Ghostscript with an example.

shell_exec() has been disabled for security reasons cpanel

Warning: shell_exec() has been disabled for security reasons in /home/rootfoldername/public_html/project_name/index.php on line 6

Step For “exec() has been disabled for security reasons” error solution

If you get an error like this, it means that shell_exec is disabled in the php.ini file. To re-enable it, you need to do the bellow

  1. first of all SSH to the server
  2. edit the php.ini file (on cpanel it’s /usr/local/lib/php.ini)
  3. here you can search for the line that says “disable_functions”
  4. here simple remove shell_exec from this line
  5. and last step to the Save the file, and restart apache server.

If you do not have root access to the server, then you’ll need to ask your hosting provider like as a Godaddy,
HostGator, Bluehost SiteGround or many more to do this for you.

I hope you get an idea about prevent php scripts from executing shell_exec function.
I would like to have feedback on my infinityknow.com blog.
Your valuable feedback, question, or comments about this article are always welcome.
If you enjoyed and liked this post, don’t forget to share.

Leave a Comment