curl_init() isn't functioning
Anyone faced the same thing before? I've tried the same script on a XAMPP
, it worked. And I'm trying to do on a WAMP
, it reported call to undefined function curl_init(). I've enabled and double-checked on my WAMP 开发者_Go百科php.ini on line:
extension=php_curl.dll
The commenting was removed alright.
Could the reason be CakePHP ? I'm developing the App on Cake. Or something I need to do with WAMP...
You have to edit both these files:
wamp\bin\php\your php version\php.ini
wamp\bin\Apache\your php version\bin\php.ini
To get this problem where the side by side configuration is correct, but its still not working in wamp php 5.4.3 fixed. Follow: http://www.morningtime.com/kb/188
The php_curl.dll library is bugged and must be replaced. See attachment below. Replace the old php_curl.dll file (in your wampserver/bin/php/{version}/ext/ folder) with the new one attached. Restart Apache and you are set.
link that is currently working: http://www.morningtime.com/sites/default/files/attachments/book/188/php_curl-5.4.3-VC9-x64.zip
worked for me.
Thanks for pinpointing to checking out phpinfo() sometimes you just get too tired to test the basic. Well, after that I googled and found the solution. It seems that for a WAMP server, we need to enable both php.ini
on folder PHP/..bin
and Apache/..bin
I restarted after confirming both were enabled and here in phpinfo() I got curl enabled. I guess it should be working now.
or did you restart your wamp apache or what ever server you have?
EDIT:
maybe this helps. also notice the updates on top of the 1st post
How to get CURL to work with PHP on Windows? (WAMP)
精彩评论