php / php/php-src

Missleading, unhelpfull message in logs when loading curl and openssl

Open
#13,302 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Category: Dynamic Loading Feature OS: Windows Status: Needs Triage
Dominant language
C
Stars
40.4k
Forks
8.1k
Avg merge
2d 13h
Merged PRs (30d)
96

Description

Description

Pretty standard PHP 8.3 installation on Windows with Apache 2.4.

I load this extensions:

extension_dir = "c:/Prog/PHPs/PHP83/ext"

extension=ldap

extension=curl
extension=gd
extension=mbstring
;...
extension=openssl
;...

Resulted in this output (after each Apache restart):

[01-Feb-2024 12:35:41 UTC] PHP Warning:  PHP Startup: Unable to load dynamic library 'ldap' (tried: c:\Prog\PHPs\PHP83\ext\ldap (The specified module could not be found), c:\Prog\PHPs\PHP83\ext\php_ldap.dll (The specified module could not be found)) in Unknown on line 0
[01-Feb-2024 12:35:41 UTC] PHP Warning:  PHP Startup: Unable to load dynamic library 'curl' (tried: c:\Prog\PHPs\PHP83\ext\curl (The specified module could not be found), c:\Prog\PHPs\PHP83\ext\php_curl.dll (The specified module could not be found)) in Unknown on line 0
[01-Feb-2024 12:35:41 UTC] PHP Warning:  PHP Startup: Unable to load dynamic library 'openssl' (tried: c:\Prog\PHPs\PHP83\ext\openssl (The specified module could not be found), c:\Prog\PHPs\PHP83\ext\php_openssl.dll (The specified module could not be found)) in Unknown on line 0

But I expected this output instead:

[01-Feb-2024 12:35:41 UTC] PHP Warning:  PHP Startup: Unable to load dynamic library 'ldap' (found c:\Prog\PHPs\PHP83\ext\php_ldap.dll), but was unable to load it due to: X.

Note that I'm probably missing some DLL files that cURL needs or something... I think. That is why the message is misleading. The path 'c:\Prog\PHPs\PHP83\ext' is valid, and the DLL files of the extensions are all there.

PHP Version

PHP 8.3.2

Operating System

Windows 10 22H2

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 startup warnings on Windows 10 with PHP 8.3.2, using the extension configuration and paths shown in the issue. Trace PHP's Windows extension-loading diagnostics and make the log distinguish a missing extension DLL from a failure to load one of its dependencies; verify the resulting warning against the reported scenario.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
operating-systems
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.