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?
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 suppression operator) hides the output of the errorIt could also mean that
/etc/php5/cli/php.ini
(on Debian/Ubuntu) or/etc/php.ini
(on RHEL/CentOS/etc.) hasdisplay_errors = Off
which means that any errors or warnings from command-line scripts will go nowhere, unlesslog_errors = On
(see also theerror_log
setting).Try running your scripts with a wrapper script that uses
php -d display_errors=on ...
It could also mean that
/etc/php5/cli/php.ini (on Debian/Ubuntu)
/etc/php.ini (on RHEL/CentOS/etc.)
has set
which means that any errors or warnings from command-line scripts will go nowhere, unless
See also the error_log setting.
Try running your scripts with a wrapper
In my case that was xDebug death because of low
xdebug.max_nesting_level
value.This might be caused by PHP suppressed error messages (the line starts with @). I found the line by
and then commented out the @. After this I got the actual error and was able to fix it easily. I also noticed afterwards that PHPStorm had found out the same error already, but I hadn't fixed/noticed it.
Locate what php.ini your php-cli used.
Make sure display_errors parameters is active.
Make sure display_errors and log_errors are ON.
Define the error_log location to logging errors into file.
Error messages should shown now.