EzDevInfo.com

curl

curl.js is small, fast, extensible module loader that handles AMD, CommonJS Modules/1.1, CSS, HTML/text, and legacy scripts. Home · cujojs/curl Wiki · GitHub curl.js is small, fast, extensible module loader that handles amd, commonjs modules/1.1, css, html/text, and legacy scripts.

Curl Certificate Error when Using RVM to install Ruby 1.9.2

RVM is running into a certificate error when trying to download ruby 1.9.2. It looks like curl is having a certificate issue but I am not sure how to bypass it. NAy help would be great. Thanks so much, I have included the exact error info below.

$ rvm install 1.9.2
Installing Ruby from source to: /Users/willdennis/.rvm/rubies/ruby-1.9.2-p180, this may take a while depending on your cpu(s)...

ruby-1.9.2-p180 - #fetching 
ERROR: Error running 'bunzip2 '/Users/willdennis/.rvm/archives/ruby-1.9.2-p180.tar.bz2'', please read /Users/willdennis/.rvm/log/ruby-1.9.2-p180/extract.log
ruby-1.9.2-p180 - #extracting ruby-1.9.2-p180 to /Users/willdennis/.rvm/src/ruby-1.9.2-p180
ruby-1.9.2-p180 - #extracted to /Users/willdennis/.rvm/src/ruby-1.9.2-p180
Fetching yaml-0.1.3.tar.gz to /Users/willdennis/.rvm/archives

curl: (60) SSL certificate problem, verify that the CA cert is OK. Details:
error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed
More details here: http://curl.haxx.se/docs/sslcerts.html

curl performs SSL certificate verification by default, using a "bundle"
 of Certificate Authority (CA) public keys (CA certs). The default
 bundle is named curl-ca-bundle.crt; you can specify an alternate file
 using the --cacert option.
If this HTTPS server uses a certificate signed by a CA represented in
 the bundle, the certificate verification probably failed due to a
 problem with the certificate (it might be expired, or the name might
 not match the domain name in the URL).
If you'd like to turn off curl's verification of the certificate, use
 the -k (or --insecure) option.
ERROR: There was an error, please check /Users/willdennis/.rvm/log/ruby-1.9.2-p180/*.log. Next we'll try to fetch via http.
Trying http:// URL instead.

curl: (60) SSL certificate problem, verify that the CA cert is OK. Details:
error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed
More details here: http://curl.haxx.se/docs/sslcerts.html

curl performs SSL certificate verification by default, using a "bundle"
 of Certificate Authority (CA) public keys (CA certs). The default
 bundle is named curl-ca-bundle.crt; you can specify an alternate file
 using the --cacert option.
If this HTTPS server uses a certificate signed by a CA represented in
 the bundle, the certificate verification probably failed due to a
 problem with the certificate (it might be expired, or the name might
 not match the domain name in the URL).
If you'd like to turn off curl's verification of the certificate, use
 the -k (or --insecure) option.
ERROR: There was an error, please check /Users/willdennis/.rvm/log/ruby-1.9.2-p180/*.log
Extracting yaml-0.1.3.tar.gz to /Users/willdennis/.rvm/src
ERROR: Error running 'tar zxf /Users/willdennis/.rvm/archives/yaml-0.1.3.tar.gz -C /Users/willdennis/.rvm/src --no-same-owner', please read /Users/willdennis/.rvm/log/ruby-1.9.2-p180/yaml/extract.log
/Users/willdennis/.rvm/scripts/functions/packages: line 55: cd: /Users/willdennis/.rvm/src/yaml-0.1.3: No such file or directory
Configuring yaml in /Users/willdennis/.rvm/src/yaml-0.1.3.
ERROR: Error running ' ./configure --prefix="/Users/willdennis/.rvm/usr"  ', please read /Users/willdennis/.rvm/log/ruby-1.9.2-p180/yaml/configure.log
Compiling yaml in /Users/willdennis/.rvm/src/yaml-0.1.3.
ERROR: Error running '/usr/bin/make ', please read /Users/willdennis/.rvm/log/ruby-1.9.2-p180/yaml/make.log
Installing yaml to /Users/willdennis/.rvm/usr
ERROR: Error running '/usr/bin/make install', please read /Users/willdennis/.rvm/log/ruby-1.9.2-p180/yaml/make.install.log
ruby-1.9.2-p180 - #configuring 
ERROR: Error running ' ./configure --prefix=/Users/willdennis/.rvm/rubies/ruby-1.9.2-p180 --enable-shared --disable-install-doc --with-libyaml-dir=/Users/willdennis/.rvm/usr ', please read /Users/willdennis/.rvm/log/ruby-1.9.2-p180/configure.log
ERROR: There has been an error while running configure. Halting the installation.

Will


Source: (StackOverflow)

Is there a way to follow redirects with command line cURL

I know that in a php script:

curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);

will follow redirects. Is there a way to follow redirects with command line cURL?


Source: (StackOverflow)

Advertisements

How to set the authorization header using curl

How do I pass authorization header using cURL? (Not the PHP cURL extension, the executable in /usr/bin/curl).


Source: (StackOverflow)

How do I make a request using HTTP basic authentication with PHP curl?

I'm building a REST web service client in PHP and at the moment I'm using curl to make requests to the service.

How do I use curl to make authenticated (http basic) requests? Do I have to add the headers myself?

If so I've got some other questions -

  1. Is there a REST library for php?

  2. or is there a wrapper for curl that makes it a bit more rest friendly?

  3. or am I going to have to continue to roll my own?

Thanks.


Source: (StackOverflow)

What is cURL in PHP?

In PHP, I see the word cURL in many PHP projects. What is it? How does it work?

Reference Link: (What is cURL in PHP?)


Source: (StackOverflow)

Using curl with a username and password?

I want to access a url which requires a username/password basic auth stuff. I'd like to try accessing it with curl. Right now I'm doing something like:

curl http://api.somesite.com/test/blah?something=123

so I just get some error back now, I guess I need to specify a username and password along with the above command, how can I do that?


Source: (StackOverflow)

PHP + curl, HTTP POST sample code?

Can anyone show me how to do a php curl with an HTTP POST?

I want to send data like this:

username=user1, password=passuser1, gender=1

To www.domain.com

I expect the curl to return a response like result=OK. Are there any examples?


Source: (StackOverflow)

send/post xml file using curl command line

How can I send/post an xml file to a local server http://localhost:8080 using curl from the command line? what command should I give?


Source: (StackOverflow)

How do I get a YouTube video thumbnail from the YouTube API?

If I have a YouTube video URL, is there any way to use PHP and cURL to get the associated thumbnail from the YouTube API?


Source: (StackOverflow)

How do I measure request and response times at once using cURL?

I have a web service that receives data in JSON format, processes the data, and then returns the result to the requester.

I want to measure the request, response, and total time using cURL.

My example request looks like:

curl -X POST -d @file server:port

and I currently measure this using the time command in Linux:

time curl -X POST -d @file server:port

The time command only measures total time, though - which isn't quite what I am looking for.

Is there any way to measure request and response times using cURL?


Source: (StackOverflow)

Call to undefined function curl_init().? [duplicate]

Possible Duplicate:
curl_init() function not working

When i am going to implement Authorize.net payment gateway. However, I got this error:

Call to undefined function curl_init()

Please let me know what is wrong in it.


Source: (StackOverflow)

How do I get cURL to not show the progress bar?

I'm trying to use cURL in a script and get it to not show the progress bar.

I've tried the -s, -silent, -S, and -quiet options, but none of them work.

Here's a typical command I've tried:

curl -s http://google.com > temp.html

I only get the progress bar when pushing it to a file, so curl -s http://google.com doesn't have a progress bar, but curl -s http://google.com > temp.html does.


Source: (StackOverflow)

HTTP POST and GET using cURL in Linux

I had server application in asp.net in windows in that I had a web service for that.

How can I call web service in Linux using shell script by using cURL command?


Source: (StackOverflow)

HTTPS and SSL3_GET_SERVER_CERTIFICATE:certificate verify failed, CA is OK

I am using XAMPP for development. Recently I upgraded my installation of xampp from an old version to 1.7.3.

Now when I curl HTTPS enabled sites I get the following exception

Fatal error: Uncaught exception 'RequestCore_Exception' with message 'cURL resource: Resource
    id #55; cURL error: SSL certificate problem, verify that the CA cert is OK. Details:
    error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed (60)'

Everyone suggest using some specific curl options from PHP code to fix this problem. I think this shouldn't be the way. Because I didn't have any problem with my old version of XAMPP and happened only after installing the new version.

I need help to figure out what settings change in my PHP installation, Apache etc can fix this problem.


Source: (StackOverflow)

PHP cURL not working - WAMP on Windows 7 64 bit

I got my WAMP installed on my windows 7 64bit. cURL is not working, but still I got it enabled from the WAMP tray.

I have also uncommented extension=php_curl.dll in php.ini for both the PHP and Apache folder.

Windows give me an error message,

PHP Startup: unable to load dynamic library 'c:/wamp/bin/php/php5.4.3/ext/php_curl.dll' - the application has failed to start because its side-by-side configuration is incorrect. Please see the application event log or use the command-lin sxstrace.exe tool for more detail."

How can I fix this problem?


Source: (StackOverflow)