Jul
19
2013

PHP exec() Error Codes

exec() error codes mean from the return at the third parameter.

for example  exec($cmd.’ 2>&1′, $output, $return);

1 – Catchall for general errors.
2 – Misuse of shell builtins.
126 – Command invoked cannot execute. A permission or command not executable problem.
127 – Command not found.
128 – Invalid argument to exit. Exit takes only integer range 0 – 255.
128+n – Fatal error signal “n”.
130 – Script terminated by Control-C.
255* – Exit status out of range. Exit takes only integer range 0 – 255


Leave a comment

You must be logged in to post a comment.




Member Area