[PHP-BUG] Bug #81520 [NEW]: TEST_PHP_CGI_EXECUTABLE badly set in run-tests.php

[email protected] ("[email protected]")
Newsgroups php.bugs,php.qa
Message-ID <[email protected]>
From:             remi
Operating system: Linux
PHP version:      8.1.0RC3
Package:          Testing related
Bug Type:         Bug
Bug description:TEST_PHP_CGI_EXECUTABLE badly set in run-tests.php

Description:
------------
When php is installed with a command prefix, this one is ignored in
run-tests.php

ex: installation tree

/usr/bin/php
/usr/bin/php-cgi
/usr/bin/zts-php

When running run-tests.php with /usr/bin/zts-php,
TEST_PHP_CGI_EXECUTABLE is set to /usr/bin/php-cgi (should not be set,
or to /usr/bin/zts-php-cgi when present)


Until 8.0, TEST_PHP_CGI_EXECUTABLE was only set as .../sapi/cgi/php-cgi
(sources tree) if exists.

Since 8.1 it is also set as .../php-cgi (installed tree). In this case,
command prefix/suffix should be used.


Workaround is to set TEST_PHP_CGI_EXECUTABLE explicitly

Test script:
---------------
Discovered on datadog_trace extension
See https://github.com/DataDog/dd-trace-php/issues/1343


-- 
Edit bug report at https://bugs.php.net/bug.php?id=81520&edit=1
-- 
Fix committed:                    https://bugs.php.net/fix.php?id=81520&r=fixed
Fixed in release:                 https://bugs.php.net/fix.php?id=81520&r=alreadyfixed
Need backtrace:                   https://bugs.php.net/fix.php?id=81520&r=needtrace
Need Reproduce Script:            https://bugs.php.net/fix.php?id=81520&r=needscript
Try newer version:                https://bugs.php.net/fix.php?id=81520&r=oldversion
Not developer issue:              https://bugs.php.net/fix.php?id=81520&r=support
Expected behavior:                https://bugs.php.net/fix.php?id=81520&r=notwrong
Not enough info:                  https://bugs.php.net/fix.php?id=81520&r=notenoughinfo
Submitted twice:                  https://bugs.php.net/fix.php?id=81520&r=submittedtwice
register_globals:                 https://bugs.php.net/fix.php?id=81520&r=globals
PHP version support discontinued: https://bugs.php.net/fix.php?id=81520&r=phptooold
Daylight Savings:                 https://bugs.php.net/fix.php?id=81520&r=dst
IIS Stability:                    https://bugs.php.net/fix.php?id=81520&r=isapi
Install GNU Sed:                  https://bugs.php.net/fix.php?id=81520&r=gnused
Floating point limitations:       https://bugs.php.net/fix.php?id=81520&r=float
No Zend Extensions:               https://bugs.php.net/fix.php?id=81520&r=nozend
MySQL Configuration Error:        https://bugs.php.net/fix.php?id=81520&r=mysqlcfg
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.