1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Configuring cURL with XAMPP on WinXP

Discussion in 'Apache' started by sayyes, Apr 8, 2006.

  1. #1
    Hey everyone,

    I just installed XAMPP on my WinXP machine and it is working fine, but I need to configure cURL.

    I've created a "curl" directory under xampp and placed the php_curl.dll in there. I also uncommented the "extension=php_curl.dll" in php.ini and changed register_globals to On.
    SEMrush
    However, when I look at my phpinfo(), curl is nowhere to be found...

    Any ideas?
     
    sayyes, Apr 8, 2006 IP
    SEMrush
  2. lorien1973

    lorien1973 Notable Member

    Messages:
    12,210
    Likes Received:
    603
    Best Answers:
    0
    Trophy Points:
    260
    #2
    is your path to curl correct? i had that problem for a while too when I had curl on my server.
     
    lorien1973, Apr 8, 2006 IP
  3. sayyes

    sayyes Peon

    Messages:
    264
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Umm...I don't know...

    Where exactly is that set? I'm going to go try to track it down...

    EDIT: Do you mean the extension_dir in php.ini? Yes, that points to a directory that has the php_curl.dll in it.

    Another question: I don't see lib_curl.dll anywhere in my installation. Do I need to put this somewhere or does php_curl.dll take care of it?

    And finally: do I need to "include" anything in my application that is making curl calls?
     
    sayyes, Apr 8, 2006 IP
  4. lorien1973

    lorien1973 Notable Member

    Messages:
    12,210
    Likes Received:
    603
    Best Answers:
    0
    Trophy Points:
    260
    #4
    you need the lib_curl.dll as well. Your installation file should have had both - but I do remember that sometimes my download didn't have it. the one at php.net does have it.

    I don't remember my exact solution though, its been a few years. I think I ended up copying both the files (php_curl and lib_curl) to the php folder, the extension folder (it never found it there) and I think my system32 folder as well and it finally worked.

    Php is a pain in windows

    No you don't. When it shows up in the your phpinfo you are fine. the extension works as it should.
     
    lorien1973, Apr 8, 2006 IP
  5. sayyes

    sayyes Peon

    Messages:
    264
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Ok, thanks. I put lib_curl in a bunch of different places and even downloaded some other dlls that were recommended in another forum. Nada.

    I'm beginning to consider buying a cheap desktop and installing Linux...
     
    sayyes, Apr 8, 2006 IP
  6. lorien1973

    lorien1973 Notable Member

    Messages:
    12,210
    Likes Received:
    603
    Best Answers:
    0
    Trophy Points:
    260
    #6
    you need both files in there php_curl and lib_curl as well. One will not do. I'd have to check the server at work to see where mine is. I'm sure I stuck them everywhere.

    d:\php
    d:\php\extensions
    c:\windows
    c:\windows\system32

    You might have to right click on the dlls to register them too. As I said, its been a while, but curl was a pain to get going.

    Where is the error showing up? Even if you do it right, you will get boot errors (php_curl and lib_curl) not found on your load up screens for windows but you can ignore those.

    As long as it shows in the phpinfo you are good.

    I'd just get a host. I'm soooooo much happier since I moved all my files off site. I hated dealing with hosting issues.
     
    lorien1973, Apr 8, 2006 IP
  7. sayyes

    sayyes Peon

    Messages:
    264
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    0
    #7
    I'm still struggling with getting it show up in phpinfo().

    Thanks for all your help! I think I am going to try to find a cheap host just for running this stupid cron job!!
     
    sayyes, Apr 9, 2006 IP
  8. carowan

    carowan Peon

    Messages:
    473
    Likes Received:
    24
    Best Answers:
    0
    Trophy Points:
    0
    #8
    I had the same issue with XXAMP.

    Curl was installed, but was commented out in the .ini file.

    just remove the #

    and you should be OK...

    thats what I remember at least.
     
    carowan, Apr 13, 2006 IP
  9. meny

    meny Peon

    Messages:
    1
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #9
    Hi,

    You will need to change quite a few files, it drove me mad till I found that out.

    The file listing in my case can be found here:
    http://www.menyhart.net/blog/developer-stuff/enabling-curl-on-xampp/

    Cheers,
    Roman
     
    meny, Apr 21, 2006 IP
  10. BDS1400

    BDS1400 Peon

    Messages:
    1
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #10
    I had this same problem for 2 days until I realized that I had done everything all the tutorials instructed, except I never restarted apache.

    Hope that helps to you and everyone who is googling it.
     
    BDS1400, Oct 28, 2006 IP
  11. beauD

    beauD Peon

    Messages:
    20
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #11
    Just a FYI

    I did what carowan did

    but my xampp was using xampp/apache/bin/php.ini as the php file
     
    beauD, Jun 4, 2007 IP
  12. bin_asc

    bin_asc Active Member

    Messages:
    122
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    60
    #12
    Did you add curl ( all dlls ) in the xampp extensions dir ? You can see which it is or can specify it in php.ini
     
    bin_asc, Jun 10, 2007 IP
  13. aussieone

    aussieone Active Member

    Messages:
    249
    Likes Received:
    10
    Best Answers:
    0
    Trophy Points:
    78
    #13
    Ahhh, guys, there is only ONE file in xampp that needs to be changed to enable curl, that is in /apache/bin/php.ini file - uncomment extension=php_curl.dll
    restart apache: POW. finished.

    Go test it with zelune proxy script (you need curl for it to work) it works, ie: you have curl enabled.

    Curl is built into xampp already, has been for a long time, i dont know why people download all this other useless crap from the net, you are just making things over-complicated for yourselves. Read the xampp info for gods sake.

    http://www.apachefriends.org/en/faq-xampp-windows.html#phpini

     
    aussieone, Jul 16, 2007 IP
  14. elizas

    elizas Peon

    Messages:
    16
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #14
    XAMPP does not enable cURL library by default, you have to tweak around a bit to getit up and running. Here is how...
    But before that let me explain what cURL is for the benefit of the uninitiated (i was one of which, just a couple of months back!), cURL is a command line tool for transferring files with URL syntax. It supports a number of transfer protocols including HTTP and FTP. One of the most important usage of cURL (and the one that we are concerned with) is that you don't have to depend upon the browser to retrieve the web pages, cURL can retrieve it for you but it would return the raw source and in a terminal window which may not be of much use to a non-technical user but it is a great tool for developers especially at a time when a lot of web services exist that do not cater to the average user but are consumed by other programs over the network. Another factor that increases the importance of cURL is the popularity of services based on REST protocol. Infact all major players on Web including Google, Amazon, Facebook, Twitter and Ebay to name a few, have already implemented REST API on their respective sites.

    You can try out cURL command line tool by downloading it from here

    To see how it works, all that you would need to do is go to the command line and into the specific directory and type cURL -[options] URL where URL is the web resource you want to download and the option parameter is specified to perform the particular operation. All functionalities that cURL offers are available through its option parameter, to find out more on how to use options click here

    The steps described above give you an overview of what cURL is and what it does, to use it programmatically we would require supporting libraries. Thankfully, XAMPP installs the cURL library during its installation but it is not enabled by default, you have to manually enable it.

    Eliza
     
    elizas, Jun 3, 2010 IP
  15. Inktcartridges

    Inktcartridges Peon

    Messages:
    15
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #15
    @Elizas, is it possible to give the complete link for the cURL commend line tool. You've put "by downloading it from here" in your comment but it hasn't a link to it.
     
    Inktcartridges, Jun 11, 2010 IP
  16. littlejohn199

    littlejohn199 Peon

    Messages:
    42
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #16
    littlejohn199, May 11, 2011 IP
  17. karlosdpm

    karlosdpm Peon

    Messages:
    1
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #17
    This article might be helpfull for you: http://kmbytes.com/blog/using-curl-with-xampp/
     
    karlosdpm, Nov 14, 2012 IP