I build up a new development Windows with:
Windows 10 Prof. -
Apache 2.4.54 -
PHP 8.1.7
The problem is that PHP could not load the extension (it does not matter which one I activate).
Configuration in php.ini
extension_dir = "ext"
;;;;;;;;;;;;;;;;;;;;;;
; Dynamic Extensions ;
;;;;;;;;;;;;;;;;;;;;;;
extension=curl
extension=mbstring
extension=openssl
In the apache Log throw the following message:
PHP Warning: PHP Startup: Unable to load dynamic library 'curl' (tried: ext\\curl (The specified module could not be found), ext\\php_curl.dll (The specified module could not be found)) in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library 'mbstring' (tried: ext\\mbstring (The specified module could not be found), ext\\php_mbstring.dll (The specified module could not be found)) in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library 'openssl' (tried: ext\\openssl (The specified module could not be found), ext\\php_openssl.dll (The specified module could not be found)) in Unknown on line 0
The installation paths are: c:\Webserver\Apache24
c:\Webserver\php
At first I thought of a permission problem, so I open the hole directory of "Webserver" to "everyone" with "full access", but this does not solve the problem.
Looks like I found the problem. After I added the path of the PHP folder to the Windows environment variables and restart windows, the error message was gone.
When I uncomment "app: cache.adapter.apcu" in the cache.yaml file to enable cache service configuration I get this Symfony Exception -
This is the full error I get in terminal when I config:debug cache
"C:\xampp\htdocs\symfony\symfony-fundamentals-course-2>php bin/console
config:debug cache PHP Warning: PHP Startup: Unable to load dynamic
library 'php_apcu.dll' (tried: C:\xampp\php\ext\php_apcu.dll (The
specified module could not be found.),
C:\xampp\php\ext\php_php_apcu.dll.dll (The specified module could not
be fo und.)) in Unknown on line 0
Warning: PHP Startup: Unable to load dynamic library 'php_apcu.dll'
(tried: C:\xampp\php\ext\php_apcu.dll (The spec ified module could not
be found.), C:\xampp\php\ext\php_php_apcu.dll.dll (The specified
module could not be found.) ) in Unknown on line 0
In ApcuAdapter.php line 28:
APCu is not enabled.
I tried installing APCu into my php ext directory with this guide(http://robert-rusu.blogspot.com/2014/06/install-apcu-on-windows.html)
I would like to install the php_bolt extension in php in order to encode my souces.
I have placed my php_bolt.dll file in the php extensions folder.
In my php.ini file I add the line extension=php_bolt.dll.
the extension is still not loaded. And I do not know why.
In command line I have the following error
PHP Startup: Unable to load dynamic library 'php_bolt.dll' (tried: G: /wamp64/bin/php/php7.2.25/ext/php_bolt.dll
(The specified module could not be found.), G:/wamp64/bin/php/php7.2.25/ext/php_php_bolt.dll.dll
(The specified module could not be found.)) in Unknown on line 0
Warning: PHP Startup: Unable to load dynamic library 'gd2' (tried:
E:\phpXampp\php\ext\gd2 (The specified module could not be found.),
E:\phpXampp\php\ext\php_gd2.dll (The specified module could not be
found.)) in Unknown on line 0 PHP Warning: PHP Startup: Unable to
load dynamic library 'gettext' (tried: E:\phpXampp\php\ext\gettext
(The specified module could not be found.),
E:\phpXampp\php\ext\php_gettext.dl l (The specified module could not
be found.)) in Unknown on line 0
I have this problem installing laravel. Actual link is
E:\XAMPPL\php\ext\gettext while it show E:\phpXampp\php\ext\gettext in warning.
How to change the path?
Go to you php installation folder - I'm guessing this is E:\XAMPPL\php\. Open and edit the php.ini file there.
Look for the line containing extension_dir. This is used by php to locate your extensions. Edit this line to:
extension_dir = "E:\XAMPPL\php\ext"
This should solve the problem.
Alternatively, you could just edit it to:
extension_dir = "ext"
They both refer to the same path.
I uninstalled composer and then installed latest composer setup and restarted my PC. And it Worked.
when I try to run my unit tests, I get this error
PHP Warning: PHP Startup: Unable to load dynamic library 'bz2'
(tried: \xampp\php\ext\bz2 (The specified module could not be found.),
\xampp\php\ext\php_bz2.dll (The specified module could not be found.))
in Unknown on line 0 PHP Warning: PHP Startup: Unable to load dynamic
library 'curl' (tried: \xampp\php\ext\curl (The specified module could
not be found.), \xampp\php\ext\php_curl.dll (The specified module
could not be found.)) in Unknown on line 0 PHP Warning: PHP Startup:
Unable to load dynamic library 'fileinfo' (tried:
\xampp\php\ext\fileinfo (The specified module could not be found.),
\xampp\php\ext\php_fileinfo.dll (The specified module could not be
found.)) in Unknown on line 0 PHP Warning: PHP Startup: Unable to
load dynamic library 'gd2' (tried: \xampp\php\ext\gd2 (The specified
module could not be found.), \xampp\php\ext\php_gd2.dll (The specified
module could not be found.)) in Unknown on line 0 PHP Warning: PHP
Startup: Unable to load dynamic library 'gettext' (tried:
\xampp\php\ext\gettext (The specified module could not be found.),
\xampp\php\ext\php_gettext.dll (The specified module could not be
found.)) in Unknown on line 0 PHP Warning: PHP Startup: Unable to
load dynamic library 'mbstring' (tried: \xampp\php\ext\mbstring (The
specified module could not be found.), \xampp\php\ext\php_mbstring.dll
(The specified module could not be found.)) in Unknown on line 0 PHP
Warning: PHP Startup: Unable to load dynamic library 'exif' (tried:
\xampp\php\ext\exif (The specified module could not be found.),
\xampp\php\ext\php_exif.dll (The specified module could not be
found.)) in Unknown on line 0 PHP Warning: PHP Startup: Unable to
load dynamic library 'mysqli' (tried: \xampp\php\ext\mysqli (The
specified module could not be found.), \xampp\php\ext\php_mysqli.dll
(The specified module could not be found.)) in Unknown on line 0 PHP
Warning: PHP Startup: Unable to load dynamic library 'pdo_mysql'
(tried: \xampp\php\ext\pdo_mysql (The specified module could not be
found.), \xampp\php\ext\php_pdo_mysql.dll (The specified module could
not be found.)) in Unknown on line 0 PHP Warning: PHP Startup: Unable
to load dynamic library 'pdo_sqlite' (tried: \xampp\php\ext\pdo_sqlite
(The specified module could not be found.),
\xampp\php\ext\php_pdo_sqlite.dll (The specified module could not be
found.)) in Unknown on line 0 PHP Warning: PHP Startup: Unable to
load dynamic library 'php_openssl.dll' (tried:
\xampp\php\ext\php_openssl.dll (The specified module could not be
found.), \xampp\php\ext\php_php_openssl.dll.dll (The specified module
could not be found.)) in Unknown on line 0 PHP Warning: PHP Startup:
Unable to load dynamic library 'php_ftp.dll' (tried:
\xampp\php\ext\php_ftp.dll (The specified module could not be found.),
\xampp\php\ext\php_php_ftp.dll.dll (The specified module could not be
found.)) in Unknown on line 0 PHP Warning: Cannot open
'\xampp\php\extras\browscap.ini' for reading in Unknown on line 0
Warning: PHP Startup: Unable to load dynamic library 'bz2' (tried: \xampp\php\ext\bz2 (The specified module could not be found.),
\xampp\php\ext\php_bz2.dll (The specified module could not be found.))
in Unknown on line 0
Warning: PHP Startup: Unable to load dynamic library 'curl' (tried: \xampp\php\ext\curl (The specified module could not be found.),
\xampp\php\ext\php_curl.dll (The specified module could not be
found.)) in Unknown on line 0
Warning: PHP Startup: Unable to load dynamic library 'fileinfo' (tried: \xampp\php\ext\fileinfo (The specified module could not be
found.), \xampp\php\ext\php_fileinfo.dll (The specified module could
not be found.)) in Unknown on line 0
Warning: PHP Startup: Unable to load dynamic library 'gd2' (tried:
\xampp\php\ext\gd2 (The specified module could not be found.),
\xampp\php\ext\php_gd2.dll (The specified module could not be found.))
in Unknown on line 0
Warning: PHP Startup: Unable to load dynamic library 'gettext' (tried:
\xampp\php\ext\gettext (The specified module could not be found.),
\xampp\php\ext\php_gettext.dll (The specified module could not be
found.)) in Unknown on line 0
Warning: PHP Startup: Unable to load dynamic library 'mbstring'
(tried: \xampp\php\ext\mbstring (The specified module could not be
found.), \xampp\php\ext\php_mbstring.dll (The specified module could
not be found.)) in Unknown on line 0
Warning: PHP Startup: Unable to load dynamic library 'exif' (tried:
\xampp\php\ext\exif (The specified module could not be found.),
\xampp\php\ext\php_exif.dll (The specified module could not be
found.)) in Unknown on line 0
Warning: PHP Startup: Unable to load dynamic library 'mysqli' (tried:
\xampp\php\ext\mysqli (The specified module could not be found.),
\xampp\php\ext\php_mysqli.dll (The specified module could not be
found.)) in Unknown on line 0
Warning: PHP Startup: Unable to load dynamic library 'pdo_mysql'
(tried: \xampp\php\ext\pdo_mysql (The specified module could not be
found.), \xampp\php\ext\php_pdo_mysql.dll (The specified module could
not be found.)) in Unknown on line 0
Warning: PHP Startup: Unable to load dynamic library 'pdo_sqlite'
(tried: \xampp\php\ext\pdo_sqlite (The specified module could not be
found.), \xampp\php\ext\php_pdo_sqlite.dll (The specified module could
not be found.)) in Unknown on line 0
Warning: PHP Startup: Unable to load dynamic library 'php_openssl.dll'
(tried: \xampp\php\ext\php_openssl.dll (The specified module could not
be found.), \xampp\php\ext\php_php_openssl.dll.dll (The specified
module could not be found.)) in Unknown on line 0
Warning: PHP Startup: Unable to load dynamic library 'php_ftp.dll'
(tried: \xampp\php\ext\php_ftp.dll (The specified module could not be
found.), \xampp\php\ext\php_php_ftp.dll.dll (The specified module
could not be found.)) in Unknown on line 0
Could somebody help me ? Thanks.
Running in PHPstorm, Win 10
You may need to edit your php.ini file and restart the server. Add absolute paths in php.ini configuration. It worked for xampp server in my windows 8.1 machine.
example:
extension_dir="\xampp\php\ext" to
extension_dir="C:\xampp\php\ext"
Reference: How to fix PHP Warning: PHP Startup: Unable to load dynamic library 'ext\\php_curl.dll'?
Edit:
Additionally for my some cases, needs to edit
browscap="xampp\php\extras\browscap.ini" to
browscap="C:\xampp\php\extras\browscap.ini"
You are missing the b2z module for php.
Which is normally included in the php package for windows
I would suggest reinstalling php or manually moving the package from the download to the correct folder or switching to a vagrant environment.
Download:
https://windows.php.net/download/
In the folder ext/bz2
Move these folder contents over to the according folder.
Just comment out ;extension=pdo_sqlite in php.ini if you don't need it. It was enabled by default in my configuration and the error message is gone.
I had faced the same problem after updating my php version from 7.0 to the latest version which is 8.1.3 as for now , the solution I used was :-
Just comment the extension in the php.ini found in (C:\xampp\php\php.ini)
extension=gd2
Note: comment by prefixing semicolon at the start
I have fought with this for the last 12 hours on my Windows 10 box. For anyone having the same trouble I am having, you need to edit the php.ini to call out the full name of the DLL file. I had to change pdo_sqlite to php_pdo_sqlite.dll and sqlite3 to php_sqlite3.dll.
after adding php ext dir in php.ini, i also needed to add php dir to windows path (environment variables)
In your php.ini file,
find text=> extension=gd2
and make it ;extension=gd2
For windows 10 users, make open "XAMP" programe, then at apache click button "config"
then edit "php.ini".
#1- remove the semicolon (;) before this line
extension=php_gd.dll
#2- restart xamp
#Problem : when try to "composer update" print error:
Problem 1
- maatwebsite/excel[3.1.28, ..., 3.1.30] require phpoffice/phpspreadsheet 1.16.* -> satisfiable by phpoffice/pfice/phpspreadsheet[1.16.0].
- maatwebsite/excel[3.1.31, ..., 3.1.x-dev] require phpoffice/phpspreadsheet ^1.18 -> satisfiable by phpofficeoffice/phpspreadsheet[1.18.0, ..., 1.25.2].
- maatwebsite/excel 3.1.27 requires phpoffice/phpspreadsheet ^1.16 -> satisfiable by phpoffice/phpspreadsheet[sheet[1.16.0, ..., 1.25.2].
- maatwebsite/excel 3.1.26 requires phpoffice/phpspreadsheet ^1.15 -> satisfiable by phpoffice/phpspreadsheet[sheet[1.15.0, ..., 1.25.2].
- maatwebsite/excel[3.1.0, ..., 3.1.25] require php ^7.0 -> your php version (8.1.6) does not satisfy that reqat requirement.
- phpoffice/phpspreadsheet[1.15.0, ..., 1.25.2] require ext-gd * -> it is missing from your system. Install orall or enable PHP's gd extension.
- Root composer.json requires maatwebsite/excel ^3.1 -> satisfiable by maatwebsite/excel[3.1.0, ..., 3.1.x-dev.x-dev].
To enable extensions, verify that they are enabled in your .ini files:
- C:\xampp\php\php.ini
You can also run `php --ini` inside terminal to see which files are used by PHP in CLI mode.
enter image description here