logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Other Software View previous topic :: View next topic
Reply to topic   Topic: PHP 8.5.7 and curl 8.20.0 require loading of brotli and zstd
Author
danielruf



Joined: 07 Jan 2026
Posts: 23

PostPosted: Tue 16 Jun '26 8:45    Post subject: PHP 8.5.7 and curl 8.20.0 require loading of brotli and zstd Reply with quote

It seems newer PHP versions (also includes PHP 8.4.x) ship with curl 8.20.0, which requires to load brotli(dec.dll) and (lib)zstd(.dll).

Otherwise Apache fails to start, when one of the newer PHP releases with curl 8.20.0 or newer is used.

Is this on the radar of the ApacheLounge team? Will there be some changes in the ApacheLounge Apache builds or is this just something that has to be documented, so PHP users are aware of it and related bugreports can be pointed to the documentation?

https://github.com/php/php-src/issues/22157
https://github.com/php/php-src/pull/21925
Back to top
admin
Site Admin


Joined: 15 Oct 2005
Posts: 758

PostPosted: Wed 17 Jun '26 11:19    Post subject: Reply with quote

It is on our radar.

We build the Lib and the DLL in the next APACHE.
Back to top
Steffen
Moderator


Joined: 15 Oct 2005
Posts: 3204
Location: Hilversum, NL, EU

PostPosted: Wed 17 Jun '26 14:57    Post subject: Reply with quote

New version available.

In the changelog :

*) Added ZSTD libraries (zstd.dll, zstdt.exe, zstd.lib, zstd_ststic.lib) to help with third party support.


*) Added ZSTD support in Curl.
Back to top
danielruf



Joined: 07 Jan 2026
Posts: 23

PostPosted: Wed 17 Jun '26 22:44    Post subject: Reply with quote

Hm, I still have to add the following to apache/conf/httpd.conf to have curl loaded according to phpinfo():

LoadFile "${basePath}/php/brotlidec.dll"
LoadFile "${basePath}/php/libzstd.dll"

So did I mix something up and this has to be manually done even with your latest changes? What is the preferred solution for users running PHP 8.5.7 on Apache 2.4.68 from 17th of June 2026?
Back to top
danielruf



Joined: 07 Jan 2026
Posts: 23

PostPosted: Wed 17 Jun '26 22:50    Post subject: Reply with quote

not relevant probablx, but there were some changes affecting zlib dll names: https://github.com/php/php-src/issues/22157#issuecomment-4734454260

Last edited by danielruf on Thu 18 Jun '26 19:57; edited 1 time in total
Back to top
tangent
Moderator


Joined: 16 Aug 2020
Posts: 455
Location: UK

PostPosted: Thu 18 Jun '26 0:08    Post subject: Reply with quote

danielruf wrote:
Hm, I still have to add the following to apache/conf/httpd.conf to have curl loaded according to phpinfo():

LoadFile "${basePath}/php/brotlidec.dll"
LoadFile "${basePath}/php/libzstd.dll"

Apache has shipped with brotlidec.dll for a long time now, so the fact you're having to name a specific path to a brotlidec.dll image with a LoadFile directive, is somewhat surprising.

Also notable, when building zstd with CMake (as per the new AL build), the default DLL filename produced by the package is zstd.dll not libzstd.dll
    Install the project...
    -- Install configuration: "Release"
    -- Installing: C:/Apache24/lib/pkgconfig/libzstd.pc
    -- Installing: C:/Apache24/include/zdict.h
    -- Installing: C:/Apache24/include/zstd.h
    -- Installing: C:/Apache24/include/zstd_errors.h
    -- Installing: C:/Apache24/lib/zstd.lib
    -- Installing: C:/Apache24/bin/zstd.dll
    -- Installing: C:/Apache24/lib/zstd_static.lib
    -- Installing: C:/Apache24/bin/zstd.exe
    -- Installing: C:/Apache24/lib/cmake/zstd/zstdTargets.cmake
    -- Installing: C:/Apache24/lib/cmake/zstd/zstdTargets-release.cmake
    -- Installing: C:/Apache24/lib/cmake/zstd/zstdConfig.cmake
    -- Installing: C:/Apache24/lib/cmake/zstd/zstdConfigVersion.cmake
What happens if you specify:
Code:
LoadFile "bin/brotlidec.dll"
LoadFile "bin/zstd.dll"

Does this satisfy your PHP startup requirements?

If not, to me it rather looks like there's a specific link requirement with the PHP CURL configuration.
Back to top
danielruf



Joined: 07 Jan 2026
Posts: 23

PostPosted: Thu 18 Jun '26 8:49    Post subject: Reply with quote

following tried:

LoadFile "bin/brotlidec.dll"
LoadFile "bin/zstd.dll"

Results in:

[18-Jun-2026 06:41:40 UTC] PHP Warning: PHP Startup: Unable to load dynamic library 'curl' (tried: C:\...\php\ext\curl (Das angegebene Modul wurde nicht gefunden), C:\...\php\ext\php_curl.dll (Das angegebene Modul wurde nicht gefunden)) in Unknown on line 0


Tried:

LoadFile "/bin/brotlidec.dll"
LoadFile "/bin/zstd.dll"

Leads to the Apache Service not starting on Windows (Fails with an error:

Der Dienst "apache2.4" wurde mit dem folgenden dienstspezifischen Fehler beendet:
Unzulässige Funktion.


Tried:

LoadFile "${basePath}/apache/bin/brotlidec.dll"
LoadFile "${basePath}/apache/bin/zstd.dll"

Results in:

[18-Jun-2026 06:45:28 UTC] PHP Warning: PHP Startup: Unable to load dynamic library 'curl' (tried: C:\...\php\ext\curl (Das angegebene Modul wurde nicht gefunden), C:\...\php\ext\php_curl.dll (Das angegebene Modul wurde nicht gefunden)) in Unknown on line 0

Only the following works for me and adds the curl section in the Output of phpinfo():

LoadFile "${basePath}/php/brotlidec.dll"
LoadFile "${basePath}/php/libzstd.dll"
Back to top
admin
Site Admin


Joined: 15 Oct 2005
Posts: 758

PostPosted: Thu 18 Jun '26 11:13    Post subject: Reply with quote

Just try only the zstd.dll and libzstd.dll.

brotli we have it already for years.

We build from zstd-1.5.7.tar.gz from the bottom of page https://github.com/facebook/zstd/releases.

And have no libzstd.dll
Back to top
danielruf



Joined: 07 Jan 2026
Posts: 23

PostPosted: Thu 18 Jun '26 12:21    Post subject: Reply with quote

Quote:
Just try only the zstd.dll and libzstd.dll.
...
And have no libzstd.dll


I'm not sure I understand.

My question basically boils down to: why do we even have to manually add some LoadFile entries for the curl extension?

Is this expected and if so, should this be documented somewhere? Why was zstd then included but I still need the LoadFile entry?

I'm currently on your latest build with 2.4.68 (httpd-2.4.68-260617-Win64-VS18).
Back to top
admin
Site Admin


Joined: 15 Oct 2005
Posts: 758

PostPosted: Thu 18 Jun '26 13:02    Post subject: Reply with quote

Just try only to include zstd, to see if the issue is brotli or zstd

I think it is a PHP issue. The way it is build causes add some LoadFile.
Back to top
danielruf



Joined: 07 Jan 2026
Posts: 23

PostPosted: Thu 18 Jun '26 13:10    Post subject: Reply with quote

Understood, thank you.

I've now added only the following, instead of brotlidec + libzstd:

LoadFile "${basePath}/php/libzstd.dll"

This seems to work (we generally load the versions shipped with the PHP builds for Windows).

I'll try to report the requirement for this LoadFile in the PHP project. Maybe ther eis something that can be fixed / improved. At least to me it makes not much sense to manually add this, when the libraries are there in Apache and PHP is running as Apache module.

Edit: opened an issue at https://github.com/php/php-src/issues/22359 - maybe some mismatch leads to this
Back to top


Reply to topic   Topic: PHP 8.5.7 and curl 8.20.0 require loading of brotli and zstd View previous topic :: View next topic
Post new topic   Forum Index -> Other Software