Re: Enabling the chroot() function in PHP 5.4
| From: | Matijn Woudt | Date: | Thu, 13 Jun 2013 13:14:55 +0000 |
| Subject: | Re: Enabling the chroot() function in PHP 5.4 | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-321393@lists.php.net to get a copy of this message | ||
Hi Aaron,
It's better if you ask this question on the PHP internals list, there's
hardly anyone compiling it's own PHP here.
- Matijn
On Thu, Jun 13, 2013 at 9:55 AM, Aaron Stephens
<aaron.t.stephens@gmail.com>wrote:
> Hi All,
>
> Does anybody know how to enable the chroot() function in PHP 5.4? It
> was easy in PHP 5.3 as long as you were building the CLI by itself. In the
> PHP 5.4 configure script there is a new PHP_BINARIES variable being used
> instead of setting PHP_SAPI=cli and thus the "#define ENABLE_CHROOT_FUNC 1"
> is never written to the output file. I have been able to manually enable
> it by adding the define to the main/php_config.h after running configure.
> The issue seems to be a line: if test "program" = "program". This
> comparison being true is what causes the configure script to add "cli" to
> the PHP_BINARIES variable instead of setting the PHP_SAPI variable. The
> other prerequisites (HAVE_CHROOT and ZTS) are all at the required settings.
> It is only the ENABLE_CHROOT_FUNC which is causing the function to not be
> compiled into the resulting binary. Any information or explanation would
> be very helpful.
>
> For the record, I know what the chroot() function does and does not
> do. I am experimenting with using chroot() to isolate an already running
> script to a particular subset of the filesystem for file operations.
>
> --
>
> - Aaron
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>