mysql - service not getting executed when bash script is triggered from php -
i trigger php code:
$dexec="cd /var/server_status/ && sh server_restart.sh"; $d=exec($dexec,$a,$b); server_restart.sh: service mysql stop
$b dump int 127, command not found, not in path when triggered php? service command? steps have working
thats path problem. php can't find file. add chdir("/var/server_status"); switch dir server_restart.sh is.
Comments
Post a Comment