There appear to be a lot of misguided people on the intarwebs claiming all sorts of varying things you have to do to get CURL to work on a Windows-based XAMPP install. I’d like to clear them all up here and now.
A lot of confusion seems to stem from the fact that there are multiple
There’s a straight-forward XAMPP FAQ Entry about their php.ini stucture. For those looking for the easy fix, ignore everything but the /apache/bin/php.ini file. That’s the only one that counts, regardless of which PHP version you’re currently using.
What about all the .dll files you need? Well, you don’t need them. Everything you need to run CURL on a XAMPP install is included in the download. Stop downloading extra crap and sticking it all over your system. XAMPP knows what it needs, where it’s at, and how to use it. End of story.
This is all based on the XAMPP Basic Package for Windows, version 1.6.1, released on 4/18/2007. YMMV.
Update for XAMPP 1.7.x: As of the 1.7.0 release, the php.ini file is found in /xampp/php. When in doubt, consult the FAQ entry linked above for help. Thanks to several commenters for pointing out this change!
Restarting Apache is required on both Windows and Linux whenever you make configuration changes.
Using CURL in XAMPP
It’s really quite simple - uncommentextension=php_curl.dll
in your php.ini
file, then restart Apache1.A lot of confusion seems to stem from the fact that there are multiple
php.ini
files in a standard XAMPP install. This really isn’t as confusing as you’d think it would be, assuming you - and I know I’m going out on a limb here - read the documentation.There’s a straight-forward XAMPP FAQ Entry about their php.ini stucture. For those looking for the easy fix, ignore everything but the /apache/bin/php.ini file. That’s the only one that counts, regardless of which PHP version you’re currently using.
What about all the .dll files you need? Well, you don’t need them. Everything you need to run CURL on a XAMPP install is included in the download. Stop downloading extra crap and sticking it all over your system. XAMPP knows what it needs, where it’s at, and how to use it. End of story.
This is all based on the XAMPP Basic Package for Windows, version 1.6.1, released on 4/18/2007. YMMV.
Update for XAMPP 1.7.x: As of the 1.7.0 release, the php.ini file is found in /xampp/php. When in doubt, consult the FAQ entry linked above for help. Thanks to several commenters for pointing out this change!
Restarting Apache is required on both Windows and Linux whenever you make configuration changes.
2 comments:
The problem?.. curl was not enabled by default in Xampp. You receive the following error:
Fatal error: Call to undefined function curl_init() in C:\xampp\htdocs\tayst\twitter\index.php on line 4
The solution? These simple steps!
Step 1. Stop all Xampp services: Apache, Mysql, Filezilla, and Mercury.
Step 2. Open the following files in your editor of choice. (Replace C:\xampp with the location of your xampp install)
C:\xampp\apache\bin\php.ini
C:\xampp\php\php.ini
C:\xampp\php\php5.ini
C:\xampp\php\php4\php.ini
C:\xampp\php\php4\php4.ini
Step 3. Find the following code in each of the files, and remove the ; (semicolon) at the beginning of the line. You will most likely see it at line 546 or line 582.
old line – ;extension=php_curl.dll
new line – extension=php_curl.dll
Step 4. Start your apache services.
See what an easy fix to curl on xampp by simply removing a few semicolons. Happy Coding!
http://trevordavis.net/blog/jquery-tabbed-navigation/
check this link for the runtime coading view jquary....
Post a Comment