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.net: Module compiled with module API=20180731, PHP compiled with module API=20240924 #17695

Closed
rogervila opened this issue Feb 4, 2025 · 2 comments

Comments

@rogervila
Copy link

Description

The following code:

// Download PHP 8.4 from https://windows.php.net/downloads/releases/php-8.4.3-Win32-vs17-x64.zip
// Enable extension=openssl in php.ini
// php -v

Resulted in this output:

Warning: PHP Startup: openssl: Unable to initialize module
Module compiled with module API=20180731
PHP    compiled with module API=20240924
These options need to match
 in Unknown on line 0
PHP 8.4.3 (cli) (built: Jan 15 2025 11:04:37) (ZTS Visual C++ 2022 x64)
Copyright (c) The PHP Group
Zend Engine v4.4.3, Copyright (c) Zend Technologies

But I expected this output instead:

PHP 8.4.3 (cli) (built: Jan 15 2025 11:04:37) (ZTS Visual C++ 2022 x64)
Copyright (c) The PHP Group
Zend Engine v4.4.3, Copyright (c) Zend Technologies

PHP Version

8.4.3

Operating System

Windows 11

@cmb69
Copy link
Member

cmb69 commented Feb 4, 2025

Make sure that extension_dir points to the folder where the PHP 8.4 extensions are located (not the PHP 7.3 extensions). For possible follow-up issues, see #16718 (especially the links at the end of the thread).

@cmb69 cmb69 closed this as not planned Won't fix, can't repro, duplicate, stale Feb 4, 2025
@rogervila
Copy link
Author

Thank you very much @cmb69

As you suggested, It has been fixed by uncommenting the extension_dir

; Directory in which the loadable extensions (modules) reside.
; https://php.net/extension-dir
;extension_dir = "./"
; On windows:
extension_dir = "ext"  <------ uncomment this line

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

2 participants