• notice
  • Congratulations on the launch of the Sought Tech site

Problems and solutions encountered in opening curl service in win7 wamp 64-bit php environment

This article describes a simple way to open curl in PHP. Share for your reference, the details are as follows:

1. Question:

The "Call to undefined function curl_init" error message appears on the Windows host. There is no defined function, that is, PHP has not yet opened support for the curl_init function. When the website is built, it keeps prompting that the system does not support curl

Second, the solution:

Need to open the php curl function library. Specific steps are as follows:

① Open php.ini (usually in the C:\Windows\ directory, WampServer is generally in a directory similar to C:\wamp\bin\php\php5.3.8\), find

;extension=php_curl.dll

Remove the preceding semicolon ";"

② Check which directory the extension_dir value of php.ini is, check whether there is php_curl.dll in the directory, if not, please download php_curl.dll

③ Copy libeay32.dll and ssleay32.dll in the php directory to c:\windows\system32

④ Restart apache or iis.

(Second way to open) On the right side of the taskbar, find the wamp icon and left click > PHP > PHP Extensions > The second is php_curl to select him, and then wait for wamp to restart.

Use the phpinfo() function to view the configuration information, and you can see that curl is enabled:


Three, the solution:

If you haven't solved the above method, maybe you have changed the php.ini file, copied several dll files, and the wamp integrated environment also shows that curl is checked, but the curl cannot be printed and it keeps prompting that this function cannot be supported.

Note: If it is a 64-bit system, you also need to download the corresponding version of the 64-bit php compressed package. After decompression, overwrite the php_curl.dll in the ext directory over the wamp\bin\php\php5.4.12\ext directory of the corresponding version of wamp php php_curl.dll file and restart WAMP.

php 64-bit version: 5.3.13 php_curl.dll download

Other versions of php: http://www.anindya.com/

When I built a website in the local environment, there was also a problem that the curl function was not supported. Baidu tried various methods, and finally found that it was the reason of the 64-bit system. After changing the dll file, the prompt was successful. (Pro test is effective!)

Summarize

The above are the problems and solutions encountered by the win7 wamp 64-bit php environment to open the curl service introduced by the editor. I hope it will be helpful to you. If you have any questions, please leave a message to me, and the editor will reply you in time. of!


Tags

Technical otaku

Sought technology together

Related Topic

0 Comments

Leave a Reply

+