Bienvenido(a) a Alcance Libre 05/09/2025, 21:29

Alcance Libre Foros

 Índice del foro > Todo acerca de Linux > Programación y desarrollo New Topic Post Reply
 Pagina dejo de funcionar al actualizar SO
Tópico anterior Tópico siguiente
   
Anónimo: : hector8304
 02/08/12 12:55 (Leído 7,445 veces)  
Buen día
el caso es el siguiente, tengo un servidor con CentOS 5.6 instalado con php y mysql y funcionando a la perfección, he instalado un nuevo servidor pero con CentOS 6.2 php y mysql y en este ultimo al pasar la carpeta de las paginas que tenia creadas en el primero, estas dejan de funcionar, una simple linea de codigo (print("Texto <BR>"WinkWink y este no visualiza lo que debe de escribir, alguien sabe a que se debe este error?

Saludos y de ante mano muchas gracias!!
 
 Quote
Joel Barrios Dueñas
 02/08/12 01:16  

Admin

Estado: desconectado
Site Admin

Identificado: 17/02/07
Mensajes: 1761
Localización:Mexico
Verifica que esté instalado el paquete php. Si sólo instalaste el paquete php-mysql, tiene un error en el spec que no incluye al paquete php como dependencia.
 
Profile Email Website
 Quote
Anónimo: : hector8304
 02/08/12 05:03  
Tengo instalado el php y el php-mysql ya que un script de php que me hace validación si corre, el problema solo se presenta en la interfas web que no me reconoce la mexcla entre php y html
Esta es la salida que tengo con rpm -q
[root@server]# rpm -q php
php-5.3.3-14.el6_3.i686
[root@server]# rpm -q php-mysql
php-mysql-5.3.3-14.el6_3.i686
[root@server]#
 
 Quote
Joel Barrios Dueñas
 02/08/12 10:50  

Admin

Estado: desconectado
Site Admin

Identificado: 17/02/07
Mensajes: 1761
Localización:Mexico
Verifica componentes:

PHP Formatted Code
rpm -V php


¿Que contiene /etc/httpd/conf.d/php.conf?

PHP Formatted Code
#
# PHP is an HTML-embedded scripting language which attempts to make it
# easy for developers to write dynamically generated webpages.
#
<IfModule prefork.c>
  LoadModule php5_module modules/libphp5.so
</IfModule>
<IfModule worker.c>
  LoadModule php5_module modules/libphp5-zts.so
</IfModule>

#
# Cause the PHP interpreter to handle files with a .php extension.
#
AddHandler php5-script .php
AddType text/html .php

#
# Add index.php to the list of files that will be served as directory
# indexes.
#
DirectoryIndex index.php

#
# Uncomment the following line to allow PHP to pretty-print .phps
# files as PHP source code:
#
#AddType application/x-httpd-php-source .phps


¿Está habilitada la política httpd_builtin_scripting de SELinux?

PHP Formatted Code
getsebool -a |grep httpd_builtin_scripting


Si está inactiva, ejecuta:

PHP Formatted Code
setsebool -P httpd_builtin_scripting 1


Por favor, publica un extracto de /var/log/httpd/error_log y de /var/log/audit/audit.log.
 
Profile Email Website
 Quote
Anónimo: : hector8304
 03/08/12 09:20  
Gracias por responder, aquí estan las salidas:
rpm -V php
php -v
PHP 5.3.3 (cli) (built: Jul 3 2012 16:40:30)
Copyright (c) 1997-2010 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies
¿Que contiene /etc/httpd/conf.d/php.conf?
#
# PHP is an HTML-embedded scripting language which attempts to make it
# easy for developers to write dynamically generated webpages.
#
<IfModule prefork.c>
LoadModule php5_module modules/libphp5.so
</IfModule>
<IfModule worker.c>
LoadModule php5_module modules/libphp5-zts.so
</IfModule>
#
# Cause the PHP interpreter to handle files with a .php extension.
#
AddHandler php5-script .php
AddType text/html .php
#
# Add index.php to the list of files that will be served as directory
# indexes.
#
DirectoryIndex index.php
#
# Uncomment the following line to allow PHP to pretty-print .phps
# files as PHP source code:
#
#AddType application/x-httpd-php-source .phps
¿Está habilitada la política httpd_builtin_scripting de SELinux?
[root@servidor]# getsebool -a |grep httpd_builtin_scripting
getsebool: SELinux is disabled

************
var log httpd
[Fri Aug 03 08:48:14 2012] [error] Exception KeyError: KeyError(-1215678640,) in <module 'threading' from '/usr/lib/python2.6/threading.pyc'> ignored
[Fri Aug 03 08:48:14 2012] [error] Exception KeyError: KeyError(-1215678640,) in <module 'threading' from '/usr/lib/python2.6/threading.pyc'> ignored
[Fri Aug 03 08:48:14 2012] [error] Exception KeyError: KeyError(-1215678640,) in <module 'threading' from '/usr/lib/python2.6/threading.pyc'> ignored
[Fri Aug 03 08:48:14 2012] [error] Exception KeyError: KeyError(-1215678640,) in <module 'threading' from '/usr/lib/python2.6/threading.pyc'> ignored
[Fri Aug 03 08:48:14 2012] [error] Exception KeyError: KeyError(-1215678640,) in <module 'threading' from '/usr/lib/python2.6/threading.pyc'> ignored
[Fri Aug 03 08:48:14 2012] [error] Exception KeyError: KeyError(-1215678640,) in <module 'threading' from '/usr/lib/python2.6/threading.pyc'> ignored
[Fri Aug 03 08:48:14 2012] [error] Exception KeyError: KeyError(-1215678640,) in <module 'threading' from '/usr/lib/python2.6/threading.pyc'> ignored
[Fri Aug 03 08:48:14 2012] [error] Exception KeyError: KeyError(-1215678640,) in <module 'threading' from '/usr/lib/python2.6/threading.pyc'> ignored
[Fri Aug 03 08:48:14 2012] [notice] caught SIGTERM, shutting down
[Fri Aug 03 08:48:15 2012] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Fri Aug 03 08:48:16 2012] [notice] Digest: generating secret for digest authentication ...
[Fri Aug 03 08:48:16 2012] [notice] Digest: done
[Fri Aug 03 08:48:16 2012] [warn] mod_wsgi: Compiled for Python/2.6.2.
[Fri Aug 03 08:48:16 2012] [warn] mod_wsgi: Runtime using Python/2.6.6.
[Fri Aug 03 08:48:16 2012] [notice] Apache/2.2.15 (Unix) DAV/2 mod_auth_kerb/5.4 mod_auth_pgsql/2.0.3 mod_nss/2.2.15 NSS/3.13.1.0 Basic ECC PHP/5.3.3 mod_ssl/2.2.15 OpenSSL/1.0.0-fips mod_wsgi/3.2 Python/2.6.6 mod_perl/2.0.4 Perl/v5.10.1 configured -- resuming normal operations
[Fri Aug 03 08:48:33 2012] [error] [client 192.168.50.113] PHP Parse error: syntax error, unexpected T_ELSE in /var/www/html/navegador/izq_dw.php on line 156, referer: http://stcmex2:8080/navegador/
[Fri Aug 03 08:48:33 2012] [error] [client 192.168.50.113] File does not exist: /var/www/html/navegador/<, referer: http://stcmex2:8080/navegador/playarch.php
[Fri Aug 03 08:48:33 2012] [error] [client 192.168.50.113] PHP Parse error: syntax error, unexpected T_ELSE in /var/www/html/navegador/izq_dw.php on line 156, referer: http://stcmex2:8080/navegador/log_IO.php
[Fri Aug 03 08:48:33 2012] [error] [client 192.168.50.113] PHP Parse error: syntax error, unexpected $end in /var/www/html/navegador/buscador.php on line 112, referer: http://stcmex2:8080/navegador/log_IO.php
var log audit
type=USER_ACCT msg=audit(1344001741.356:12600): user pid=29533 uid=0 auid=4294967295 ses=4294967295 msg='op=PAM:accounting acct="root" exe="/usr/sbin/crond" hostname=? addr=? terminal=cron res=success'
type=CRED_ACQ msg=audit(1344001741.356:12601): user pid=29533 uid=0 auid=4294967295 ses=4294967295 msg='op=PAM:setcred acct="root" exe="/usr/sbin/crond" hostname=? addr=? terminal=cron res=success'
type=LOGIN msg=audit(1344001741.356:12602): pid=29533 uid=0 old auid=4294967295 new auid=0 old ses=4294967295 new ses=2067
type=USER_START msg=audit(1344001741.366:12603): user pid=29533 uid=0 auid=0 ses=2067 msg='op=PAM:session_open acct="root" exe="/usr/sbin/crond" hostname=? addr=? terminal=cron res=success'
type=CRED_DISP msg=audit(1344001741.496:12604): user pid=29533 uid=0 auid=0 ses=2067 msg='op=PAM:setcred acct="root" exe="/usr/sbin/crond" hostname=? addr=? terminal=cron res=success'
type=USER_END msg=audit(1344001741.496:12605): user pid=29533 uid=0 auid=0 ses=2067 msg='op=PAM:session_close acct="root" exe="/usr/sbin/crond" hostname=? addr=? terminal=cron res=success'
type=USER_ACCT msg=audit(1344001801.498:12606): user pid=29757 uid=0 auid=4294967295 ses=4294967295 msg='op=PAM:accounting acct="root" exe="/usr/sbin/crond" hostname=? addr=? terminal=cron res=success'
type=CRED_ACQ msg=audit(1344001801.498:12607): user pid=29757 uid=0 auid=4294967295 ses=4294967295 msg='op=PAM:setcred acct="root" exe="/usr/sbin/crond" hostname=? addr=? terminal=cron res=success'
type=USER_ACCT msg=audit(1344001801.498:12608): user pid=29758 uid=0 auid=4294967295 ses=4294967295 msg='op=PAM:accounting acct="root" exe="/usr/sbin/crond" hostname=? addr=? terminal=cron res=success'
type=LOGIN msg=audit(1344001801.498:12609): pid=29757 uid=0 old auid=4294967295 new auid=0 old ses=4294967295 new ses=2068
type=CRED_ACQ msg=audit(1344001801.498:12610): user pid=29758 uid=0 auid=4294967295 ses=4294967295 msg='op=PAM:setcred acct="root" exe="/usr/sbin/crond" hostname=? addr=? terminal=cron res=success'
type=LOGIN msg=audit(1344001801.498:12611): pid=29758 uid=0 old auid=4294967295 new auid=0 old ses=4294967295 new ses=2069
 
 Quote
Anónimo: : hector8304
 03/08/12 09:59  
De ante mano muchas gracias por estar respondiendo, en efecto fue a causa de la actualización en el php.ini anterior tenia "short_open_tag = On" y en el nuevo server esa misma etiqueta la tenia como "short_open_tag = Off" buscando un poco mas encontre ese detalle en esta pagina "http://www.samuelaguilera.com/archivo/parse-error-syntax-error-unexpected-end.xhtml"

Saludos!!
 
 Quote
Contenido generado en: 0.18 segundos New Topic Post Reply
 Todas las horas son CST. Hora actual 09:29 .
Tópico normal Tópico normal
Tópico Pegado Tópico Pegado
Tópico bloqueado Tópico bloqueado
Mensaje Nuevo Mensaje Nuevo
Tópico pegado con nuevo mensaje Tópico pegado con nuevo mensaje
Tópico bloqueado con nuevo mensaje Tópico bloqueado con nuevo mensaje
Ver mensajes anónimos 
Los usuarios anónimos pueden enviar 
Se permite HTML Filtrado 
Contenido censurado