cURL is enabled in php.ini but still not working
Solution 1
I resolved the issue by editing my PHP.ini
to include the full path of the extension as opposed to just the name.
So where most php.ini
files just have this line of code:
extension=php_curl.dll
I changed it to look like this:
extension=C:\amp\PHP\ext\php_curl.dll
I have no idea why PHP/Apache couldn't show an error while I had extension=php_curl.dll
in my php.ini
. At least saying something like dll missing
or something like that, but that resolved my issue.
Solution 2
I had the same problem. I fix it replacing the php_curl.dll
. Maybe a file corruption.
In php.ini I setup with extension=php_curl.dll
.
No more Call to undefined function curl_init()
errors.
Jacques Koekemoer
My Name is Jacques Koekemoer. I am a self-taught developer who aspiring to make a name for myself in the IT World. While I do not hold a formal degree for programming, I am a skilled and capable developer. I develop my websites in custom code, and seldom use template based systems, unless specifically requested. I can program Web Applications as well as Standalone Applications Windows applications up until the n’th tier. I have some experience in mobile development, but I am yet to create a mobile application for a commercial purpose.
Updated on June 09, 2022Comments
-
Jacques Koekemoer almost 2 years
I have enabled the cURL extention in he
php.ini
folder, I have copied mutliple dll files from the PHP folder into the Apache Bin folder and the System 32 folder but cURL is still not enabled on my system.All the solutions that I have looked at:
How to enable cURL in PHP / XAMPP http://php.net/manual/en/curl.installation.php http://php.net/manual/en/curl.installation.php#115953 http://php.net/manual/en/curl.installation.php#117372
I know this because I still see the following error:
Fatal error: Call to undefined function curl_init() in C:\AMP\sites\ftp-crawl\index.php on line 55
When I run only
phpinfo()
, there are no cUrl options. The only mention of cURL is undermodule authors
and its value iscURL: Sterling Hughes
I am running a windows 10 developer machine with PHP, MySQL and Apache installed.
What do I still need to do or check to enable curl?
-
Jacques Koekemoer over 7 yearsI ended up trying to replace the
php_curl.dll
from a working server and that didn't solve the issue either, it started working when I replaced the full path of the DLL in theini
file. I think somewhere it was looking in the wrong directory for the cURL directory