Method to enable the php curl extension in windows 2008 R2 64 bit server
- 2020-05-12 06:32:29
- OfStack
Today this site received 1 customer's question: the system is windows2008R2 version
The php_curl extension was not turned on, and I was thinking how could it be that this site has been configured so many times that each extension is this function turned on
extension= php_curl.dll this is obviously open, libeay32.dll, ssleay32.dll, php_curl.dll these files are also available in C:\WINDOWS\system32 directory, why is there no Curl item when loading phpinfo
When re-registering at start-run-input regsvr32 php_curl.dll, it was indicated that it was not compatible. It suddenly occurred to me that this site was also configuring an PHP in the morning, because the system was 32-bit 64-bit
Find the syswow64 file under the system file (this file is a subsystem of the windows operating system, capable of running 32-bit applications, and exists on all 64-bit versions of windows)
Luckily, I copied the above three DLL files into the syswow64 folder and restarted IIS
Set up a test site
<?php
$ch = curl_init();
curl_setopt($ch,CURLOPT_URL,"http://www.google.cn");
curl_setopt($ch,CURLOPT_HEADER,1);
curl_exec($ch);
curl_close($ch);
?>
The website appears, the website can be opened, revisited phpinfo looked up below the curl extension also has
Here to share with you, hey hey ~
Conclusion:
If the php_curl extension cannot be properly used in 64-bit mode, three DLL files, libeay32.dll, ssleay32.dll and php_curl.dll, should be copied to the directory syswow64.