Home >Backend Development >PHP Tutorial >The latest solution to the php running error Call to undefined function curl_init()
In fact, this problem has appeared on the Internet a long time ago. I searched Baidu online and the answers were all the same. I encountered this problem again recently, but the questions published by Baidu cannot solve this problem, so I can only find the answer by going over the wall. Now I will share the solution with everyone. Friends in need can refer to it. Let’s learn together.
The previous online solutions are as follows:
1. Enable curl extension in php.ini
2. Copy libeay32.dll, ssleay32.dll, and php5ts.dll in the php directory to c:\windows\system32
(Another method is to add the dynamic link library to httpd.conf, such as: LoadFile d:/php/libeay32.dll and LoadFile d:/php/ssleay32.dll, but I tried it, it also doesn’t work)
3. Restart apache, OK!
I don’t know if these people have really tried it and succeeded, so they share these so-called solutions online. In the end, for us newcomers, all the solutions Baidu found were only one, and the source could not be found and the problem could not be truly solved.
I haven’t been too busy recently, so I brought this issue up again and wanted to solve it. Baidu Baidu Baidu... Okay... maybe I am too blind, I only found the above That kind of solution. There is no choice but to turn to Google... But under the restrictions of Skynet, it has become difficult to access Google. So I spent a lot of time looking for FQ... and the preparation work...
After I went to Google, although there are also the above-mentioned solutions, fortunately it is not the only one. , I found another solution on the Internet that is suitable for me. I will excerpt it and record it for the convenience of future generations! !
Let’s talk about my computer configuration first!
I am a 64-bit win10 system. Apache and PHP are manually configured by myself. I have not tried the integrated environment. I don’t know if it will work, but I think it can be used as a reference!
Let’s talk about the solution!
1. Similarly, enable curl extension in php.ini
2. In the php directory, find libeay32.dll, libssh2.dll, ssleay32. dll three files, copy (or cut) and paste them into the bin directory of apache
3. Restart apache, OK!
The above is the entire content of this article, I hope it will be helpful to everyone's study.
Related recommendations:
phpRealize file upload and download with the function of displaying files and directories
php Implement avatar upload preview function_phpExample
ThinkPHP implements attachment upload Function_phpExample
##
The above is the detailed content of The latest solution to the php running error Call to undefined function curl_init(). For more information, please follow other related articles on the PHP Chinese website!