Foros del Web » Administración de Sistemas » Apache »

Apache y mod_perl

Estas en el tema de Apache y mod_perl en el foro de Apache en Foros del Web. Hola!! Soy nueva en el foro. Llevo unos días intentando instalar mod_perl y apache en ubuntu. La versión de apache que tengo es la 2.0.54 ...
  #1 (permalink)  
Antiguo 03/03/2008, 13:20
 
Fecha de Ingreso: marzo-2008
Mensajes: 4
Antigüedad: 16 años, 1 mes
Puntos: 0
Apache y mod_perl

Hola!!
Soy nueva en el foro.
Llevo unos días intentando instalar mod_perl y apache en ubuntu.
La versión de apache que tengo es la 2.0.54 y la del mod_perl que intento instalar es la 2.0.3.
Mi problema viene cuando hago make test de mod_perl, me da error en t/api/server_const.t, y no sé qué hacer. Por ahí he leído algo de que es porque las versiones de los servidores son distintas, pero no entiendo muy bien.
En la consola, el mensaje que saca el make test es el siguiente:
...
t/api/server_const......................FAILED test 3
Failed 1/3 tests, 66.67% okay
...
Failed Test Stat Wstat Total Fail Failed List of Failed
-------------------------------------------------------------------------------
t/api/server_const.t 3 1 33.33% 3
9 tests and 1 subtest skipped.
Failed 1/236 test scripts, 99.58% okay. 1/2421 subtests failed, 99.96% okay.
[warning] server localhost.localdomain:8529 shutdown
[ error] error running tests (please examine t/logs/error_log)
+--------------------------------------------------------+
| Please file a bug report: http://perl.apache.org/bugs/ |
+--------------------------------------------------------+
make: *** [run_tests] Error 1


He mirado en el t/logs/error_log, pero tampoco entiendo muy bien (disculpad por mi inexperiencia). Pone lo siguiente:

*** The following error entry is expected and harmless ***
[Mon Mar 03 18:54:08 2008] [error] Process 15286 terminates itself\n
[Mon Mar 03 18:54:09 2008] [error] [client 127.0.0.1] Handler for modperl returned invalid result code 2
[Mon Mar 03 18:54:09 2008] [error] [client 127.0.0.1] Handler for modperl returned invalid result code 2
# Failed test 3 in /usr/local/mod_perl-2.0.3/t/response/TestAPI/server_const.pm at line 39


y algunos más parecidos a ese.

En el archivo /usr/local/mod_perl-2.0.3/t/response/TestAPI/server_const.pm, las líneas 39, 40 y 41 son las siguientes:

ok t_cmp(Apache2::ServerUtil::get_server_version,
$version,
'Apache2::ServerUtil::get_server_version()');


Me podéis ayudar??? mil gracias!!!
  #2 (permalink)  
Antiguo 07/03/2008, 05:30
 
Fecha de Ingreso: marzo-2008
Mensajes: 4
Antigüedad: 16 años, 1 mes
Puntos: 0
Re: Apache y mod_perl

Hola, soy yo de nuevo.
He estado mirando páginas, y en alguna he visto que la funcion get_server_version() ya no se usa, y que en su lugar se puede usar get_server_banner y get_server_information.
Lo he probado, he puesto en el t/response/TestAPI/server_const.pm dichas funciones en lugar de get_server_version, pero sigue dando error.
¿Me podríais ayudar?
  #3 (permalink)  
Antiguo 08/03/2008, 07:01
 
Fecha de Ingreso: marzo-2008
Mensajes: 1
Antigüedad: 16 años, 1 mes
Puntos: 0
Pregunta Re: Apache y mod_perl

Hola shaory

En primer lugar, espero que alguien sepa responder a tu pregunta, porque yo estoy en la misma situación.

Segundo, no es get_server_information, sino get_server_description, y además de ponerlo en el server_const.pm, hay que incluir código en otros archivos, como modperl_apache_compat.c/.h, apache2_functions.map, functionTable.pm y Apache2__ServerUtil.h. Busca en google, ahi aparecerá todo lo que debes modificar en esos archivos.

Yo lo hice, pero sigue sin funcionar, sigue fallando el test en el mismo punto. No estoy seguro de si es porque esto es válido sólo para versiones de Apache 2.2.x

¿Alguien sabe? Ayuda, por favor
  #4 (permalink)  
Antiguo 09/03/2008, 07:15
 
Fecha de Ingreso: marzo-2008
Mensajes: 4
Antigüedad: 16 años, 1 mes
Puntos: 0
Re: Apache y mod_perl

hola pekot, gracias por tu respuesta.

me equivoqué, si que es get_server_description, gracias.
sí añadí y modifiqué los archivos que dijiste. Además, al hacer perl Makefile.PL MP_AP_PREFIX=/home/httpd/httpd-2.0 para el mod_perl, me decía que añadiera un LoadModule en httpd.conf. Añadí lo siguiente:
LoadModule en /home/httpd/httpd-2.0/conf/httpd.conf (esta vez lo estoy probando con Apache 2.2.6)

si vuelvo a hacer perl Makefile.PL ... me sigue diciendo lo mismo, pero hago make, y make test y ahora consigo mas errores!!!

este es el resultado del make test:

Failed Test Stat Wstat Total Fail Failed List of Failed
-------------------------------------------------------------------------------
t/api/server_const.t 5 1 20.00% 3
t/modules/include.t 6 2 33.33% 4-5
t/modules/include2.t 4 2 50.00% 1 3

y el error.log contiene lo siguiente:
*** The following warn entry is expected and harmless ***
This log message comes with no header

*** The following warn entry is expected and harmless ***
[Sun Mar 09 13:50:39 2008] [debug] aplog.pm(71): log_serror test 1

*** The following warn entry is expected and harmless ***
[Sun Mar 09 13:50:39 2008] [debug] aplog.pm(83): (20014)Internal error: log_serror test 2

*** The following error entry is expected and harmless ***
[Sun Mar 09 13:50:39 2008] [crit] [client 127.0.0.1] (20007)No time was provided and one was required.: log_rerror test

*** The following error entry is expected and harmless ***
[Sun Mar 09 13:50:39 2008] [error] $r->log_error test

*** The following error entry is expected and harmless ***
[Sun Mar 09 13:50:39 2008] [error] $s->log_error test

*** The following error entry is expected and harmless ***
[Sun Mar 09 13:50:39 2008] [error] access to /TestAPI__aplog failed for 127.0.0.1, reason: $r->log_reason test

*** The following error entry is expected and harmless ***
[Sun Mar 09 13:50:39 2008] [error] access to filename failed for 127.0.0.1, reason: $r->log_reason filename test

*** The following warn entry is expected and harmless ***
[Sun Mar 09 13:50:39 2008] [debug] aplog.pm(144): TestAPI::aplog test done
[Sun Mar 09 13:50:39 2008] [notice] [client 127.0.0.1] This message should appear with LogLevel=error!

*** The following warn entry is expected and harmless ***
[Sun Mar 09 13:50:39 2008] [warn] $s->warn test

*** The following warn entry is expected and harmless ***
[Sun Mar 09 13:50:39 2008] [warn] Apache2::ServerRec::warn test

*** The following error entry is expected and harmless ***
[Sun Mar 09 13:50:49 2008] [error] Process 29863 terminates itself\n
[Sun Mar 09 13:50:51 2008] [error] [client 127.0.0.1] Handler for modperl returned invalid result code 2
[Sun Mar 09 13:50:51 2008] [error] [client 127.0.0.1] Handler for modperl returned invalid result code 2
# Failed test 3 in /usr/local/mod_perl-2.0.3/t/response/TestAPI/server_const.pm at line 48

*** The following error entry is expected and harmless ***
[Sun Mar 09 13:51:15 2008] [error] Apache::log_error test ok

*** The following warn entry is expected and harmless ***
[Sun Mar 09 13:51:15 2008] [warn] Apache->warn ok

*** The following warn entry is expected and harmless ***
[Sun Mar 09 13:51:15 2008] [warn] Apache::Server->warn ok

*** The following error entry is expected and harmless ***
[Sun Mar 09 13:51:31 2008] [error] [client 127.0.0.1] APR::Socket::recv: (11) Recurso no disponible temporalmente at /usr/local/mod_perl-2.0.3/t/response/TestError/runtime.pm line 156

*** The following error entry is expected and harmless ***
[Sun Mar 09 13:51:31 2008] [error] [client 127.0.0.1] Undefined subroutine &TestError::runtime::no_such_func called at /usr/local/mod_perl-2.0.3/t/response/TestError/runtime.pm line 150.\n

*** The following error entry is expected and harmless ***
[Sun Mar 09 13:51:31 2008] [error] [client 127.0.0.1] APR::Socket::recv: (11) Recurso no disponible temporalmente at /usr/local/mod_perl-2.0.3/t/response/TestError/runtime.pm line 156\n\tTestError::runtime::mp_error('APR::Socket=S CALAR(0x9974438)') called at /usr/local/mod_perl-2.0.3/t/response/TestError/runtime.pm line 75\n\tTestError::runtime::die_hook_confess_mp_erro r('Apache2::RequestRec=SCALAR(0x97f73cc)', 'APR::Socket=SCALAR(0x9974438)') called at /usr/local/mod_perl-2.0.3/t/response/TestError/runtime.pm line 31\n\tTestError::runtime::handler('Apache2::Reques tRec=SCALAR(0x97f73cc)') called at -e line 0\n\teval {...} called at -e line 0\n

*** The following error entry is expected and harmless ***
[Sun Mar 09 13:51:31 2008] [error] [client 127.0.0.1] Undefined subroutine &TestError::runtime::no_such_func called at /usr/local/mod_perl-2.0.3/t/response/TestError/runtime.pm line 150.\n at /usr/local/mod_perl-2.0.3/t/response/TestError/runtime.pm line 150\n\tTestError::runtime::non_mp_error('APR::Sock et=SCALAR(0x98ef21c)') called at /usr/local/mod_perl-2.0.3/t/response/TestError/runtime.pm line 82\n\tTestError::runtime::die_hook_confess_non_mp_ error('Apache2::RequestRec=SCALAR(0x98ef198)', 'APR::Socket=SCALAR(0x98ef21c)') called at /usr/local/mod_perl-2.0.3/t/response/TestError/runtime.pm line 31\n\tTestError::runtime::handler('Apache2::Reques tRec=SCALAR(0x98ef198)') called at -e line 0\n\teval {...} called at -e line 0\n

*** The following error entry is expected and harmless ***
[Sun Mar 09 13:51:31 2008] [error] [client 127.0.0.1] custom die hook: APR::Socket::recv: (11) Recurso no disponible temporalmente at /usr/local/mod_perl-2.0.3/t/response/TestError/runtime.pm line 156 at /usr/local/mod_perl-2.0.3/t/response/TestError/runtime.pm line 87.\n

*** The following error entry is expected and harmless ***
[Sun Mar 09 13:51:31 2008] [error] [client 127.0.0.1] custom die hook: Undefined subroutine &TestError::runtime::no_such_func called at /usr/local/mod_perl-2.0.3/t/response/TestError/runtime.pm line 150.\n

*** The following error entry is expected and harmless ***
[Sun Mar 09 13:51:32 2008] [error] [client 127.0.0.1] failed to resolve handler `TestError::syntax': syntax error at /usr/local/mod_perl-2.0.3/t/response/TestError/syntax.pm line 17, near "\\;"\nCompilation failed in require at (eval 189) line 3.\n

*** The following 2 error entries are expected and harmless ***
[Sun Mar 09 13:51:39 2008] [error] [client 127.0.0.1] This filter must die at /usr/local/mod_perl-2.0.3/t/filter/TestFilter/in_error.pm line 26.\n
[Sun Mar 09 13:51:39 2008] [error] [client 127.0.0.1] Apache2::RequestIO::read: (120001) filter handler has failed at /usr/local/mod_perl-2.0.3/t/filter/TestFilter/in_error.pm line 41
[Sun Mar 09 13:51:59 2008] [error] [client 127.0.0.1] Undefined subroutine &TestHooks::error::bomb called at /usr/local/mod_perl-2.0.3/t/hooks/TestHooks/error.pm line 21.\n
[Sun Mar 09 13:51:59 2008] [error] [client 127.0.0.1] Undefined subroutine &TestHooks::error::bomb called at /usr/local/mod_perl-2.0.3/t/hooks/TestHooks/error.pm line 21.\n

*** The following error entry is expected and harmless ***
[Sun Mar 09 13:52:07 2008] [error] [client 127.0.0.1] File does not exist: /usr/local/mod_perl-2.0.3/t/htdocs/nope

*** The following error entry is expected and harmless ***
[Sun Mar 09 13:52:25 2008] [error] [client 127.0.0.1] need AuthName: /TestModperl__setauth

*** The following error entry is expected and harmless ***
[Sun Mar 09 13:52:27 2008] [error] [client 127.0.0.1] File does not exist: /usr/local/mod_perl-2.0.3/t/htdocs/TestModperl__status
[Sun Mar 09 13:52:27 2008] [error] [client 127.0.0.1] Handler for modperl returned invalid result code 601
[Sun Mar 09 13:52:27 2008] [error] [client 127.0.0.1] Handler for modperl returned invalid result code 1

*** The following error entry is expected and harmless ***
[Sun Mar 09 13:52:27 2008] [error] [client 127.0.0.1] Died at /usr/local/mod_perl-2.0.3/t/response/TestModperl/status.pm line 24.\n

(...)

Alguien sabe como puedo arreglarlo? por favor, estoy muy perdida
O si alguien sabe donde puedo encontrar la respuesta, por favor
Estaría muy muy agradecida

Un saludo
  #5 (permalink)  
Antiguo 13/03/2008, 04:59
 
Fecha de Ingreso: marzo-2008
Mensajes: 4
Antigüedad: 16 años, 1 mes
Puntos: 0
Re: Apache y mod_perl

Hola!
logré solucionar los errores! la verdad es que me debí saltar alguna modificacion en algún archivo, porque cuando lo volví a hacer e instalé algún módulo que decía el make test que faltaba, no me dio errores!!

Aun así, el make test da como resultado el siguiente:

(...)
t/filter/both_str_native_remove.........skipped
all skipped: cannot find module 'deflate'
t/filter/both_str_req_add...............ok
t/filter/both_str_req_mix...............skipped
all skipped: cannot find module 'deflate'
t/filter/both_str_req_proxy.............skipped
all skipped: cannot find module 'mod_proxy', cannot find module 'proxy_http.c'
(...)
t/modperl/env...........................ok
1/57 skipped: r->subprocess_env + local() doesnt fully work yet
(...)
t/modperl/local_env.....................skipped
all skipped: local %ENV is still broken
(...)
t/modperl/perl_options2.................skipped
all skipped: PerlOptions None is broken
(...)
t/modperl/request_rec_tie_api...........skipped
all skipped: perl 5.008007: PerlIO is used instead of TIEd IO
(...)


Aunque no da errores, tengo que instalar estos módulos antes de hacer make install?
La versión de Apache que uso es 2.2.6 y mod_perl 2.0.3.
He añadido lo siguiente en /home/httpd/httpd-2.0/conf/httpd.conf (segui las instrucciones de modperlbook.org/html/24-4-1-Installing-from-Source.html, para la instalación de mod_perl):

LoadModule proxy_module /usr/lib/apache2/modules/mod_proxy.so
LoadModule proxy_http_module /usr/lib/apache2/modules/mod_poxy_http.so

Pero el resultado al hacer make test de nuevo es:

t/TEST -clean
[warning] setting ulimit to allow core files
ulimit -c unlimited; /usr/bin/perl /usr/local/mod_perl-2.0.3/t/TEST -clean
APACHE_TEST_GROUP= APACHE_TEST_HTTPD= APACHE_TEST_PORT= APACHE_TEST_USER= APACHE_TEST_APXS= \
/usr/bin/perl -Iblib/arch -Iblib/lib \
t/TEST -bugreport -verbose=0
[warning] setting ulimit to allow core files
ulimit -c unlimited; /usr/bin/perl /usr/local/mod_perl-2.0.3/t/TEST -bugreport -verbose=0
/home/httpd/httpd-2.0/bin/httpd -d /usr/local/mod_perl-2.0.3/t -f /usr/local/mod_perl-2.0.3/t/conf/httpd.conf -D APACHE2 -D PERL_USEITHREADS
using Apache/2.2.6 (prefork MPM)

waiting 120 seconds for server to start: .httpd: Syntax error on line 13 of /usr/local/mod_perl-2.0.3/t/conf/httpd.conf: Cannot load /usr/lib/apache2/modules/mod_proxy.so into server: /usr/lib/apache2/modules/mod_proxy.so: undefined symbol: apr_connect
[ error]
server has died with status 255 (t/logs/error_log wasn't created, start the server in the debug mode)
sh: line 1: 12559 Terminado /usr/bin/perl /usr/local/mod_perl-2.0.3/t/TEST -bugreport -verbose=0
make: *** [run_tests] Error 143

¿Alguna ayuda?
Gracias
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 07:23.