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) . But in my wamp server the function is disabled by default. I searched in google but I cant find out the solution. So I try to put that code in live server. But there's also the same problem. I contacted the technical person for that server but he said we cant enable shell_script. It is security violence.
So only way is trying in wamp server... How to enable shell_exec()
or exec()
..?
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:
stop all services from Wamp-Server and close the programm
Open .../wamp/bin/apache/Apache2../bin/php.ini
copy php.ini to desktop and open it
set safe_mode_exec_dir (line after = is empty, so IT IS ON!!!) set it off!
save
copy back to dir (maybe you need admin rights)
start wamp-server
enjoy exec() and co.
I was having the same problem and tried a lot of solutions out there. What worked out for me was running XAMPP as Admin.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With