-
Notifications
You must be signed in to change notification settings - Fork 7.8k
dl("mysqli") fails when OPcache is enabled #8508
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
Comments
Closing in favor of #9196, which describes the root cause. |
cmb69
added a commit
to cmb69/php-src
that referenced
this issue
Sep 16, 2022
As described in php#8508, if OPcache is enabled, ext/mysqli can't be dl()'d; we work around that by loading the extension on startup.
cmb69
added a commit
to cmb69/php-src
that referenced
this issue
Sep 29, 2024
Prior to running the tests, the test runner checks for all generally available extensions; it does this by scanning the `extension_dir` for files matching the typical extension pattern, but verifies that the file is actually a PHP extension by calling `dl()`. However, `dl()` has known issues[1]. On Windows CI we always get an ugly "zend_mm_heap corrupted" message, and we even can't `dl()` ext/mysql when OPcache is enabled[2]. So we better avoid the double-check with `dl()`, which is unlikely to be necessary anyway. [1] <php#9196> [2] <php#8508>
cmb69
added a commit
that referenced
this issue
Oct 3, 2024
Prior to running the tests, the test runner checks for all generally available extensions; it does this by scanning the `extension_dir` for files matching the typical extension pattern, but verifies that the file is actually a PHP extension by calling `dl()`. However, `dl()` has known issues[1]. On Windows CI we always get an ugly "zend_mm_heap corrupted" message, and we even can't `dl()` ext/mysql when OPcache is enabled[2]. So we better avoid the double-check with `dl()`, which is unlikely to be necessary anyway. [1] <#9196> [2] <#8508>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Description
The following code:
Resulted in this output:
But I expected this output instead:
The problem is
mysqli_exception::$sqlstate
; its value "00000"won'twould be interned, and so the respective checkphp-src/Zend/zend_API.c
Lines 3814 to 3816 in 95f5f9d
fails, causing PHP to bail out.
This is particularly an issue regarding the tests, because as of PHP 8.1.0, run-tests.php tries to figure out which dynamic extension can be loaded to gather the
$exts_to_tests
; however, due to this issue the list is not complete, so when OPcache is enabled, about 2.000 tests are not executed on AppVeyor CI.PHP Version
PHP-8.0
Operating System
Windows
The text was updated successfully, but these errors were encountered: