Home >Backend Development >PHP Tutorial >The solution to the failure of executeupdate php to execute the exec command on the server
Preface: This article is aimed at the Windows PHP environment, and the Linux system is not within the scope of discussion.
For security reasons, the server does not allow PHP or other languages to execute exec commands. When you have special needs for PHP to execute exec commands on the server, you need to set two places, otherwise the execution will not be successful.
1. Modify php.ini
Find the php configuration file php.ini. If you use the extraterrestrial php automatic installation program to configure the php environment, this file is in the C:WINDOWS directory.
Search for "disable_functions" in the file, find it, remove "exec" and "shell_exec", and then save the file.
2. Modify the cmd.exe file properties
Enter C:WINDOWSsystem32, find the cmd.exe file, right-click -> Properties, add the Internet guest account in the "Security" settings, which is IUSR_*** ***That account, and then grant "Read and Run" and "Read" permissions.
After setting up like this, php can execute the exec command on the server.
The above introduces the solution to the failure of executeupdate php to execute the exec command on the server, including the content of executeupdate. I hope it will be helpful to friends who are interested in PHP tutorials.