PHP启动提示Unable to load dynamic library php_curl.dll怎么办
PHP启动提示Unable to load dynamic library php_curl.dll怎么办 ,下面我们来看解决办法哦
这个问题容易手配PHP的时候出现, 在php.ini中正确开启了curl扩展后, 在PHPINFO中却看不到相关的信息, 而Apache的日志会显示以下错误:
PHP Warning: PHP Startup: Unable to load dynamic library 'D:\DEV\ENV\php-5.3.10\ext\php_curl.dll' - xd5xd2xb2xbbxb5xbdxd6xb8xb6xa8xb5xc4xc4xa3xbfxe9xa1xa3rn in Unknown on line 0
什么原因造成的这个问题呢?
答案是curl扩展对库文件有依赖, 就像在Linux下面编译PHP的时候也需要安装依赖的库一样.
在PHP官网手册的Windows下安装扩展库的页面上已经详细的标注了PHP所有的扩展文件依赖那些库. 其中特别提示了以下内容 (http://php.net/manual/zh/install.windows.extensions.php)
有些扩展库需要额外的 DLL 才能工作。其中一部分包括在发行包里,PHP 4 中在 C:phpdlls目录下,PHP 5 中在主目录下,但还有一些,例如 Oracle( php_oci8.dll)所需要的 DLL 没有绑定在发行包里。如果安装 PHP 4,将绑定的 DLL 从 C:phpdlls拷贝到主目录 C:php中。别忘了将 C:php放到系统路径 PATH中去
在页面的介绍中,我们可以查询到curl扩展依赖libeay32.dll, ssleay32.dll这两个库文件, 这两个文件已经附属在PHP的Windows程序包中,我们无需去单独下载. 搞清楚了这些, 解决方法也很简单了: 让Windows或者Apache能顺利加载到这个2个dll文件即可, 下面我列出几个解决方案
方案1 将libeay32.dll, ssleay32.dll拷贝到c:windowssystem32文件夹中
方案2 将你PHP程序的目录加入到系统的PATH变量中即可
方案3 如果你使用的是Apache服务器且使用模块的方式来运行PHP的话, 可以在httpd.conf中加载PHP模块的配置语句之前加上下面两句话让Apache来加载这两个dll, 例子如下:
代码如下 | 复制代码 |
LoadFile "D:DEVENVphp-5.3.10ssleay32.dll" LoadModule php5_module "D:DEVENVphp-5.3.10php5apache2_2.dll" |

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics



PHP 8.4 brings several new features, security improvements, and performance improvements with healthy amounts of feature deprecations and removals. This guide explains how to install PHP 8.4 or upgrade to PHP 8.4 on Ubuntu, Debian, or their derivati

Working with database in CakePHP is very easy. We will understand the CRUD (Create, Read, Update, Delete) operations in this chapter.

To work with date and time in cakephp4, we are going to make use of the available FrozenTime class.

To work on file upload we are going to use the form helper. Here, is an example for file upload.

CakePHP is an open-source framework for PHP. It is intended to make developing, deploying and maintaining applications much easier. CakePHP is based on a MVC-like architecture that is both powerful and easy to grasp. Models, Views, and Controllers gu

Validator can be created by adding the following two lines in the controller.

Logging in CakePHP is a very easy task. You just have to use one function. You can log errors, exceptions, user activities, action taken by users, for any background process like cronjob. Logging data in CakePHP is easy. The log() function is provide

Visual Studio Code, also known as VS Code, is a free source code editor — or integrated development environment (IDE) — available for all major operating systems. With a large collection of extensions for many programming languages, VS Code can be c
