Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PHP 8.4.2 Build Issues with --disable-all Configuration: Failing Tests and Warnings #17262

Closed
wheakerd opened this issue Dec 25, 2024 · 10 comments

Comments

@wheakerd
Copy link

Description

PHP Version

PHP 8.4.2

Operating System and Environment

  • OS: 41 (Workstation Edition)
  • Architecture: x86_64
  • Compiler: GCC 14.2.1 20240912 (Red Hat 14.2.1-3)
  • Build Configuration: ./configure \ --prefix=/home/wheakerd/.php/84 \ --with-config-file-path=/home/wheakerd/.php/84/etc \ --disable-all

Summary

During the PHP build process, several tests failed or were skipped despite disabling all extensions. Additionally, some warnings occurred during the test run.

Test Results Summary

  • Exts skipped: 61 (e.g., bcmath, bz2, dom, gd, intl, mbstring, openssl, etc.)
  • Tests passed: 11059 (99.9%)
  • Tests failed: 12 (0.1%)
  • Expected fails: 2
  • Tests warned: 1 (touch() function basic functionality)

Actual Failed Tests

  • Using exit/die as a statement/constant [Zend/tests/exit/exit_statements.phpt]
  • Bug #60120 (proc_open hangs when data in stdin/out/err is getting larger or equal to 2048) [ext/standard/tests/file/bug60120.phpt]
  • Using proc_open() with a command array (no shell) [ext/standard/tests/general_functions/proc_open_array.phpt]
  • Null pipes in proc_open [ext/standard/tests/general_functions/proc_open_null.phpt]
  • Redirection support in proc_open [ext/standard/tests/general_functions/proc_open_redirect.phpt]
  • proc_open() with output socketpairs [ext/standard/tests/general_functions/proc_open_sockets1.phpt]
  • proc_open() with IO socketpairs [ext/standard/tests/general_functions/proc_open_sockets2.phpt]
  • proc_open() with socket and pipe [ext/standard/tests/general_functions/proc_open_sockets3.phpt]
  • Bug #78323 Test exit code and error message for invalid parameters [sapi/cgi/tests/bug78323.phpt]
  • Bug #65275: Calling exit() in a shutdown function does not change the exit value in CLI [sapi/cli/tests/bug65275.phpt]
  • Double free of init_file in phpdbg_prompt.c #12962 (Double free of init_file in phpdbg_prompt.c) [sapi/phpdbg/tests/gh12962.phpt]

Expected Failed Tests

  • Test open_basedir configuration [tests/security/open_basedir_linkinfo.phpt]
    XFAIL REASON: BUG: open_basedir cannot delete symlink to prohibited file. See also bugs 48111 and 52176.
  • Interfaces don't set prototypes to their parent method [Zend/tests/interface_constructor_prototype_002.phpt]
    XFAIL REASON: X::__constructor()'s prototype is set to B::__construct(). Y::__construct() then uses prototype to verify LSP, but misses A::__construct() which has a stricter signature.

Warned Test Summary

  • Test touch() function: basic functionality [ext/standard/tests/file/touch_basic.phpt]
    warn: Test passed on retry attempt

Steps to Reproduce

  1. Download and compile PHP 8.4.2 with the provided configuration options.
  2. Run make test.
  3. Observe the failing tests listed above.

PHP Version

PHP 8.4.2

Operating System

Fedora 41 (Workstation Edition)

@iluuu1994
Copy link
Member

Please post the output of the failed tests.

@wheakerd
Copy link
Author

@iluuu1994
Copy link
Member

Your OpenSSL setup is borked. I don't know much about OpenSSL, maybe @bukka knows what's wrong. But in any case, this does not look like a php-src bug.

@wheakerd
Copy link
Author

@iluuu1994

Thank you for your help. I am trying to install only the php kernel, hoping not to rely on any external library, so as to try to use FFI extensions to implement some underlying function extensions.
For example:

#17252

this error is not important to me. I have embraced rust and go, if it can be reconstructed in the future.

@cmb69
Copy link
Member

cmb69 commented Dec 25, 2024

Most of the failing tests are not supposed to be run for a minimal build without any external extensions. Neither ext/curl nor ext/openssl should have been built.

@wheakerd
Copy link
Author

Most of the failing tests are not supposed to be run for a minimal build without any external extensions. Neither ext/curl nor ext/openssl should have been built.

@cmb69
see https://bugs.php.net/bug.php?id=75411

@cmb69
Copy link
Member

cmb69 commented Dec 25, 2024

If you configure --disable-all neither curl nor openssl are supposed to be built. SAPIs are a different issue.

@wheakerd
Copy link
Author

@cmb69
Now, let's review the problem, you mentioned curl and openssl.

In the first line of openssl.installation it is clearly mentioned: If openssl is enabled, --with-openssl must be used.

In the first line of curl.installation it is clearly mentioned: If curl is enabled, --with-curl[=DIR] must be used.

So why does this problem exist when using --disable-all? Has the core logic of php been tampered with or is it a malicious hacker impersonating a developer?

@bukka
Copy link
Member

bukka commented Dec 26, 2024

From your test results in php_test_results_20241225_0752.txt, you clearly configured it to use OpenSSL:

Configure Command =>  './configure'  '--prefix=/home/wheakerd/.php/84' '--with-config-file-path=/home/wheakerd/.php/84/etc' '--enable-zts' '--with-fpm-user=www' '--with-fpm-group=www' '--enable-mysqlnd' '--with-mysqli=mysqlnd' '--with-pdo-mysql=mysqlnd' '--with-iconv' '--with-freetype' '--with-jpeg' '--with-zlib' '--with-libxml' '--enable-xml' '--disable-rpath' '--enable-bcmath' '--enable-shmop' '--enable-sysvsem' '--with-curl' '--enable-mbregex' '--enable-mbstring' '--enable-intl' '--enable-ftp' '--enable-gd' '--with-openssl' '--with-mhash' '--enable-pcntl' '--enable-sockets' '--enable-soap' '--with-gettext' '--disable-fileinfo' '--enable-opcache' '--with-sodium=/usr/local/libsodium' '--with-webp'

Just make sure that you run the right binary. This is clearly not a PHP issue.

@bukka bukka closed this as completed Dec 26, 2024
@wheakerd
Copy link
Author

From your test results in php_test_results_20241225_0752.txt, you clearly configured it to use OpenSSL:


Configure Command =>  './configure'  '--prefix=/home/wheakerd/.php/84' '--with-config-file-path=/home/wheakerd/.php/84/etc' '--enable-zts' '--with-fpm-user=www' '--with-fpm-group=www' '--enable-mysqlnd' '--with-mysqli=mysqlnd' '--with-pdo-mysql=mysqlnd' '--with-iconv' '--with-freetype' '--with-jpeg' '--with-zlib' '--with-libxml' '--enable-xml' '--disable-rpath' '--enable-bcmath' '--enable-shmop' '--enable-sysvsem' '--with-curl' '--enable-mbregex' '--enable-mbstring' '--enable-intl' '--enable-ftp' '--enable-gd' '--with-openssl' '--with-mhash' '--enable-pcntl' '--enable-sockets' '--enable-soap' '--with-gettext' '--disable-fileinfo' '--enable-opcache' '--with-sodium=/usr/local/libsodium' '--with-webp'

Just make sure that you run the right binary. This is clearly not a PHP issue.

@bukka Thank you for your reminder. This test process is wrong. There is an installation in my system environment. I will repeat this process in docker tomorrow. I'm very sorry.

@cmb69 cmb69 closed this as not planned Won't fix, can't repro, duplicate, stale Dec 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants