Solution to php_curl extension module loading failure in Windows

Source: Internet
Author: User
Tags curl php and phpinfo

Php_curl cannot be loaded in apache

Error message: Fatal error: Call to undefined function curl_init (). I guess someone may have a similar problem. Hurry up with Baidu and many people have encountered this problem.

1. Find libeay32.dll, ssleay32.dll, php_curl.dll, and php5ts in the PHP installation directory. dll files, some of which are in the ext Directory, are copied to system32. If the files cannot be found, download the corresponding version of PHP and copy them;

2. Check whether the php.exe, php5ts. dll, and php_curl.dll versions are the same. The version information will be displayed when you move the cursor over them;

3. Open your php. ini file. If you do not know where it is, you can first view the sixth line of the display path in phpinfo. Do not confuse it. Open it and make the following changes: remove the annotator (that is, semicolon) before php_curl. If necessary, remove the annotator before cgi. force_redirect and change the value 1 to 0;

4. Restart IIS or apache and run phpinfo to check whether the curl is successfully loaded. Ctrl + F searches for the curl. If no matching match exists, it is definitely not loaded successfully. If yes, congratulations, you have loaded it.

Specific solution

In php. ini, find extension = php_curl.dll and remove the preceding comment.
Set extension_dir = c: phpext. When the PHP page is refreshed, an error is reported, indicating that the module php_curl.dll cannot be found.
Copy php_curl.dll to windowssystem32.
After searching for it online, you need:

Libeay32.dll, ssleay32.dll, php5ts. dll, php_curl.dll

Copy them to the system32 directory and restart apache.


Iis php_curl attached cannot be used


PHP cannot load the php_curl.dll dynamic link library in IIS6 or IIS7.

In the PHP manual, there are related instructions: php_curl.dll; CURL, client URL library function library; required: libeay32.dll, ssleay32.dll (included)
Therefore, you only need to copy the libeay32.dll and ssleay32.dll libraries to the % WINDOWS % directory.

Related Article

E-Commerce Solutions

Leverage the same tools powering the Alibaba Ecosystem

Learn more >

Apsara Conference 2019

The Rise of Data Intelligence, September 25th - 27th, Hangzhou, China

Learn more >

Alibaba Cloud Free Trial

Learn and experience the power of Alibaba Cloud with a free trial worth $300-1200 USD

Learn more >

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: and provide relevant evidence. A staff member will contact you within 5 working days.