php curl installation

What is the easiest way to setup curl with php? i have searched so many forums and got sucks. none are useful. i want an easy to installation process. i'm tired to copying dlls and other files to ext filder, system folder, even every directory of apache and php, and non working.

i'm, using easyPHP latest 2 version, first one was php4 and second one was php5. some forums are telling that install of xammp will solve, but i'm confused. also some forum says install apache. but how to install apache from it's distribution?

i know how to setup on linux, its easy, but at windows its hell. can someone will help?
LVL 13
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Locate the used php.ini and add the line


Restart webserver and try again
A cleaner method is to find the line:
And remove the semi-colon (uncommenting)

You might need to search for php.ini as it is never in the one place, c:\windows\php.ini is a common location.

Remember to restart Apache.
marchentAuthor Commented:
i already did this [extension=php_curl.dll] but curl is still not working :( always saying undefine function for curl
Cloud Class® Course: Microsoft Office 2010

This course will introduce you to the interfaces and features of Microsoft Office 2010 Word, Excel, PowerPoint, Outlook, and Access. You will learn about the features that are shared between all products in the Office suite, as well as the new features that are product specific.

Then you didn't edit the correct php.ini
careate file info.php with content:
<?php phpinfo();

call that file via webserver and check for
Loaded Configuration File
Configuration File (php.ini) Path
Have you set your extension_dir in php.ini?
And does the php_curl.dll reside within the extension_dir?
marchentAuthor Commented:
may be the path of ini file was the problem. i have fixed it i guess. i can now use the curl when i run the script from www folder through a browser.

is it possible to use curl without browser. like from commandline
php my_curl.php
this time i get undefine function again. same code worked at browser.
may be for scripting it is using another ini file where from inside apache it is using correct.

i'm able to use curl that is enough :-p but through commadline would be great but not necessary.
Do you want to use curl or PHP through commandline.
Both is possible.
for curl, see here:
and here is a tutorial for using php on the command line (
Be sure you are running at least php 4.2.0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
php-cli and webserver-php may use different php.ini -files. So check the output of php-i on the commandline and check which php.ini the command line uses and also activate the extension there.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.