I know its easy to setup curl with php in Linux, but it was a bit harder for me for windows. Its been weired when you see that you searched through the Google and did exactly what you found from search result but still your Curl is not working from PHP. Your getting the error like below.
Most of the people i found from blog are suggested me not to use Installer for apache. They suggested me to download the separates binaries for Apache and Curl, and then install them. I tried, and according to them I kept the "libeay32.dll" and "ssleay32.dll" into the apache directory, inside php directory, and inside the windows directory. But nothing worked.
Finally I gave a last try and It worked. From one forum, an expert suggested me to download the latest version of EasyPHP(EasyPHP 2.0b1, an open source application http://www.softpedia.com/get/Authoring-tools/Setup-creators/EasyPHP.shtml). Below is how you have to do to setup curl with Easyphp.
** Run the exe for Easyphp from program files. You'll find an icon at system tray. right click the icon then click Configuration, then click PHP Extension. See the image below.
** Now you'll find few extension for your apache/php. Just select the php_curl extension and click apply button and restart your apache.
Write the below php code and browse from your browser to check whether it working or not. By the way, you have to keep the php script inside the "www" folder.
I think you shouldn't face any problem from now to use the Curl with your php script. Its a single click installation process. I have posted another topic related to setting up cgi for Perl/Python script at http://icfun.blogspot.com/2008/04/easiest-way-to-configure-perlpython.html
Fatal error: Call to undefined function curl_init()
Most of the people i found from blog are suggested me not to use Installer for apache. They suggested me to download the separates binaries for Apache and Curl, and then install them. I tried, and according to them I kept the "libeay32.dll" and "ssleay32.dll" into the apache directory, inside php directory, and inside the windows directory. But nothing worked.
Finally I gave a last try and It worked. From one forum, an expert suggested me to download the latest version of EasyPHP(EasyPHP 2.0b1, an open source application http://www.softpedia.com/get/Authoring-tools/Setup-creators/EasyPHP.shtml). Below is how you have to do to setup curl with Easyphp.
** Run the exe for Easyphp from program files. You'll find an icon at system tray. right click the icon then click Configuration, then click PHP Extension. See the image below.
** Now you'll find few extension for your apache/php. Just select the php_curl extension and click apply button and restart your apache.
Write the below php code and browse from your browser to check whether it working or not. By the way, you have to keep the php script inside the "www" folder.
<?php
$ch = curl_init();
print "WOW no error!!! Curl installed successfully..";
?>
I think you shouldn't face any problem from now to use the Curl with your php script. Its a single click installation process. I have posted another topic related to setting up cgi for Perl/Python script at http://icfun.blogspot.com/2008/04/easiest-way-to-configure-perlpython.html
Comments
Looks simple enough.
But i Can't seem to find the Curl extension download?
Might be looking for the wrong thing.
Is it possible to get a link for where you got it?
Or was it included in your EasyPHP install?
Mine did not include any extras like cURL.
Thanks very much!
At the top of the file, write
path = "C:\PROGRA~1\EASYPH~1.0"
Then search for extension_dir inside the file using ctrl+f, and use this one,
extension_dir = "C:\PROGRA~1\EASYPH~1.0\php\ext\"
And finally look for the curl, and remove semicolon(;) from the first of the line to enable it. So it will look like as below.
extension=php_curl.dll
Finally copy the php.ini file at your C:\windows\ folder.
Now it should work for your curl codes.
Thanks
I've long suffered from problems related to curl extension. by following your tutorial here, I've resolved the problems.
regards.