|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #60920 CLI: php -v on STDERR
Submitted: 2012-01-28 22:22 UTC Modified: 2012-01-30 12:19 UTC
Avg. Score:4.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: Assigned: mike (profile)
Status: Closed Package: PHP options/info functions
PHP Version: 5.4SVN-2012-01-28 (SVN) OS:
Private report: No CVE-ID: None
 [2012-01-28 22:22 UTC]
The PHP version info lands on STDERR now, not on STDOUT. Caused by

Test script:
$ php -v 2>/dev/null

Expected result:
Something like:

PHP 5.4.0RC7-dev (cli) (built: Jan 28 2012 22:23:46)
Copyright (c) 1997-2012 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2012 Zend Technologies

Actual result:


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2012-01-28 22:25 UTC]
Same goes for startup errors, e.g.

$ F:/Programme/php-5.4.0RC6-nts-Win32-VC9-x86/php.exe -dmagic_quotes_gpc=on 2>/dev/null

Fatal error: Directive 'magic_quotes_gpc' is no longer available in PHP in Unknown on line 0


$ ~/devel/php/php/branches/PHP_5_4/Release/php.exe -dmagic_quotes_gpc=on 2>/dev/null
 [2012-01-29 16:31 UTC]
This is causing sapi/cli/tests/001.phpt to fail - Is the fix intentional and does 
the unit test need updating, or should --version be outputting to STDOUT?
 [2012-01-29 19:11 UTC]
No, not intentional. We need to have a close look at this one.
 [2012-01-29 19:11 UTC]
-Status: Open +Status: Critical
 [2012-01-29 23:28 UTC]
-Assigned To: +Assigned To: mike
 [2012-01-30 12:17 UTC]
Automatic comment from SVN on behalf of mike
Log: use stderr before, stdout after php_output_startup() and sapi_module.ub_write() after php_output_activate()

- fixes Bug #60920  CLI: php -v on STDERR
- fixes Bug #60923  Failing tests for sapi/cli
 [2012-01-30 12:19 UTC]
This bug has been fixed in SVN.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at

 For Windows:
Thank you for the report, and for helping us make PHP better.

 [2012-01-30 12:19 UTC]
-Status: Critical +Status: Closed
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Tue Aug 03 01:01:25 2021 UTC