Welcome! Log In Create A New Profile

Advanced

[PHP-DEV] Static library binding

Posted by Robert Eisele 
Robert Eisele
[PHP-DEV] Static library binding
June 08, 2012 11:40PM
Hi,

I have a kind of stupid question. I run PHP inside a fpm chroot jail for a
lot of vhosts, each vhost with it's own pool. Unfortunatley, I can't
connect to remote domains neither via the native file api (assumed
allow_url_fopen is on) nor via curl. I don't want to copy all the libs into
the jails. So, is there an easy way to link the needed dns libs statically
to PHP? For ease of use, this could be a nice configure parameter, like
"link it chroot compatible". It must, of course, be made clear that the
user is responsible for security updates of the libraries.

Thanks
Robert
Rasmus Lerdorf
Re: [PHP-DEV] Static library binding
June 09, 2012 12:00AM
On 06/08/2012 11:38 PM, Robert Eisele wrote:
> Hi,
>
> I have a kind of stupid question. I run PHP inside a fpm chroot jail for a
> lot of vhosts, each vhost with it's own pool. Unfortunatley, I can't
> connect to remote domains neither via the native file api (assumed
> allow_url_fopen is on) nor via curl. I don't want to copy all the libs into
> the jails. So, is there an easy way to link the needed dns libs statically
> to PHP? For ease of use, this could be a nice configure parameter, like
> "link it chroot compatible". It must, of course, be made clear that the
> user is responsible for security updates of the libraries.

A couple of intelligent hard links in your jails should take care of
this. It isn't generally feasible to statically link everything because
many libraries are only installed by default as shared and you can't
link a shared library statically. You need to install a static version
of each library you need first.

-Rasmus

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php
Sorry, only registered users may post in this forum.

Click here to login