hello i would like to call a shell script that executes some commands under linux. i dont wanna echo somethin rather i wanna execute a command that lets say starts the apache server. i have looked into the support already provided on the topic and have tried to follow that too but nothing seems to be workin. i get the error that THE DOCUMENT CONTAINS NO DATA. Plz if someone can look into it and reply as soon as possible. regards.
Well, you can use this command (the script is in the dir /root here.
<?php echo exec (" /root/script.sh "); ?>
Bye, Erik
Nope, I have exactly the same problem and that script doesn't work. I have tried also with system and passthru but nothing seems to happen. Is it because php logs in as nobody?
chowning the script to nobody and chmoding to 755, as well as calling sh should work?
exec("/bin/sh /path/to/script.sh");
try that...