05-14-2007, 01:55 AM
Join Date: Jul 2006
PHP curl HTTPS does not work in chroot
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
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:
$ch = curl_init("https://secure.testserver.com/");
$fp = fopen("test.txt", "w");
curl_setopt($ch, CURLOPT_FILE, $fp);
curl_setopt($ch, CURLOPT_HEADER, 0);
didn't change anything
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?