How to solve the PHP startup: Unable to load dynamic library Error
Follow the installation instructions in the Apache + php + mysql installation diagram in my previous article. When you restart Apache, the system prompts that php_mysql.dll cannot be correctly loaded. A few articles have been written on the Internet. The prompt is: PHP startup: Unable to load dynamic library './php_mysql.dll. The specified module cannot be found. : D: \ php \ php-5.0.5-Win32 \ ext \ php_mysql.dll. Obviously php_mysql.dll is placed in extension_dir (= "D:/php/php-5.0.5-Win32/ext") well, in the environment variables set by the icon, no error! No! Some people say that copying libmysql. dll to % windir % \ system32 can solve the problem. After trying it and restarting it, it is still useless. Dizzy.
I put php on the d drive, or add a directory or something when setting it. Or is there no correct environment variable ?! % ProgramFiles % to D: \. As a result, some extensions that depend on other dll files cannot be loaded normally.
Error: Taking php_mysql.dll as an example, php_mysql depends on libmysql. dll. Because PHP is moved to the nest, the new D: \ PHP is not added to % PATH %.
, So the libmysql. dll cannot be found before an error occurs. Therefore, in order to be able to use these mysql extensions, in addition to correctly configuring extension_dir
To ensure that the system can use the dll that these extensions depend on. There are two solutions:
1. Copy the dependent dll to % windir % \ system32.
2. Add the PHP installation directory to % PATH %.
The preceding operations are not feasible. I used to copy all DLL files in the PHP Directory to windir % \ system32.
Try again.
Again. Copy php_mysql.dll to windir % \ system32,
Restart Apache!
Summary:
1. Set extension_dir correctly.
2. Copy the dependent dll to % windir % \ system32.
3. Add the PHP installation directory to % path %.
If it still doesn't work, just follow the above method.
Is to put those. All DLL files are copied to the windir % \ system32 directory.
You can fix php_mysql.dll and libmysql. dll.
Other methods are similar.
This is to COPY both the DLL and the dependent DLL to the windir % \ system32 directory.
Restart and you will know.
Simple enough.
Which extensions depend on which dll? See the following list:
Php_curl.dll CURL, Client URL library functions Requires: libeay32.dll, ssleay32.dll (bundled)
Php_domxml.dll dom xml functions PHP <= 4.2.0 requires: libxml2.dll
(Bundled) PHP> = 4.3.0 requires: iconv. dll (bundled)
Php_fdf.dll FDF: Forms Data Format functions. Requires: fdftk. dll
Gnu_gettext.dll (bundled), PHP> = 4.2.3 requires libintl-1.dll,
Php_iconv.dll ICONV characterset conversion Requires: iconv-1.3.dll
Php_ingres.dll Ingres II functions Requires: Ingres II libraries
Php_interbase.dll InterBase functions Requires: gds32.dll (bundled)
Php_java.dll Java functions PHP <= 4.0.6 requires: jvm. dll (bundled)
Php_ldap.dll LDAP functions PHP <= 4.2.0 requires libsasl. dll (bundled ),
PHP> = 4.3.0 requires libeay32.dll, ssleay32.dll (bundled)
Php_mcrypt.dll Mcrypt Encryption functions Requires: libmcrypt. dll
Php_mhash.dll Mhash functions PHP> = 4.3.0 requires: libmhash. dll (bundled)
Php_mcrypt.dll Mcrypt Encryption functions Requires: libmcrypt. dll
Php_mhash.dll Mhash functions PHP> = 4.3.0 requires: libmhash. dll (bundled)
Php_msql.dll mSQL functions Requires: msql. dll (bundled)
Php_mssql.dll MSSQL functions Requires: ntwdblib. dll (bundled)
Php_mysql.dll MySQL functions PHP> = 5.0.0, requires libmysql. dll (bundled)
Php_mysqli.dll MySQLi functions PHP> = 5.0.0, requires libmysqli. dll (bundled)
Php_oci8.dll Oracle 8 functions Requires: Oracle 8.1 + client libraries
Php_openssl.dll OpenSSL functions Requires: libeay32.dll (bundled)
Php_oracle.dll Oracle functions Requires: Oracle 7 client libraries
Php_sybase_ct.dll Sybase functions Requires: Sybase client libraries
Php_xmlrpc.dll XML-RPC functions PHP> = 4.2.1 requires: iconv. dll (bundled)
Php_cmdt.dll XSLT functions PHP <= 4.2.0 requires sablot. dll, expat. dll (bundled ).
PHP> = 4.2.1 requires sablot. dll, expat. dll, iconv. dll (bundled ).