[php-src] Issue #20868: SWC files don't work when zlib extension is built as shared
| From: | petk | Date: | Thu, 08 Jan 2026 17:58:14 +0000 |
| Subject: | [php-src] Issue #20868: SWC files don't work when zlib extension is built as shared | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-251502@lists.php.net to get a copy of this message | ||
Issue: https://github.com/php/php-src/issues/20868
Author: petk
### Description
The following code:
```
./buildconf
./configure --with-zlib=shared
make
./sapi/cli/php -d extension_dir=modules run-tests.php ext/standard/tests/image/getimagesize_swc.phpt
```
Resulted in this output:
```
test skipped
```
But I expected this output instead:
```
test passed
```
To have SWC files (even though they are obsolete), the zlib extension needs to be built statically
with PHP. This prevents packages to build a shared zlib extension. As there is now a new API and
image types can be dynamically registered from extensions, this can be probably resolved differently
as done in the previous pull requests.
See also:
- https://github.com/php/php-src/pull/20867
- https://bugs.php.net/bug.php?id=34338
- https://github.com/php/php-src/pull/4681
### PHP Version
```plain
All PHP versions
```
### Operating System
_No response_