cURL / Mailing Lists / curl-and-php / Single Mail

curl-and-php

Issues with cURL + Apache-2.2.10 in chroot is not working

From: hanji <hanji_at_uno-code.com>
Date: Sun, 18 Jan 2009 14:17:43 -0700

Hello All

I'm running into a interesting problem with cURL and apache-2.2.10.
With Apache-2.2.10, they've including chroot as a core feature, so the
need to use mod_security or mod_chroot is no longer needed, in fact,
using mod_chroot will not work in apache-2.2.10.

Prior to this upgrade, I was using apache-2.2.9-r1 and mod_chroot-0.5,
and cURl has been working great in this environment for a few years.
After ditching mod_chroot and upgrading to apache-2.2.10, cURL does not
function properly in the jail. The jail environment (including libs,
etc) is the same as what was used in mod_chroot.

What happens is that curl_exec() returns a empty value. No errors are
reported in error_log or in php logs of any type. Removing the chroot
directive from httpd.conf and restarting, cURL behaves as expected.
It's definitely related to the jail.

I ran strace on the process, but couldn't find any *obvious* errors. I
did see apache loading libcurl though without complaints.

13860 open("/usr/lib/libcurl.so.4", O_RDONLY) = 5
13860 open("/usr/lib/libcurl.so.4", O_RDONLY) = 7

I'm hoping that someone might be able to point me in the right
direction to sniff this problem out. I'd also like to mention that the
URL used is not a HTTPS url. I wanted to eliminate other potential
problems during this debug phase. So the URL is straight HTTP.

I'm using cURL-7.18.2

Thanks in advance!
hanji

_______________________________________________
http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-and-php
Received on 2009-01-18