I need to link SQL server with my PHP I have downloaded the drivers and placed them in the C:\xampp\php\ext file already.
Updated the php.ini file as well:
extension_dir="C:\xampp\php\ext"
;SQL Server Ext
extension=php_pdo_sqlsrv_74_ts_x64.dll
extension=php_sqlsrv_74_ts_x64.dll
but I get this error:
PHP Warning: PHP Startup: Unable to load dynamic library 'php_pdo_sqlsrv_74_ts_x64.dll' (tried: C:\xampp\php\ext\php_pdo_sqlsrv_74_ts_x64.dll (The specified module could not be found.), C:\xampp\php\ext\php_php_pdo_sqlsrv_74_ts_x64.dll.dll (The specified module could not be found.)) in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library 'php_sqlsrv_74_ts_x64.dll' (tried: C:\xampp\php\ext\php_sqlsrv_74_ts_x64.dll (The specified module could not be found.), C:\xampp\php\ext\php_php_sqlsrv_74_ts_x64.dll.dll (The specified module could not be found.)) in Unknown on line 0
I am using PHP V 7.4.27 and my PHP Extension build is TS
My architecture is x64
I've installed PHP 7.4.11 on macOS using Homebrew.
When I tried to enable extensions which are built with PHP, such as sqlite3 and pdo_sqlite, the extensions couldn't be found, as implied from the following warnings:
PHP Warning: PHP Startup: Unable to load dynamic library 'pdo_sqlite' (tried: /usr/local/lib/php/pecl/20190902/pdo_sqlite (dlopen(/usr/local/lib/php/pecl/20190902/pdo_sqlite, 9): image not found), /usr/local/lib/php/pecl/20190902/pdo_sqlite.so (dlopen(/usr/local/lib/php/pecl/20190902/pdo_sqlite.so, 9): image not found)) in Unknown on line 0
Warning: PHP Startup: Unable to load dynamic library 'pdo_sqlite' (tried: /usr/local/lib/php/pecl/20190902/pdo_sqlite (dlopen(/usr/local/lib/php/pecl/20190902/pdo_sqlite, 9): image not found), /usr/local/lib/php/pecl/20190902/pdo_sqlite.so (dlopen(/usr/local/lib/php/pecl/20190902/pdo_sqlite.so, 9): image not found)) in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library 'sqlite3' (tried: /usr/local/lib/php/pecl/20190902/sqlite3 (dlopen(/usr/local/lib/php/pecl/20190902/sqlite3, 9): image not found), /usr/local/lib/php/pecl/20190902/sqlite3.so (dlopen(/usr/local/lib/php/pecl/20190902/sqlite3.so, 9): image not found)) in Unknown on line 0
Warning: PHP Startup: Unable to load dynamic library 'sqlite3' (tried: /usr/local/lib/php/pecl/20190902/sqlite3 (dlopen(/usr/local/lib/php/pecl/20190902/sqlite3, 9): image not found), /usr/local/lib/php/pecl/20190902/sqlite3.so (dlopen(/usr/local/lib/php/pecl/20190902/sqlite3.so, 9): image not found)) in Unknown on line 0
In my extension's directory, /usr/local/lib/php/pecl/20190902/, there is not a single file. I expected shared object (.so) files for all the extensions built with PHP.
I also tried installing PHP 8.0 using the command brew install php --HEAD, but the problem persists. According to the Homebrew formula for PHP, all these extensions such as sqlite3, pdo_sqlite, etc should be built with PHP.
Can anyone tell me how I can resolve this issue?
I have previously installed servers like xampp and appserv but I uninstalled those for some reasons.
and now I want to use php from command line and after I set the path in Environment Variables . and changed the php.ini as some previous answers mentioned it didn't resolve my problem.
I'm guessing that appserv has tampered with some files thus I installed the latest version of PHP Hoping that those libraries will exist but got the same error
and this is the error I get when typing php -v in command line:
php -v PHP Warning: PHP Startup: Unable to load dynamic library
'php_dbase.dll' (tried: C:/AppServ\php5\ext\php_dbase.dll (The
specified module could not be found.),
C:/AppServ\php5\ext\php_php_dbase.dll.dll (The specified module could
not be found.)) in Unknown on line 0 PHP Warning: PHP Startup: Unable
to load dynamic library 'php_gd2.dll' (tried:
C:/AppServ\php5\ext\php_gd2.dll (The specified module could not be
found.), C:/AppServ\php5\ext\php_php_gd2.dll.dll (The specified module
could not be found.)) in Unknown on line 0 PHP Warning: PHP Startup:
Unable to load dynamic library 'php_mbstring.dll' (tried:
C:/AppServ\php5\ext\php_mbstring.dll (The specified module could not
be found.), C:/AppServ\php5\ext\php_php_mbstring.dll.dll (The
specified module could not be found.)) in Unknown on line 0 PHP
Warning: PHP Startup: Unable to load dynamic library 'php_mysql.dll'
(tried: C:/AppServ\php5\ext\php_mysql.dll (The specified module could
not be found.), C:/AppServ\php5\ext\php_php_mysql.dll.dll (The
specified module could not be found.)) in Unknown on line 0 PHP
Warning: PHP Startup: Unable to load dynamic library 'php_mysqli.dll'
(tried: C:/AppServ\php5\ext\php_mysqli.dll (The specified module could
not be found.), C:/AppServ\php5\ext\php_php_mysqli.dll.dll (The
specified module could not be found.)) in Unknown on line 0 PHP
Warning: PHP Startup: Unable to load dynamic library
'php_sockets.dll' (tried: C:/AppServ\php5\ext\php_sockets.dll (The
specified module could not be found.),
C:/AppServ\php5\ext\php_php_sockets.dll.dll (The specified module
could not be found.)) in Unknown on line 0
Fatal error: Directive 'allow_call_time_pass_reference' is no longer
available in PHP in Unknown on line 0
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
I am using xampp 1.8.1 and I integrated php 5.2.9 to it by using the patch delivered by apachelounge
I have started apache it was started normally but it shows some errors with the php extensions
[02-Nov-2012 10:56:42] PHP Warning: PHP Startup: Unable to load dynamic library 'C:\Program Files (x86)\Secoweb\xampp\php\ext\php_mcrypt.dll' - The specified module could not be found. in Unknown on line 0
[02-Nov-2012 10:56:42] PHP Warning: PHP Startup: Unable to load dynamic library 'C:\Program Files (x86)\Secoweb\xampp\php\ext\php_mssql.dll' - The specified module could not be found. in Unknown on line 0
[02-Nov-2012 10:56:42] PHP Warning: PHP Startup: Unable to load dynamic library 'C:\Program Files (x86)\Secoweb\xampp\php\ext\php_pdo_mssql.dll' - The specified module could not be found.in Unknown on line 0
[02-Nov-2012 10:56:42] PHP Warning: PHP Startup: Unable to load dynamic library 'C:\Program Files (x86)\Secoweb\xampp\php\ext\php_pgsql.dll' - The specified module could not be found.in Unknown on line 0
[02-Nov-2012 10:56:42] PHP Warning: PHP Startup: Unable to load dynamic library 'C:\Program Files (x86)\Secoweb\xampp\php\ext\php_ps.dll' - The specified module could not be found. in Unknown on line 0
[02-Nov-2012 10:56:42] PHP Warning: PHP Startup: Unable to load dynamic library 'C:\Program Files (x86)\Secoweb\xampp\php\ext\php_paradox.dll' - The specified module could not be found.in Unknown on line 0
[02-Nov-2012 10:56:45] PHP Warning: PHP Startup: Unable to load dynamic library 'C:\Program Files (x86)\Secoweb\xampp\php\ext\php_mcrypt.dll' - The specified module could not be found.in Unknown on line 0
[02-Nov-2012 10:56:45] PHP Warning: PHP Startup: Unable to load dynamic library 'C:\Program Files (x86)\Secoweb\xampp\php\ext\php_mssql.dll' - The specified module could not be found.in Unknown on line 0
[02-Nov-2012 10:56:45] PHP Warning: PHP Startup: Unable to load dynamic library 'C:\Program Files (x86)\Secoweb\xampp\php\ext\php_pdo_mssql.dll' - The specified module could not be found.in Unknown on line 0
[02-Nov-2012 10:56:45] PHP Warning: PHP Startup: Unable to load dynamic library 'C:\Program Files (x86)\Secoweb\xampp\php\ext\php_pgsql.dll' - The specified module could not be found.in Unknown on line 0
[02-Nov-2012 10:56:45] PHP Warning: PHP Startup: Unable to load dynamic library 'C:\Program Files (x86)\Secoweb\xampp\php\ext\php_ps.dll' - The specified module could not be found.in Unknown on line 0
[02-Nov-2012 10:56:45] PHP Warning: PHP Startup: Unable to load dynamic library 'C:\Program Files (x86)\Secoweb\xampp\php\ext\php_paradox.dll' - The specified module could not be found.in Unknown on line 0
I refereed Stackoverflow question in this link . and I followed the steps but it was also a failure.
I had these dll's in xampp/php/ext folder, I tried by putting dll's in system32 folder. I was also not working.
I am using mcrypt for password encryption and decryption. So please help me to start php with mcrypt extension.
Thanks in advance
Jishnu
Finally I am able to find out the solutions for the issue.
It was due to the libmcrypt.dll dependency issue, So I put the libmcrypt.dll into apache folder and restarted the apache. also I commented all the unwanted extensions so phperrorlog is clean now.
libmcrypt.dll is present in the php folder I fixed the issue by moving the dll into apache/bin folder
Now Xampp 1.8.1 is working perfectly with php 5.2.9