Alvaro Lopez Ortega | 1 Apr 2006 02:49
Picon

Re: PHP4 + Chroot

berVi wrote:

> Is it possible to use Cherokee + PHP with Chroot?  Cherokee is
> chrooted into /var/www, but now I can't run php files, I tried
> symbolic links, doesn't work, I get a 200 OK msg.
>
> I also tried to copy the php interpreter to /var/www/usr/local/bin,
> coz it's original path is /usr/local/bin, but then I get a 500
> Internal Server Error msg.

  I would suggest you to run the PHP interpreter inside a jail (using
  the FastCGI interface and listening to some port).

  Then, configure Cherokee to be chroot'ed as well and set it up to
  use PHP through the FastCGI port you opened before. It should work.

> It's with phpcgi, I still can't use the fcgi handler.

  Okay. If you want to use phpcgi what you have to do is specify the
  path to the interpreter, for example:

=======
  Chroot /var/www
  DirectoryRoot /

  Directory / {
    Handler common
  }

  Extension php {
(Continue reading)

berVi | 2 Apr 2006 10:34
Picon
Favicon

Re: PHP4 + Chroot

--- Alvaro Lopez Ortega <alvaro <at> sun.com> wrote:

>   I would suggest you to run the PHP interpreter
> inside a jail (using
>   the FastCGI interface and listening to some port).
> 
>   Then, configure Cherokee to be chroot'ed as well
> and set it up to
>   use PHP through the FastCGI port you opened
> before. It should work.

I'm not sure that there is jail in OpenBSD. But now
I'm trying all this without chroot. It does not want
to work. I configured it using the documentation, but
no success. The php interpreter starts, but when I try
to load a php page, it says (in the console):

socket.c:1110: ERROR: Can not connect: Invalid
argument
socket.c:1110: ERROR: Can not connect: Invalid
argument
socket.c:1110: ERROR: Can not connect: Invalid
argument
socket.c:1110: ERROR: Can not connect: Invalid
argument
socket.c:1110: ERROR: Can not connect: Invalid
argument
socket.c:720: ERROR: write(13, ..) -> errno=57 'Socket
is not connected'
socket.c:824: ERROR: read(13, ..) -> errno=57 'Socket
(Continue reading)


Gmane