PHP startup: Unable to load dynamic library错误的错误




PHP startup: Unable to load dynamic library错误的错误

2022-07-20 21:06:50 网络知识 官方管理员

怪啦!今天的Apache和IIS都没法正确加载php_mysql.dll。google了一下,原来发现出现这个问题的人还不少,PHPstartup:Unabletoloaddynamiclibrary:E;\PHP5\ext\php_mysql.dll。明明php_mysql.dll就摆在extension_dir(="E:/PHP5/ext")下的嘛,怎么会呢?而且就在php_mysql.dll之前的extension=php_gd2.dll都没有出现这个问题,怪了!有人说copylibmysql.dll到%windir%\system32下就可以解决问题,其实"华山不这一条道":

PHP被我挪了个窝,%ProgramFiles%到E:\下,导致一些要依赖于其他dll才能工作的扩展无法正常加载这些dll,出现加载扩展出

错,以刚才的php_mysql.dll为例,php_mysql依赖libmysql.dll,由于给PHP5挪窝了,而又没有把新的E:\PHP5夹道%PATH%中去

,所以没法找到这个libmysql.dll,才会出错。所以为了能够使用这些mysql的扩展,除了要正确地配置extension_dir外

,还得保证系统能够这些扩展所依赖的dll,解决的办法有两个:

1将这些依赖的dll拷贝到%windir%\system32下

2或者将PHP5的安装目录添加到%PATH%中。

无论那个都可以很好地达到我们地目的。

够简单的,但是有时候还就想不到哪儿去。

到底哪些扩展依赖哪些dll呢?以下列表可以帮助我们回答这个问题:

php_curl.dllCURL,ClientURLlibraryfunctionsRequires:libeay32.dll,ssleay32.dll(bundled)

php_domxml.dllDOMXMLfunctionsPHP<=4.2.0requires:libxml2.dll

(bundled)PHP>=4.3.0requires:iconv.dll(bundled)

php_fdf.dllFDF:FormsDataFormatfunctions.Requires:fdftk.dll

gnu_gettext.dll(bundled),PHP>=4.2.3requireslibintl-1.dll,

php_iconv.dllICONVcharactersetconversionRequires:iconv-1.3.dll

php_ingres.dllIngresIIfunctionsRequires:IngresIIlibraries

php_interbase.dllInterBasefunctionsRequires:gds32.dll(bundled)

php_java.dllJavafunctionsPHP<=4.0.6requires:jvm.dll(bundled)

php_ldap.dllLDAPfunctionsPHP<=4.2.0requireslibsasl.dll(bundled),

PHP>=4.3.0requireslibeay32.dll,ssleay32.dll(bundled)

php_mcrypt.dllMcryptEncryptionfunctionsRequires:libmcrypt.dll

php_mhash.dllMhashfunctionsPHP>=4.3.0requires:libmhash.dll(bundled)

php_mcrypt.dllMcryptEncryptionfunctionsRequires:libmcrypt.dll

php_mhash.dllMhashfunctionsPHP>=4.3.0requires:libmhash.dll(bundled)

php_msql.dllmSQLfunctionsRequires:msql.dll(bundled)

php_mssql.dllMSSQLfunctionsRequires:ntwdblib.dll(bundled)

php_mysql.dllMySQLfunctionsPHP>=5.0.0,requireslibmysql.dll(bundled)

php_mysqli.dllMySQLifunctionsPHP>=5.0.0,requireslibmysqli.dll(bundled)

php_oci8.dllOracle8functionsRequires:Oracle8.1+clientlibraries

php_openssl.dllOpenSSLfunctionsRequires:libeay32.dll(bundled)

php_oracle.dllOraclefunctionsRequires:Oracle7clientlibraries

php_sybase_ct.dllSybasefunctionsRequires:Sybaseclientlibraries

php_xmlrpc.dllXML-RPCfunctionsPHP>=4.2.1requires:iconv.dll(bundled)

php_xslt.dllXSLTfunctionsPHP<=4.2.0requiressablot.dll,expat.dll(bundled).

PHP>=4.2.1requiressablot.dll,expat.dll,iconv.dll(bundled).

看文档耐心不够,自己找了点麻烦。:P


发表评论:

最近发表
网站分类
标签列表