From:             [EMAIL PROTECTED]
Operating system: Windows XP
PHP version:      4.3.0
PHP Bug Type:     *General Issues
Bug description:  CLI Return codes not working properly

This very well may be a problem with Windows XP instead of PHP... but if
nothing else it should be documented:

<?php
   system("C:\\PHP\\cli\\php -r 'exit(1);'", $retval);

   echo "$retval\n";
?>

On redhat, (of course, replacing the system call to the linux version of
php-cli) this script echo's the return value as '1' which is the expected
behavior. 

However, this same script ran in windows produces does not. Instead, it
seems to be always return 254 regardless of the exit code. 

Please note that the above script has only been provided as an example of
the problem -- it has been confirmed that system() and the -r argument are
not causing this issue.
-- 
Edit bug report at http://bugs.php.net/?id=21695&edit=1
-- 
Try a CVS snapshot:         http://bugs.php.net/fix.php?id=21695&r=trysnapshot
Fixed in CVS:               http://bugs.php.net/fix.php?id=21695&r=fixedcvs
Fixed in release:           http://bugs.php.net/fix.php?id=21695&r=alreadyfixed
Need backtrace:             http://bugs.php.net/fix.php?id=21695&r=needtrace
Try newer version:          http://bugs.php.net/fix.php?id=21695&r=oldversion
Not developer issue:        http://bugs.php.net/fix.php?id=21695&r=support
Expected behavior:          http://bugs.php.net/fix.php?id=21695&r=notwrong
Not enough info:            http://bugs.php.net/fix.php?id=21695&r=notenoughinfo
Submitted twice:            http://bugs.php.net/fix.php?id=21695&r=submittedtwice
register_globals:           http://bugs.php.net/fix.php?id=21695&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=21695&r=php3
Daylight Savings:           http://bugs.php.net/fix.php?id=21695&r=dst
IIS Stability:              http://bugs.php.net/fix.php?id=21695&r=isapi
Install GNU Sed:            http://bugs.php.net/fix.php?id=21695&r=gnused

Reply via email to