Tuesday, January 25, 2011

PHP exit status 255: what does it mean?

I recently compiled a php 5.2.9 binary, and I tried to execute some php scripts with it. I can execute some scripts without problems, but one of them halts its execution midway, exiting with no errors or warnings. The returned status code of the process is 255.

I've read in the manual that such status is 'reserved'. The question is: for what?

I believe it's got something to do with missing dependencies in the php executable, but I can't be sure.

Anyone knows what does an exit code of 255 mean?

thanks,

Silvio

P.S. there are no errors in the php scripts, they run ok on other machines.

  • 255 is an error, I could reproduce that same exit code by having a fatal error.

    This means that somehow your error reporting is hidden, there are some possible causes for this:

    • error_reporting is not defined and php reports no error at all
    • STDERR is redirected somewhere else (php -f somefile.php 2>/dev/null, remove the redirection)
    • This could still be an internal error due to missing dependencies and that a fatal error has the same exit code as a program crash.
    From Weboide

0 comments:

Post a Comment