|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #62055 Make run-tests.php support --CGI-- sections
Submitted: 2012-05-17 19:22 UTC Modified: 2017-10-30 20:06 UTC
Avg. Score:4.0 ± 1.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: Assigned: cmb (profile)
Status: Closed Package: Testing related
PHP Version: master-Git-2012-05-17 (Git) OS: Any
Private report: No CVE-ID: None
 [2012-05-17 19:22 UTC]

Contains a section --CGI-- which is not a PHPT section. The run-tests.php code 
simply ignores this section.

I'm tempted to just remove it, as it makes no difference to the test. However the 
comments in the test imply that the author intended to run this using php-cgi. It 
is actually using that cli. 

It's a valid test (if you take the --CGI-- out), is it useful in relation to bug 


run-tests-cgi (last revision 2015-07-18 13:48 UTC by

Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2012-05-18 08:37 UTC]
-Assigned To: +Assigned To:
 [2012-05-18 08:43 UTC]
My bad. --CGI-- is a valid test section but only for tests run using server-
tests.php. run-tests.php just ignores it silently and uses the php-cli.

Would --GZIP_POST-- be helpful? This will use php-cgi...
 [2012-05-18 22:44 UTC]
-Assigned To: +Assigned To: zoe
 [2012-10-02 13:42 UTC]
This test is not using the CGI. It is just being run by the CLI. 
The options are 
1. to remove the --CGI-- section (which is simply ignored) and the comments and leave it as a valid CLI test.
2. To remove the test
 [2015-07-18 13:48 UTC]
The following patch has been added/updated:

Patch Name: run-tests-cgi
Revision:   1437227309
 [2015-07-18 13:49 UTC]
According to the test file layout documentation[1] the CGI section
is supposed to mark tests that must be run as CGI, but it is not
implemented for run-tests.php yet. Wouldn't it make sense to
implement it? Applying the attached patch "run-tests-cgi" seems to
be sufficient.

[1] <>
 [2017-10-24 02:56 UTC]
-Summary: Minor fix to ext/zlib/tests/bug60761.phpt +Summary: Make run-tests.php support --CGI-- sections -Assigned To: zoe +Assigned To: cmb
 [2017-10-24 02:56 UTC]
@christoph, I think you should apply the patch, server-tests.php is dead anyway and sapi/cli and sapi/cgi is fairly close enough for run-tests.php to just being able to switch anyway
 [2017-10-30 19:39 UTC]
-Type: Bug +Type: Feature/Change Request
 [2017-10-30 20:06 UTC]
-Status: Assigned +Status: Closed
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon Apr 22 07:01:29 2024 UTC