Page 1 of 1

[Solved] command line curl https doesnt work

PostPosted: 20. January 2009 07:38
by fourchette
Hi there,

I had a look around the forum using search function with no luck (or maybe i'm too dumb to understand them :p)

Notice: this question is **NOT** related to php at all.

I am trying to make .bat file to download a file located on https.

The line I use is similar to

Code: Select all
curl --insecure -u 'mylogin:mypass'  https://example.com/myfile.tar.gz > myfile.tar.gz


I use to work with this on linux Ubuntu. It works fine in this environment.

Since I use xampp for windows on my laptop, and since
curl.exe
libeay32.dll
ssleay32.dll


are all bundled in c:\xampp\apache\bin\ I thought it should work ok. (got that idea from curl web page => http://curl.haxx.se/docs/faq.html#Where ... y_of_LIBEA)

However it does not. curl throws a nasty

Code: Select all
C:\xampp\apache\bin>curl --insecure -u 'mylogin:mypass'  https://example.com/myfile.tar.gz > myfile.tar.gz

curl: (1) Protocol https not supported or disabled in libcurl



and indeed, it does seem that https isn't supported:

Code: Select all
C:\xampp\apache\bin>curl -V
curl 7.18.2 (i586-pc-mingw32msvc) libcurl/7.18.2 zlib/1.2.3
Protocols: tftp ftp telnet dict ldap http file
Features: Largefile libz



What's wrong? Since I load curl.exe while being in the very directory containing both libeay32.dll and ssleay32.dll, if curl.exe would require them, they would be loaded right? (and btw, I tried copy-paste in c:\windows\system32 and rebooting windows => doesn't work either

Anyone having an idea?

Re: command line curl https doesnt work

PostPosted: 20. January 2009 07:57
by Wiedmann
What's wrong?

The curl.exe in the XAMPP package is build without SSL support. If you need SSL, just go to the Curl hompage and download one with SSL support.

(BTW: I don't know, why there is this curl.exe in XAMPP since 1.7.0... The Curl PHP-Extension in XAMPP is build with SSL support.)

Re: command line curl https doesnt work

PostPosted: 20. January 2009 08:15
by Izzy

Re: command line curl https doesnt work

PostPosted: 20. January 2009 08:46
by fourchette
wow !!!
that is fast support !!!

i'm impressed guys :mrgreen: :mrgreen: :mrgreen:

Just one small notes to our Windows friends btw
of course the single quote thing didn't work on windows (unlike linux). double quote need to be used instead :

BAD: :(

Code: Select all
curl --insecure -u 'mylogin:mypass'  https://example.com/myfile.tar.gz > myfile.tar.gz


GOOD: :) :) :)

Code: Select all
curl --insecure -u "mylogin:mypass"  https://example.com/myfile.tar.gz > myfile.tar.gz



I love you guys! it worked like a charm.

where's the "fixed" button here ? :)

Re: command line curl https doesnt work

PostPosted: 20. January 2009 08:50
by Izzy
where's the "fixed" button here ?

Just edit your first post and add fixed or solved to the topic title.
Job done!

Good luck and happy curling. :D

Re: command line curl https doesnt work

PostPosted: 20. January 2009 08:53
by fourchette
Wiedmann wrote:(BTW: I don't know, why there is this curl.exe in XAMPP since 1.7.0...


don't know either. I found it accidentally ad thougtht it might work without installing anything.

My xampp is not that old (about 6~8 months i'd say), it might be related.

I am not sure where xampp version number is stored but this might answer the question:

Code: Select all
C:\xampp>more xampp-changes.txt
04. Jul 2008 XAMPP 1.6.7
- Upgrade phpMyAdmin 2.11.7
- Upgrade ... bla bla bla bla ...