Hi,
I have compiled lsphp with curl. That works perfectly for HTTP but not for HTTPS. curl from the command line works with https, but not from PHP. Information about my installation:
lsws 3.1 Enterprise in chroot
PHP 5.2.2
Solaris 10 x86
I have a valid thawte certificate on the https server and also tested it with other https servers.
I have checked the following:
stderror: shows no errors
ldd libcurl.so -> all needed libraries are in chroot
I use the following PHP testcode:
I also added:
didn't change anything
I get the following in error.log:
Connection idle time: 301 while in state: 5 watching for event: 25,close!
Content len: 0, Request line: GET /curltest.php HTTP/1.1
HttpExtConnector state: 8, request body sent: 0, response body size: 0, response body sent:0, left in buffer: 0, attempts: 0.
I assume it has something to do with the chroot, but I don't know where to look (except needed libraries, which seem to be all there). Any hints?
Thanks
Daniel
I have compiled lsphp with curl. That works perfectly for HTTP but not for HTTPS. curl from the command line works with https, but not from PHP. Information about my installation:
lsws 3.1 Enterprise in chroot
PHP 5.2.2
Solaris 10 x86
I have a valid thawte certificate on the https server and also tested it with other https servers.
I have checked the following:
stderror: shows no errors
ldd libcurl.so -> all needed libraries are in chroot
I use the following PHP testcode:
Code:
<?php
$ch = curl_init("https://secure.testserver.com/");
$fp = fopen("test.txt", "w");
curl_setopt($ch, CURLOPT_FILE, $fp);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_exec($ch);
curl_close($ch);
fclose($fp);
?>
Code:
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
I get the following in error.log:
Connection idle time: 301 while in state: 5 watching for event: 25,close!
Content len: 0, Request line: GET /curltest.php HTTP/1.1
HttpExtConnector state: 8, request body sent: 0, response body size: 0, response body sent:0, left in buffer: 0, attempts: 0.
I assume it has something to do with the chroot, but I don't know where to look (except needed libraries, which seem to be all there). Any hints?
Thanks
Daniel