Edit report at https://bugs.php.net/bug.php?id=81520&edit=1

 ID:                 81520
 Updated by:         ni...@php.net
 Reported by:        r...@php.net
 Summary:            TEST_PHP_CGI_EXECUTABLE badly set in run-tests.php
 Status:             Open
 Type:               Bug
 Package:            Testing related
 Operating System:   Linux
 PHP Version:        8.1.0RC3
 Block user comment: N
 Private report:     N

 New Comment:

Any suggestion on what the right way to do this would be? The previous behavior 
is clearly also wrong (use source tree binary if install tree binary used). 
Should we try to transfer prefixes somehow? Skip guessing logic entirely if the 
basename of the binary is not "php"?


Previous Comments:
------------------------------------------------------------------------
[2021-10-12 06:34:06] r...@php.net

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 this bug report at https://bugs.php.net/bug.php?id=81520&edit=1

Reply via email to