Skip to content
Advertisement

Running PHP in Windows: how to fix “PHP Startup: Unable to load dynamic library” issues?

I have determined path to php folder and trying to run some php file and getting this message from command line.

Microsoft Windows [Version 6.3.9600]
(c) 2013 Microsoft Corporation. All rights reserved.

C:UsersU1>php
Failed loading usrlocalphp5extphp_xdebug-2.2.0-5.3-vc9.dll
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/local/php5/extphp_curl.dll' - The specified module could not be found.
 in Unknown on line 0
<!--error-->
Warning: PHP Startup: Unable to load dynamic library '/usr/local/php5/ext
php_curl.dll' - The specified module could not be found.
 in Unknown on line 0
<script language=JavaScript src='/denwer/errors/phperror_js.php'></script>PHP Wa
rning:  PHP Startup: Unable to load dynamic library '/usr/local/php5/extphp_gd2
.dll' - The specified module could not be found.
 in Unknown on line 0
<!--error-->
Warning: PHP Startup: Unable to load dynamic library '/usr/local/php5/extphp_gd
2.dll' - The specified module could not be found.
 in Unknown on line 0
<script language=JavaScript src='/denwer/errors/phperror_js.php'></script>PHP Wa
rning:  PHP Startup: Unable to load dynamic library '/usr/local/php5/extphp_mbstring.dll' - The specified module could not be found.
 in Unknown on line 0
<!--error-->
Warning: PHP Startup: Unable to load dynamic library '/usr/local/php5/extphp_mb
string.dll' - The specified module could not be found.
 in Unknown on line 0
<script language=JavaScript src='/denwer/errors/phperror_js.php'></script>PHP Wa
rning:  PHP Startup: Unable to load dynamic library '/usr/local/php5/extphp_mysql.dll' - The specified module could not be found.
 in Unknown on line 0
<!--error-->
Warning: PHP Startup: Unable to load dynamic library '/usr/local/php5/extphp_my
sql.dll' - The specified module could not be found.
 in Unknown on line 0
<script language=JavaScript src='/denwer/errors/phperror_js.php'></script>PHP Wa
rning:  PHP Startup: Unable to load dynamic library '/usr/local/php5/extphp_mys
qli.dll' - The specified module could not be found.
 in Unknown on line 0
<!--error-->
Warning: PHP Startup: Unable to load dynamic library '/usr/local/php5/extphp_my
sqli.dll' - The specified module could not be found.
 in Unknown on line 0
<script language=JavaScript src='/denwer/errors/phperror_js.php'></script>PHP Wa
rning:  PHP Startup: Unable to load dynamic library '/usr/local/php5/extphp_pdo
_mysql.dll' - The specified module could not be found.
 in Unknown on line 0
<!--error-->
Warning: PHP Startup: Unable to load dynamic library '/usr/local/php5/extphp_pd
o_mysql.dll' - The specified module could not be found.
 in Unknown on line 0
<script language=JavaScript src='/denwer/errors/phperror_js.php'></script>PHP Wa
rning:  PHP Startup: Unable to load dynamic library '/usr/local/php5/extphp_pdo
_sqlite.dll' - The specified module could not be found.
 in Unknown on line 0
<!--error-->
Warning: PHP Startup: Unable to load dynamic library '/usr/local/php5/extphp_pd
o_sqlite.dll' - The specified module could not be found.
 in Unknown on line 0
<script language=JavaScript src='/denwer/errors/phperror_js.php'></script>PHP Wa
rning:  PHP Startup: Unable to load dynamic library '/usr/local/php5/extphp_sql
ite.dll' - The specified module could not be found.
 in Unknown on line 0
<!--error-->
Warning: PHP Startup: Unable to load dynamic library '/usr/local/php5/extphp_sq
lite.dll' - The specified module could not be found.
 in Unknown on line 0
<script language=JavaScript src='/denwer/errors/phperror_js.php'></script>PHP Wa
rning:  PHP Startup: Unable to load dynamic library '/usr/local/php5/extphp_soa
p.dll' - The specified module could not be found.
 in Unknown on line 0
<!--error-->
Warning: PHP Startup: Unable to load dynamic library '/usr/local/php5/extphp_so
ap.dll' - The specified module could not be found.
 in Unknown on line 0
<script language=JavaScript src='/denwer/errors/phperror_js.php'></script>PHP Wa
rning:  PHP Startup: Unable to load dynamic library '/usr/local/php5/extphp_sql
ite3.dll' - The specified module could not be found.
 in Unknown on line 0
<!--error-->
Warning: PHP Startup: Unable to load dynamic library '/usr/local/php5/extphp_sq
lite3.dll' - The specified module could not be found.
 in Unknown on line 0
<script language=JavaScript src='/denwer/errors/phperror_js.php'></script>PHP Wa
rning:  PHP Startup: Unable to load dynamic library '/usr/local/php5/extphp_xsl
.dll' - The specified module could not be found.
 in Unknown on line 0
<!--error-->
Warning: PHP Startup: Unable to load dynamic library '/usr/local/php5/ext
php_xsl.dll' - The specified module could not be found.
 in Unknown on line 0
<script language=JavaScript src='/denwer/errors/phperror_js.php'></script>
^A

All libraries are open on php.ini file. I have checked them all. I am wondering why command line tries to run library in incorrect path like

'/usr/local/php5/extphp_xsl.dll'

Does it should be like

'/usr/local/php5/ext/php_xsl.dll'

?

Advertisement

Answer

Open your php.ini file and set the following setting to a Windows file path:

extension_dir = "X:/path/to/your/php/ext"

On Windows, paths that point to something on a normal hard drive have to start with a letter and then a colon, like “C:“. Paths that start with a forward slash, /, are Unix-like paths, and will not work on Windows.

User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement