Skip to content
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

Windows PHP 8.4.3 Extension Loading Problems #17616

Closed
tomshaw opened this issue Jan 29, 2025 · 5 comments
Closed

Windows PHP 8.4.3 Extension Loading Problems #17616

tomshaw opened this issue Jan 29, 2025 · 5 comments

Comments

@tomshaw
Copy link

tomshaw commented Jan 29, 2025

Description

Having problems loading extensions on Windows. Below are my Apache logs:

PHP Warning: PHP Startup: Unable to load dynamic library 'curl' (tried: C:\Php\php-8.4.3\ext\curl (The specified module could not be found), C:\Php\php-8.4.3\ext\php_curl.dll (The specified procedure could not be found)) in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library 'intl' (tried: C:\Php\php-8.4.3\ext\intl (The specified module could not be found), C:\Php\php-8.4.3\ext\php_intl.dll (The specified module could not be found)) in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library 'pgsql' (tried: C:\Php\php-8.4.3\ext\pgsql (The specified module could not be found), C:\Php\php-8.4.3\ext\php_pgsql.dll (The operating system cannot run %1)) in Unknown on line 0

PHP Version

PHP 8.4.3

Operating System

Windows 10

@damianwadley
Copy link
Member

All of those extensions have dependencies on other DLLs. Did you make sure those dependencies are available for Apache to load? And no, simply having them in the PHP directory isn't enough because the running application is Apache - not php.exe.

@tomshaw
Copy link
Author

tomshaw commented Jan 29, 2025

Apache is definitely setup correctly. Below is how I switch between Apache versions in my httpd.conf.

PHP-5/7/8

# LoadModule php5_module "C:/Php/php-5.6.40/php5apache2_4.dll"
# LoadModule php7_module "C:/Php/php-7.0.33/php7apache2_4.dll"
# LoadModule php7_module "C:/Php/php-7.2.34/php7apache2_4.dll"
# LoadModule php7_module "C:/Php/php-7.4.27/php7apache2_4.dll"
# LoadModule php_module "C:/Php/php-8.1.25/php8apache2_4.dll"
# LoadModule php_module "C:/Php/php-8.2.15/php8apache2_4.dll"
LoadModule php_module "C:/Php/php-8.4.3/php8apache2_4.dll"

# PHPIniDir C:/Php/php-5.6.40
# PHPIniDir C:/Php/php-7.0.33
# PHPIniDir C:/Php/php-7.2.34
# PHPIniDir C:/Php/php-7.4.27
# PHPIniDir C:/Php/php-8.1.25
# PHPIniDir C:/Php/php-8.2.15
PHPIniDir C:/Php/php-8.4.3

@damianwadley
Copy link
Member

That's nice, but I asked if you had the dependencies of those extensions' DLLs accessible to Apache. So I'm going to assume the answer is "no".

There are better solutions, but the simplest one is to add PHP to the PATH.

@damianwadley damianwadley closed this as not planned Won't fix, can't repro, duplicate, stale Jan 29, 2025
@tomshaw
Copy link
Author

tomshaw commented Jan 29, 2025

Nailed it. The solution was to update the system path. Obviously a long day for me.

Thank you.

@cmb69
Copy link
Member

cmb69 commented Jan 29, 2025

And no, simply having them in the PHP directory isn't enough because the running application is Apache

But see #16958.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants