Windows 2008 R2 64-bit server method to open PHP Curl extension _win Server

Source: Internet
Author: User
Tags curl phpinfo

Today a small series received a customer's question: The system is WINDOWS2008R2 version

Php_curl This extension is not open, I was thinking how possible, small allocation for many times each extension is opened this function

Into the server looked at the next no problem, Extension=php_curl.dll this is clearly open, Libeay32.dll, Ssleay32.dll, Php_curl.dll these several documents in C:\WINDOWS\ System32 directory also has, loading phpinfo why there is no curl item?

Re-registration in the beginning-run-input regsvr32 php_curl.dll hint is not compatible, suddenly think of small series in the morning also in the configuration of a PHP because the system is 32-bit 64-bit problem, at that time in the thinking will not configure the method is different, looked at the system is indeed 64-bit

Locate the SysWow64 file under the System file (this file is a subsystem of the Windows operating system that can run 32-bit applications and exist on all 64-bit versions of Windows)

With luck. Copy the top three DLL files to the SysWow64 folder and reboot the next IIS

Setup a test Site

Copy Code code as follows:

<?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 open, looked again the next phpinfo to check the next inside Curl expansion also has

Here to share with you, hehe ~

Summarize:

Php_curl extensions are not applied properly under 64 digits, you will need to copy Libeay32.dll, Ssleay32.dll, php_curl.dll three DLL files to the SysWow64 directory.

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: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.