Php shell script execute

July 7, 2021 . 1 MIN READ

Several possibilities:

  • You have safe mode enabled. That way, only exec() is working, and then only on executables in safe_mode_exec_dir
  • exec and shell_exec are disabled in php.ini
  • The path to the executable is wrong. If the script is in the same directory as the php file, try exec(dirname(__FILE__) . '/myscript.sh');

 

https://stackoverflow.com/questions/5882650/how-to-execute-a-shell-script-in-php
http://acmeextension.com/execute-php-file-remote-server-using-ssh/

Leave a Reply

Your email address will not be published. Required fields are marked *