Enable shell_exec() in wamp server

后端 未结 10 1926
臣服心动
臣服心动 2021-01-05 17:22

Recently I have passed one issue on wamp server..I need to use the shell_exec() function in PHP for running some external shell script (some checksum file) . Bu

10条回答
  •  夕颜
    夕颜 (楼主)
    2021-01-05 17:58

    The following line was the best I read to this problem: "You need to disable safe mode in the php.ini located in the \Apache2\bin folder, not the php folder. Restart Apache2 service right after to load the new settings."

    The solution is:

    1. stop all services from Wamp-Server and close the programm

    2. Open .../wamp/bin/apache/Apache2../bin/php.ini

    3. copy php.ini to desktop and open it

    4. set safe_mode_exec_dir (line after = is empty, so IT IS ON!!!) set it off!

    5. save

    6. copy back to dir (maybe you need admin rights)

    7. start wamp-server

    8. enjoy exec() and co.

提交回复
热议问题