Link to home
Start Free TrialLog in
Avatar of marchent
marchentFlag for Bangladesh

asked on

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?
Avatar of hernst42
hernst42
Flag of Germany image

Locate the used php.ini and add the line

extension=php_curl.dll

Restart webserver and try again
A cleaner method is to find the line:
;extension=php_curl.dll
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.
Avatar of marchent

ASKER

i already did this [extension=php_curl.dll] but curl is still not working :( always saying undefine function for curl
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?
>hernst42
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.
ASKER CERTIFIED SOLUTION
Avatar of Arikael
Arikael
Flag of Switzerland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial