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

Popular posts from this blog

php - SPIP: From Tag directly to an article -

jquery - isAjaxRequest always return false -

ruby on rails - In a controller spec, how to find a specific tag in the generated view? -