I'm trying to connect, anywhere using https.
I am receiveing no headers back from my request. Standard HTTP requests work.
The response code is blank.
$snoopy = new Snoopy;
$host = "https://www.thawte.com";
echo "Attempting $host<br>";
echo "response code: ".$snoopy->response_code."<br>\n";
while(list($key,$val) = each($snoopy->headers))
echo $key.": ".$val."<br>\n";
echo "error fetching document: ".$snoopy->error."\n";
Do I have to set up some certificates or something on the server?
I have cURL set up. Running with Snoopy 1.0;libcurl 7.9.2;PHP Version 4.2.2;Apache 1.3.22;OpenSSL 0.9.6b
Ok, sorted this out and I found 2 different problems
(see next post for point 2)
1. On my test machine
The test machine has a proxy sitting between it and the www. It seems cUrl, and therefore Snoopy has no way of specifying the proxy for https on the command line...
There are a number of ways around this.
Use PHP and place a putenv line at or about line 929, (snoopy1.0) just above the exec in the _httpsrequest method
Replace the exec with dynamically writting a shell script (see notes on http://www.php.net/putenv )
set up this env ver before running Apache.
*BEWARE* some ISPs (including mine), run PHP in safe mode, and therefore do not allow putenv on anything other than PHP_ env vars.
If the ISP does not allow writting env vars then its unlikely you'll be allowed to dynamically write shell scripts but...
The only real solution would be for cUrl to provide a commandline option for https, unless it already does, and I didn't find it. It does have one for http, but this did not seem to work.
Case 2: On My Host
I had a different problem on my host
First, cURL, although installed as part of the PHP installation was not available as a binary. They provided this for me.
Second, although to me it was installed at /usr/bin, because I was a virtaul host it was in ta completely different directory.
I have 3 tips:
Check you have the cUrl binary
Check the directory you claim cUrl is installed in
Get a great host, whose support is invaluable when problems like this occur. Mine is www.ipxsystems.net
Log in to post a comment.
Sign up for the SourceForge newsletter:
You seem to have CSS turned off.
Please don't fill out this field.