Home php教程 php手册 PHP启动提示Unable to load dynamic library php_curl.dll怎么办

PHP启动提示Unable to load dynamic library php_curl.dll怎么办

Jun 13, 2016 am 09:56 AM
dynamic library load php start up what to do hint

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"
LoadFile "D:DEVENVphp-5.3.10libeay32.dll"

LoadModule php5_module "D:DEVENVphp-5.3.10php5apache2_2.dll"

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Best Graphic Settings
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. How to Fix Audio if You Can't Hear Anyone
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
WWE 2K25: How To Unlock Everything In MyRise
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

PHP 8.4 Installation and Upgrade guide for Ubuntu and Debian PHP 8.4 Installation and Upgrade guide for Ubuntu and Debian Dec 24, 2024 pm 04:42 PM

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

CakePHP Working with Database CakePHP Working with Database Sep 10, 2024 pm 05:25 PM

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

CakePHP Date and Time CakePHP Date and Time Sep 10, 2024 pm 05:27 PM

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

CakePHP File upload CakePHP File upload Sep 10, 2024 pm 05:27 PM

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

Discuss CakePHP Discuss CakePHP Sep 10, 2024 pm 05:28 PM

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

CakePHP Creating Validators CakePHP Creating Validators Sep 10, 2024 pm 05:26 PM

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

CakePHP Logging CakePHP Logging Sep 10, 2024 pm 05:26 PM

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

How To Set Up Visual Studio Code (VS Code) for PHP Development How To Set Up Visual Studio Code (VS Code) for PHP Development Dec 20, 2024 am 11:31 AM

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

See all articles