Home  >  Article  >  Backend Development  >  How to handle the php_curl extension module that cannot be loaded normally_PHP Tutorial

How to handle the php_curl extension module that cannot be loaded normally_PHP Tutorial

WBOY
WBOYOriginal
2016-07-21 14:52:00989browse

I finally wrote a set of programs to automatically include websites through my own study. Just when I transferred the source code to the server for demonstration and sharing with everyone, I suddenly found that the URL could not be added normally, and the error Fatal error was prompted. :Call to undefined function curl_init(). I guess someone may have similar problems, so I quickly searched on Baidu, and sure enough, many people encountered this problem.

 The general method is summarized as follows:

1. Find the four DLL files libeay32.dll, ssleay32.dll, php_curl.dll and php5ts.dll in the PHP installation directory. Some of them are in the ext directory. After finding them, copy them to system32. If they cannot be found, Please download the corresponding version of PHP and copy it;

2. Check whether the versions of php.exe, php5ts.dll and php_curl.dll are the same. Wherever you place the mouse, the version information will be displayed;

3. Open your php.ini file. If you don’t know where it is, you can check the sixth line of phpinfo to display the path. Don’t get confused. Open it and make the following modifications: Change the comment character before php_curl (that is, the semicolon ) removed. If necessary, remove the comment character before cgi.force_redirect and change the value 1 to 0;

4. After restarting IIS or apache, run phpinfo to check whether curl is loaded successfully. Ctrl+F searches for curl. If there is no match, it must have not been loaded successfully. If there is a match, congratulations, you have successfully loaded it.

As mentioned above, it is just a general method, but if you, like me, still do not solve the problem after following the above four steps, then please check whether your version is php5.2.14. If so, congratulations on winning the prize like me, because the curl module of PHP5.2.14 version itself has bugs, so you have to continue to the last step: download php_curl.dll in PHP5.2.13 and replace the previous one with it. Replace the php_curl.dll that appeared in the four steps, that is, the ext directory and the systm32 directory of the PHP installation directory, and then restart IIS or apache. Finally, I solved the problem. I believe you should also solve the problem. If you see that it is still unresolved, it may be another situation. You may wish to leave a message and study it together.

The article was originally published by Xiaodao on http://www.8d8e.cn/webs/2011/37728.html. Please indicate the source when reprinting.

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/371700.htmlTechArticleI finally wrote a set of programs for automatic website inclusion through my own study. Just as I uploaded the source code to When the server was making a demonstration and sharing it with everyone, I suddenly found that the URL was not working properly...
Statement:
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