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.

Read Also:  C# Linq Left Outer Join using LINQ To SQL Tutorial

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.
Read Also:  Fresher PHP WEB Developer Salary Range Level

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.

Read Also:  Database Data Export to Excel File using laravel

Related FAQ

Here are some more FAQ related to this Article:

  1. Read Also:  Laravel Custom Dropdown Server Side Filter in Datatables
  2. Read Also:  How to Get Current Date & Time in Python
  3. Read Also:  How to Get Current Date and Time in PHP?
  4. Read Also:  jQuery Ajax File Upload with Progress Bar
  5. Read Also:  How to find the Json Object Length in Javascript?
  6. Read Also:  DataTables Column Search Server side processing in PHP
  7. Read Also:  updated_option Wordpress hook details - WORDPRESS ACTION HOOKS
  8. Read Also:  Laravel Custom Dropdown Server Side Filter in Datatables
  9. Read Also:  Database Data Export to Excel File using laravel
  10. Read Also:  How to find the Json Object Length in Javascript?
CLOSEX