#21695 [Opn->Csd]: CLI Return codes not working properly
| From: | helly@php.net | Date: | Sat, 24 May 2003 14:15:00 +0000 |
| Subject: | #21695 [Opn->Csd]: CLI Return codes not working properly | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-40346@lists.php.net to get a copy of this message | ||
ID: 21695
Updated by: helly@php.net
Reported By: john@php.net
-Status: Open
+Status: Closed
Bug Type: Program Execution
Operating System: Windows XP
PHP Version: 4.3.0
New Comment:
This bug has been fixed in CVS.
In case this was a PHP problem, snapshots of the sources are packaged
every three hours; this change will be in the next snapshot. You can
grab the snapshot at http://snaps.php.net/.
In case this was a documentation problem, the fix will show up soon at
http://www.php.net/manual/.
In case this was a PHP.net website problem, the change will show
up on the PHP.net site and on the mirror sites in short time.
Thank you for the report, and for helping us make PHP better.
Fixed in 4.3.2
Previous Comments:
------------------------------------------------------------------------
[2003-01-16 15:13:22] john@php.net
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 this bug report at http://bugs.php.net/?id=21695&edit=1