php / php/php-src

SWC files don't work when zlib extension is built as shared

Open
#20,868 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Bug Status: Needs Triage
Dominant language
C
Stars
40.4k
Forks
8.1k
Avg merge
2d 13h
Merged PRs (30d)
96

Description

Description

The following code:

./buildconf
./configure --with-zlib=shared
make
./sapi/cli/php run-tests.php -d extension_dir=modules 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:

PHP Version
All PHP versions
Operating System

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the issue with the provided build commands and ext/standard/tests/image/getimagesize_swc.phpt. Trace how SWC image support is registered when zlib is shared, using the referenced pull requests and bug report for context. Done means the test passes without requiring zlib to be built statically.

Written by the indexing model from the issue text.

Assessment

Tech stack
c, php
Domain
backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.