[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1372
  • Last Modified:

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?
0
marchent
Asked:
marchent
  • 3
  • 2
  • 2
  • +1
2 Solutions
 
hernst42Commented:
Locate the used php.ini and add the line

extension=php_curl.dll

Restart webserver and try again
0
 
kebabsCommented:
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.
0
 
marchentAuthor Commented:
i already did this [extension=php_curl.dll] but curl is still not working :( always saying undefine function for curl
0
Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

 
hernst42Commented:
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
0
 
ArikaelCommented:
Have you set your extension_dir in php.ini?
And does the php_curl.dll reside within the extension_dir?
0
 
marchentAuthor Commented:
>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.
0
 
ArikaelCommented:
Do you want to use curl or PHP through commandline.
Both is possible.
for curl, see here: http://curl.haxx.se/
and here is a tutorial for using php on the command line (www.php.net/features.commandline)
Be sure you are running at least php 4.2.0
0
 
hernst42Commented:
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.
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 3
  • 2
  • 2
  • +1
Tackle projects and never again get stuck behind a technical roadblock.
Join Now