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

No me lee los requires

Estas en el tema de No me lee los requires en el foro de LAMP en Foros del Web. Hola a todos, los menús de mi web funciona mediante varios requires, ya que su funcionamiento es mas sencillo, si quieres cambiar algo lo cambias ...
  #1 (permalink)  
Antiguo 25/08/2009, 13:38
Avatar de Distriker  
Fecha de Ingreso: marzo-2008
Ubicación: Las Palmas De Gran Canarias
Mensajes: 924
Antigüedad: 16 años, 1 mes
Puntos: 23
No me lee los requires

Hola a todos, los menús de mi web funciona mediante varios requires, ya que su funcionamiento es mas sencillo, si quieres cambiar algo lo cambias en un archivo y ya está y no hace falta cambiarlo en todas las páginas.

En mi web vista desde mi host se ve perfectamente, pero en el LocalHost no detecta los requires, un gran problema.

Por cierto, uso XAMPP y tengo activado lo siguiente:
  • MySQL
  • Apache
  • FileZilla
¿Qué problema tengo?

Saludos
__________________
Si no te quejas, nunca conseguiras nada, pero si te quejas siempre lo perderás todo.
Una mala acción da fruto a un mal Karma.
  #2 (permalink)  
Antiguo 25/08/2009, 17:54
Avatar de lobo_php  
Fecha de Ingreso: noviembre-2007
Ubicación: Cali-Colombia
Mensajes: 1.869
Antigüedad: 16 años, 5 meses
Puntos: 75
Respuesta: No me lee los requires

no entiendo algo
si desde tu host (localhost, host loca, este host, aqui) se ve bien, como q en el localhost no los detecta?
al fin q?
se ve bien o no se ve bien?
sabiendo q te refieres al mismo host (host local o localhost)
__________________
Cabuntu.org - Difundiendo Software Libre en Cali, Colombia
Usuario Linux # 483175
  #3 (permalink)  
Antiguo 26/08/2009, 05:15
Avatar de Distriker  
Fecha de Ingreso: marzo-2008
Ubicación: Las Palmas De Gran Canarias
Mensajes: 924
Antigüedad: 16 años, 1 mes
Puntos: 23
Respuesta: No me lee los requires

A ver Lobo_php, he dicho lo siguiente:

He dicho que en mi hosting compartido, es decir, donde tengo mi dominio alojado si se ven los requires correctamente, pero en el LocalHost echo con Xampp no los lee, es decir, las zonas donde debería salir el contenido de los requires no sale.

¿Entiendes ahora?

Saludos
__________________
Si no te quejas, nunca conseguiras nada, pero si te quejas siempre lo perderás todo.
Una mala acción da fruto a un mal Karma.
  #4 (permalink)  
Antiguo 26/08/2009, 17:03
Avatar de lobo_php  
Fecha de Ingreso: noviembre-2007
Ubicación: Cali-Colombia
Mensajes: 1.869
Antigüedad: 16 años, 5 meses
Puntos: 75
Respuesta: No me lee los requires

y puedes leer el archivo de configuracion del apache y el php.ini del sitio donde esta alojado tu trabajo?
depronto en tu localhost no tienes algunos modulos habilitados, trata de ver ese archivo de configuracion a ver si puedes copiar algo de ahi :D
__________________
Cabuntu.org - Difundiendo Software Libre en Cali, Colombia
Usuario Linux # 483175
  #5 (permalink)  
Antiguo 26/08/2009, 17:08
Avatar de Distriker  
Fecha de Ingreso: marzo-2008
Ubicación: Las Palmas De Gran Canarias
Mensajes: 924
Antigüedad: 16 años, 1 mes
Puntos: 23
Respuesta: No me lee los requires

Ok, mira, este es mi php.ini:

Código php.ini:
Ver original
  1. [PHP]
  2.  
  3. ;;;;;;;;;;;;;;;;;;;
  4. ; About php.ini   ;
  5. ;;;;;;;;;;;;;;;;;;;
  6. ; PHP's initialization file, generally called php.ini, is responsible for
  7. ; configuring many of the aspects of PHP's behavior.
  8.  
  9. ; PHP attempts to find and load this configuration from a number of locations.
  10. ; The following is a summary of its search order:
  11. ; 1. SAPI module specific location.
  12. ; 2. The PHPRC environment variable. (As of PHP 5.2.0)
  13. ; 3. A number of predefined registry keys on Windows (As of PHP 5.2.0)
  14. ; 4. Current working directory (except CLI)
  15. ; 5. The web server's directory (for SAPI modules), or directory of PHP
  16. ; (otherwise in Windows)
  17. ; 6. The directory from the --with-config-file-path compile time option, or the
  18. ; Windows directory (C:\windows or C:\winnt)
  19. ; See the PHP docs for more specific information.
  20. ; http://php.net/configuration.file
  21.  
  22. ; The syntax of the file is extremely simple.  Whitespace and Lines
  23. ; beginning with a semicolon are silently ignored (as you probably guessed).
  24. ; Section headers (e.g. [Foo]) are also silently ignored, even though
  25. ; they might mean something in the future.
  26.  
  27. ; Directives following the section heading [PATH=/www/mysite] only
  28. ; apply to PHP files in the /www/mysite directory.  Directives
  29. ; following the section heading [HOST=www.example.com] only apply to
  30. ; PHP files served from www.example.com.  Directives set in these
  31. ; special sections cannot be overridden by user-defined INI files or
  32. ; at runtime. Currently, [PATH=] and [HOST=] sections only work under
  33. ; CGI/FastCGI.
  34. ; http://php.net/ini.sections
  35.  
  36. ; Directives are specified using the following syntax:
  37. ; directive = value
  38. ; Directive names are *case sensitive* - foo=bar is different from FOO=bar.
  39. ; Directives are variables used to configure PHP or PHP extensions.
  40. ; There is no name validation.  If PHP can't find an expected
  41. ; directive because it is not set or is mistyped, a default value will be used.
  42.  
  43. ; The value can be a string, a number, a PHP constant (e.g. E_ALL or M_PI), one
  44. ; of the INI constants (On, Off, True, False, Yes, No and None) or an expression
  45. ; (e.g. E_ALL & ~E_NOTICE), a quoted string ("bar"), or a reference to a
  46. ; previously set variable or directive (e.g. ${foo})
  47.  
  48. ; Expressions in the INI file are limited to bitwise operators and parentheses:
  49. ; |  bitwise OR
  50. ; ^  bitwise XOR
  51. ; &  bitwise AND
  52. ; ~  bitwise NOT
  53. ; !  boolean NOT
  54.  
  55. ; Boolean flags can be turned on using the values 1, On, True or Yes.
  56. ; They can be turned off using the values 0, Off, False or No.
  57.  
  58. ; An empty string can be denoted by simply not writing anything after the equal
  59. ; sign, or by using the None keyword:
  60.  
  61. ;  foo =         ; sets foo to an empty string
  62. ;  foo = None    ; sets foo to an empty string
  63. ;  foo = "None"  ; sets foo to the string 'None'

Y mi información de PHP:

Código:
PHP Version 5.3.0

System 	Windows NT DISTRIKER 6.0 build 6001 (Windows Vista Home Premium Edition Service Pack 1) i586
Build Date 	Jul 2 2009 21:02:53
Compiler 	MSVC6 (Visual C++ 6.0)
Architecture 	x86
Configure Command 	cscript /nologo configure.js
Server API 	Apache 2.0 Handler
Virtual Directory Support 	enabled
Configuration File (php.ini) Path 	no value
Loaded Configuration File 	C:\xampp\php\php.ini
Scan this dir for additional .ini files 	(none)
Additional .ini files parsed 	(none)
PHP API 	20090626
PHP Extension 	20090626
Zend Extension 	220090626
Zend Extension Build 	API220090626,TS,VC6
PHP Extension Build 	API20090626,TS,VC6
Debug Build 	no
Thread Safety 	enabled
Zend Memory Manager 	enabled
Zend Multibyte Support 	disabled
IPv6 Support 	enabled
Registered PHP Streams 	https, ftps, php, file, glob, data, http, ftp, compress.zlib, compress.bzip2, phar, zip
Registered Stream Socket Transports 	tcp, udp, ssl, sslv3, sslv2, tls
Registered Stream Filters 	convert.iconv.*, string.rot13, string.toupper, string.tolower, string.strip_tags, convert.*, consumed, dechunk, zlib.*, bzip2.*

Zend logo This program makes use of the Zend Scripting Language Engine:
Zend Engine v2.3.0, Copyright (c) 1998-2009 Zend Technologies

PHP Credits
Configuration
apache2handler
Apache Version 	Apache/2.2.12 (Win32) DAV/2 mod_ssl/2.2.12 OpenSSL/0.9.8k mod_autoindex_color PHP/5.3.0 mod_perl/2.0.4 Perl/v5.10.0
Apache API Version 	20051115
Server Administrator 	postmaster@localhost
Hostname:Port 	localhost:80
Max Requests 	Per Child: 0 - Keep Alive: on - Max Per Connection: 100
Timeouts 	Connection: 300 - Keep-Alive: 5
Virtual Server 	No
Server Root 	C:/xampp/apache
Loaded Modules 	core mod_win32 mpm_winnt http_core mod_so mod_actions mod_alias mod_asis mod_auth_basic mod_auth_digest mod_authn_default mod_authn_file mod_authz_default mod_authz_groupfile mod_authz_host mod_authz_user mod_cgi mod_dav mod_dav_fs mod_dav_lock mod_dir mod_env mod_headers mod_include mod_info mod_isapi mod_log_config mod_mime mod_negotiation mod_rewrite mod_setenvif mod_ssl mod_status mod_autoindex_color mod_php5 mod_perl

Directive	Local Value	Master Value
engine	1	1
last_modified	0	0
xbithack	0	0
Si necesitas mas, comentamelo, ¿qué cree usted que me pasa?

Saludos
__________________
Si no te quejas, nunca conseguiras nada, pero si te quejas siempre lo perderás todo.
Una mala acción da fruto a un mal Karma.
  #6 (permalink)  
Antiguo 26/08/2009, 19:17
Avatar de lobo_php  
Fecha de Ingreso: noviembre-2007
Ubicación: Cali-Colombia
Mensajes: 1.869
Antigüedad: 16 años, 5 meses
Puntos: 75
Respuesta: No me lee los requires

pasa el php.ini no el php info
__________________
Cabuntu.org - Difundiendo Software Libre en Cali, Colombia
Usuario Linux # 483175
  #7 (permalink)  
Antiguo 27/08/2009, 04:13
Avatar de Distriker  
Fecha de Ingreso: marzo-2008
Ubicación: Las Palmas De Gran Canarias
Mensajes: 924
Antigüedad: 16 años, 1 mes
Puntos: 23
Respuesta: No me lee los requires

El php.ini es lo primero que te pasé, lo segundo es el php info.

Saludos
__________________
Si no te quejas, nunca conseguiras nada, pero si te quejas siempre lo perderás todo.
Una mala acción da fruto a un mal Karma.
  #8 (permalink)  
Antiguo 27/08/2009, 08:56
Avatar de Distriker  
Fecha de Ingreso: marzo-2008
Ubicación: Las Palmas De Gran Canarias
Mensajes: 924
Antigüedad: 16 años, 1 mes
Puntos: 23
Respuesta: No me lee los requires

Huy, señores perdonen, pero creo que me he equivocado, copie mal mi php.ini, es mas largo

Como el php.ini posee demasiados caracteres, os lo pongo disponible para descarga

Solamente pulsad aquí.

¿Qué os parece?

Saludos

Edito.

Tema arreglado, por lo visto era un error de lectura del PHP que tenía escrito, ya que yo tenía escrito esto <? y no esto <?php por lo que no lo leía pero si en mi host, pero bueno, ya está cambiado.

Lo siento Lobo y gracias.

Saludos
__________________
Si no te quejas, nunca conseguiras nada, pero si te quejas siempre lo perderás todo.
Una mala acción da fruto a un mal Karma.

Última edición por Distriker; 27/08/2009 a las 09:16
  #9 (permalink)  
Antiguo 27/08/2009, 15:04
Avatar de lobo_php  
Fecha de Ingreso: noviembre-2007
Ubicación: Cali-Colombia
Mensajes: 1.869
Antigüedad: 16 años, 5 meses
Puntos: 75
Respuesta: No me lee los requires

osea habia que acomodar el apache XD
por eso dije, pon la conf del apache de aca y de alla, el php de aca y de alla.

pero que bueno que lo hayas arreglado ;)
__________________
Cabuntu.org - Difundiendo Software Libre en Cali, Colombia
Usuario Linux # 483175
  #10 (permalink)  
Antiguo 27/08/2009, 15:23
Avatar de Distriker  
Fecha de Ingreso: marzo-2008
Ubicación: Las Palmas De Gran Canarias
Mensajes: 924
Antigüedad: 16 años, 1 mes
Puntos: 23
Respuesta: No me lee los requires

Exacto, maldito apache gandul xD.

Muchas gracias.

De todas formas, me han dicho que es mejor poner el <?php que el <?

Saludos
__________________
Si no te quejas, nunca conseguiras nada, pero si te quejas siempre lo perderás todo.
Una mala acción da fruto a un mal Karma.
  #11 (permalink)  
Antiguo 27/08/2009, 22:07
Avatar de lobo_php  
Fecha de Ingreso: noviembre-2007
Ubicación: Cali-Colombia
Mensajes: 1.869
Antigüedad: 16 años, 5 meses
Puntos: 75
Respuesta: No me lee los requires

si, en definitiva, si tu codigo cambia de pc, ira ya preparado para cualquier apache q se interponga en su camino.

saludos.
__________________
Cabuntu.org - Difundiendo Software Libre en Cali, Colombia
Usuario Linux # 483175
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 10:14.