Warning: exec() has been disabled for security reasons

前端 未结 2 1169
执念已碎
执念已碎 2020-12-12 01:05

I get this error on my page:

Warning: exec() has been disabled for security reasons in /home/a2297145/public_html/android/index.php on line 2036

<
相关标签:
2条回答
  • 2020-12-12 01:23

    The error means exactly what it says. Whoever set up your server (probably your webhost) has disabled the use of the exec function. In other words, you can't use exec.

    You could probably work around it by using glob to get the file of files, or filesize to get the size (in bytes) of the file.

    0 讨论(0)
  • 2020-12-12 01:36

    This error can be resolved in two ways:

    1. Either check for "disable_functions" list in "php.ini" file on your server and remove "exec" or "shell_exec" from the list. Remember to restart your PHP-CGI to apply those changes.

    OR

    1. Login into WHM and type "multiPHP Manager" search box in top left corner and go to multiPHP manager. Choose the domain inside php version section in which you want to disable exec() or shell_exec(). and click on edit PHP-FPM and scroll down to disable_functions and remove exec() or shell_exec() by editing list there.
    0 讨论(0)
提交回复
热议问题