List Info

Thread: Problemas con cherokee+php4+chroot




Problemas con cherokee+php4+chroot
user name
2006-09-22 14:02:09
Hola Alvaro, estube en tu charla sobre Cherokee en la campus party, y la verdad, me convenciste y he empezado a usarlo. Me parece muy claro y eficiente, y la pagina web esta muy bien, pero me parece que hace falta un poco mas de documentacion, quizas en otros idiomas para que la gente como yo, que no sabemos mucho ingles, nos podamos solucinar los problemas.
Tengo un problema:
Si corro apache SIN chroot, todo funciona correctamente, funcionan mis hosts virtuales, y me funciona php sin ningun problema, y además muy rapido.
El problema lo tengo cuando hago un chroot, que no consigo que me funcione el php, me dice que no encuentra el interprete. he intentado meter /usr/bin/php4-cgi dentro del chroot, y he metido tb todas las librerias que me daban al hacer un ldd /usr/bin/php4-cgi, pero al intentar entrar en la pagina php (he probado con phpmyadmin y con un phpinfo.php) me da un error y se cae el servidor.
ERROR:
+++++++++++++++++++++++++++++++++++++++++++++++
verotux:~/webs$ sudo cherokee
Cherokee Web Server 0.5.4: Listening on port 80, chrooted, TLS disabled
IPv6 disable, using epoll, 16384 fds limit, 5 threads, 3276 fds in each
standard scheduling policy
server.c:1348: Cherokee feels panic!
Cancelado
+++++++++++++++++++++++++++++++++++++++++++++++
las librerias que he metido dentro del chroot son las siguientes:
------------------------------------------------------------------------------------------------------
verotux:/usr/bin$ ldd php4-cgi
        linux-gate.so.1 => ; (0xffffe000) -------->ESTA NO LA HE METIDO PORQUE NO SABIA DONDE METERLA
  ;      libcrypt.so.1 => /lib/tls/i686/cmov/libcrypt.so.1 (0xb7f54000)
   ;     libzzip-0.so.12 => /usr/lib/libzzip-0.so.12 (0xb7f4e000)
   ;     libnsl.so.1 => /lib/tls/i686/cmov/libnsl.so.1 (0xb7f38000)
   ;     libexpat.so.1 => /usr/lib/libexpat.so.1 (0xb7f19000)
   ;     libdb-4.3.so => /usr/lib/libdb-4.3.so (0xb7e3d000)
   ;     libgdbm.so.3 => /usr/lib/libgdbm.so.3 (0xb7e37000)
   ;     libbz2.so.1.0 => /lib/libbz2.so.1.0 (0xb7e26000)
   ;     libz.so.1 => /usr/lib/libz.so.1 (0xb7e12000)
   ;     libpcre.so.3 => /usr/lib/libpcre.so.3 (0xb7de3000)
   ;     libssl.so.0.9.8 => /usr/lib/i686/cmov/libssl.so.0.9.8 (0xb7da6000)
   ;     libresolv.so.2 => /lib/tls/i686/cmov/libresolv.so.2 (0xb7d93000)
   ;     libm.so.6 => /lib/tls/i686/cmov/libm.so.6 (0xb7d71000)
   ;     libdl.so.2 => /lib/tls/i686/cmov/libdl.so.2 (0xb7d6e000)
   ;     libgssapi_krb5.so.2 => /usr/lib/libgssapi_krb5.so.2 (0xb7d52000)
   ;     libkrb5.so.3 => /usr/lib/libkrb5.so.3 (0xb7cd8000)
   ;     libk5crypto.so.3 => /usr/lib/libk5crypto.so.3 (0xb7cb5000)
   ;     libcom_err.so.2 => /lib/libcom_err.so.2 (0xb7cb2000)
   ;     libc.so.6 => /lib/tls/i686/cmov/libc.so.6 (0xb7b83000)
   ;     libcrypto.so.0.9.8 => /usr/lib/i686/cmov/libcrypto.so.0.9.8 (0xb7a55000)
   ;     /lib/ld-linux.so.2 (0xb7f93000)
   ;     libkrb5support.so.0 => /usr/lib/libkrb5support.so.0 (0xb7a4f000)
------------------------------------------------------------------------------------------------------
Espero que me puedas echar un cable, ya que me trae loco, y no quiero tener que desenjaular el servidor.
Espero verte el año que viene por la Campus Party 2007 --> Para invitarte a unos cacharos. Un saludo
Athos Orío Choperena
Problemas con cherokee+php4+chroot
user name
2006-09-22 15:04:32
El Viernes, 22 de Septiembre de 2006 16:02, Athos .........
escribió:
> Hola Alvaro, estube en tu charla sobre Cherokee en la
campus party, y la
> verdad, me convenciste y he empezado a usarlo. Me
parece muy claro y
> eficiente, y la pagina web esta muy bien, pero me
parece que hace falta un
> poco mas de documentacion, quizas en otros idiomas para
que la gente como
> yo, que no sabemos mucho ingles, nos podamos solucinar
los problemas.

Pues estate atento que proximamente tendrás un articulo de
Cherokee en la 
revista SoloLinux, donde podrás tener en español cómo
instalarlo y 
configurarlo correctamente 

> Tengo 
> un problema:
> Si corro apache SIN chroot, todo funciona
correctamente, funcionan mis
> hosts virtuales, y me funciona php sin ningun problema,
y además muy
> rapido. El problema lo tengo cuando hago un chroot, que
no consigo que me
> funcione el php, me dice que no encuentra el
interprete. he intentado meter
> /usr/bin/php4-cgi dentro del chroot, y he metido tb
todas las librerias que
> me daban al hacer un ldd /usr/bin/php4-cgi,

¿Al final has metido el interprete dentro de los paths para
cherokee?
¿Lo está buscando cherokee en el sitio adecuado?
Verificalo en handler_phpcgi.c a la altura de:

static char *php_paths[] = {
        "/usr/lib/cgi-bin/",
        "/usr/local/bin/",
        "/usr/bin/",
        NULL
¿Estás seguro de que lo busca bien? Por defecto cherokee
busca php-cgi, si se 
llama php4-cgi no lo va a encontrar a menos que lo añadas
en:
static char *php_names[] = {
        "php-cgi",
        "php",
        "php5",
        "php4",
        "php3",
        NULL

O bien que hagas un ln -s, claro

Un saludo.

-- 
Manuel Arostegui Ramirez.

Electronic Mail is not secure, may not be read every day,
and should not
be used for urgent or sensitive issues.
_______________________________________________
Cherokee mailing list
Cherokee0x50.org
http://www.0x50.org/cgi-bin/mailman/listinfo/cherokee
Problemas con cherokee+php4+chroot
user name
2006-09-22 23:48:38
Hi Athos,

  I think I forgot to tell you that this mailing list is
used by
  people from all over the globe, and hence messages sent to
it are
  meant to be written in English.

> Hola Alvaro, estube en tu charla sobre Cherokee en la
campus party,
> y la verdad, me convenciste y he empezado a usarlo. Me
parece muy
> claro y eficiente, y la pagina web esta muy bien, pero
me parece que
> hace falta un poco mas de documentacion, quizas en
otros idiomas
> para que la gente como yo, que no sabemos mucho ingles,
nos podamos
> solucinar los problemas.

  Yeah, I do agree. It would be great to have Cherokee
related
  resources in other languages than English. Currently,
there is a
  group of people who are working in new web site for
Cherokee in
  Spanish.

  You may be interested to join them.. here is the link they
sent me
  this morning:


http://pist
ingteam.proboards105.com/index.cgi?board=noticias&action
=display&thread=1158949908

> Tengo un problema:
>
> Si corro apache SIN chroot, todo funciona
correctamente, funcionan
> mis hosts virtuales, y me funciona php sin ningun
problema, y además
> muy rapido.
>
> El problema lo tengo cuando hago un chroot, que no
consigo que me
> funcione el php, me dice que no encuentra el
interprete. he intentado
> meter /usr/bin/php4-cgi dentro del chroot, y he metido
tb todas las
> librerias que me daban al hacer un ldd
/usr/bin/php4-cgi, pero al
> intentar entrar en la pagina php (he probado con
phpmyadmin y con un
> phpinfo.php) me da un error y se cae el servidor.

  Besides it's either a misconfiguration problem, a bug or
a something
  else, I would suggest you to use the fcgi rather than the
phpcgi
  one. It's way much faster and you will easily avoid the
chroot-ing
  problem that you are suffering.

  The only thing you would have to do is to launch the
FastCGI PHP
  daemon chroot'ed wherever you want, and make it listen a
local TCP
  port. Then you'd have to say Cherokee to use that port to
send the
  FastCGI requests, and.. that's it.

  The standard PHP fcgi configuration would be enough:

===================
Extension php {
  Handler fcgi {
    Server localhost:8000 {
      Env PHP_FCGI_MAX_REQUESTS  "10000"
      Env PHP_FCGI_CHILDREN      "5"
      Interpreter "/usr/lib/cgi-bin/chrooted-php
127.0.0.1:8000
/var/tmp/test"
    }
  }
}
===================

  then, you would need to do the chroot installation in
/var/tmp/test,
  and put something like this in
/usr/lib/cgi-bin/chrooted-php (do not
  forget to set it read and execution permission):

===================
#!/bin/bash

PHP_INTERPRETER=/usr/lib/cgi-bin/php5
HOST_PORT=$1
CHROOT_DIR=$2

/usr/sbin/chroot $CHROOT_DIR $PHP_INTERPRETER -b $HOST_PORT
===================


  Good luck! 


-- 
Greetings, alo.
http://www.alobbs.com
_______________________________________________
Cherokee mailing list
Cherokee0x50.org
http://www.0x50.org/cgi-bin/mailman/listinfo/cherokee
Problemas con cherokee+php4+chroot
user name
2006-09-22 15:04:32
El Viernes, 22 de Septiembre de 2006 16:02, Athos .........
escribió:
> Hola Alvaro, estube en tu charla sobre Cherokee en la
campus party, y la
> verdad, me convenciste y he empezado a usarlo. Me
parece muy claro y
> eficiente, y la pagina web esta muy bien, pero me
parece que hace falta un
> poco mas de documentacion, quizas en otros idiomas para
que la gente como
> yo, que no sabemos mucho ingles, nos podamos solucinar
los problemas.

Pues estate atento que proximamente tendrás un articulo de
Cherokee en la 
revista SoloLinux, donde podrás tener en español cómo
instalarlo y 
configurarlo correctamente 

> Tengo 
> un problema:
> Si corro apache SIN chroot, todo funciona
correctamente, funcionan mis
> hosts virtuales, y me funciona php sin ningun problema,
y además muy
> rapido. El problema lo tengo cuando hago un chroot, que
no consigo que me
> funcione el php, me dice que no encuentra el
interprete. he intentado meter
> /usr/bin/php4-cgi dentro del chroot, y he metido tb
todas las librerias que
> me daban al hacer un ldd /usr/bin/php4-cgi,

¿Al final has metido el interprete dentro de los paths para
cherokee?
¿Lo está buscando cherokee en el sitio adecuado?
Verificalo en handler_phpcgi.c a la altura de:

static char *php_paths[] = {
        "/usr/lib/cgi-bin/",
        "/usr/local/bin/",
        "/usr/bin/",
        NULL
¿Estás seguro de que lo busca bien? Por defecto cherokee
busca php-cgi, si se 
llama php4-cgi no lo va a encontrar a menos que lo añadas
en:
static char *php_names[] = {
        "php-cgi",
        "php",
        "php5",
        "php4",
        "php3",
        NULL

O bien que hagas un ln -s, claro

Un saludo.

-- 
Manuel Arostegui Ramirez.

Electronic Mail is not secure, may not be read every day,
and should not
be used for urgent or sensitive issues.
_______________________________________________
Cherokee mailing list
Cherokee0x50.org
http://www.0x50.org/cgi-bin/mailman/listinfo/cherokee
Problemas con cherokee+php4+chroot
user name
2006-09-22 23:48:38
Hi Athos,

  I think I forgot to tell you that this mailing list is
used by
  people from all over the globe, and hence messages sent to
it are
  meant to be written in English.

> Hola Alvaro, estube en tu charla sobre Cherokee en la
campus party,
> y la verdad, me convenciste y he empezado a usarlo. Me
parece muy
> claro y eficiente, y la pagina web esta muy bien, pero
me parece que
> hace falta un poco mas de documentacion, quizas en
otros idiomas
> para que la gente como yo, que no sabemos mucho ingles,
nos podamos
> solucinar los problemas.

  Yeah, I do agree. It would be great to have Cherokee
related
  resources in other languages than English. Currently,
there is a
  group of people who are working in new web site for
Cherokee in
  Spanish.

  You may be interested to join them.. here is the link they
sent me
  this morning:


http://pist
ingteam.proboards105.com/index.cgi?board=noticias&action
=display&thread=1158949908

> Tengo un problema:
>
> Si corro apache SIN chroot, todo funciona
correctamente, funcionan
> mis hosts virtuales, y me funciona php sin ningun
problema, y además
> muy rapido.
>
> El problema lo tengo cuando hago un chroot, que no
consigo que me
> funcione el php, me dice que no encuentra el
interprete. he intentado
> meter /usr/bin/php4-cgi dentro del chroot, y he metido
tb todas las
> librerias que me daban al hacer un ldd
/usr/bin/php4-cgi, pero al
> intentar entrar en la pagina php (he probado con
phpmyadmin y con un
> phpinfo.php) me da un error y se cae el servidor.

  Besides it's either a misconfiguration problem, a bug or a
something
  else, I would suggest you to use the fcgi rather than the
phpcgi
  one. It's way much faster and you will easily avoid the
chroot-ing
  problem that you are suffering.

  The only thing you would have to do is to launch the
FastCGI PHP
  daemon chroot'ed wherever you want, and make it listen a
local TCP
  port. Then you'd have to say Cherokee to use that port to
send the
  FastCGI requests, and.. that's it.

  The standard PHP fcgi configuration would be enough:

===================
Extension php {
  Handler fcgi {
    Server localhost:8000 {
      Env PHP_FCGI_MAX_REQUESTS  "10000"
      Env PHP_FCGI_CHILDREN      "5"
      Interpreter "/usr/lib/cgi-bin/chrooted-php
127.0.0.1:8000
/var/tmp/test"
    }
  }
}
===================

  then, you would need to do the chroot installation in
/var/tmp/test,
  and put something like this in
/usr/lib/cgi-bin/chrooted-php (do not
  forget to set it read and execution permission):

===================
#!/bin/bash

PHP_INTERPRETER=/usr/lib/cgi-bin/php5
HOST_PORT=$1
CHROOT_DIR=$2

/usr/sbin/chroot $CHROOT_DIR $PHP_INTERPRETER -b $HOST_PORT
===================


  Good luck! 


-- 
Greetings, alo.
http://www.alobbs.com
_______________________________________________
Cherokee mailing list
Cherokee0x50.org
http://www.0x50.org/cgi-bin/mailman/listinfo/cherokee
[1-5]

about | contact  Other archives ( Real Estate discussion Medical topics )