Foros del Web » Programando para Internet » PHP »

define("BASE_DIR", $_SERVER['DOCUMENT_ROOT'])

Estas en el tema de define("BASE_DIR", $_SERVER['DOCUMENT_ROOT']) en el foro de PHP en Foros del Web. Buenas, me han pasado una web en usb que necesito subir al hosting de donde trabajo, mis conocimientos son escasos, a ver si me podeis ...
  #1 (permalink)  
Antiguo 23/06/2011, 09:31
 
Fecha de Ingreso: junio-2011
Ubicación: Marbella
Mensajes: 10
Antigüedad: 12 años, 9 meses
Puntos: 0
Exclamación define("BASE_DIR", $_SERVER['DOCUMENT_ROOT'])

Buenas, me han pasado una web en usb que necesito subir al hosting de donde trabajo, mis conocimientos son escasos, a ver si me podeis ayudar!

en el archivo de carga de la web me sale esto que creo es que el problema de todo:

Código PHP:
Ver original
  1. define("BASE_DIR", $_SERVER['DOCUMENT_ROOT']);
  2. include_once(BASE_DIR . '/include/settings.php');
  3. include_once(BASE_DIR . '/include/user_class.php');
  4. include_once(BASE_DIR . '/include/home_class.php');
  5. include_once(BASE_DIR . '/include/lander_admin_class.php');
  6. include_once(BASE_DIR . '/include/floor_class.php');
  7. include_once(BASE_DIR . '/include/delivery_class.php');
  8. include_once(BASE_DIR . '/include/banking_class.php');
  9. include_once(BASE_DIR . '/include/reports_class.php');

y al llamarlo a traves de internet me da estos errores:

Warning: include_once(/home/httpd/vhosts/miweb.com/httpdocs/include/settings.php) [function.include-once]: failed to open stream: No such file or directory in /home/httpd/vhosts/miweb.com/httpdocs/datasql/show_page.php on line 13

Warning: include_once() [function.include]: Failed opening '/home/httpd/vhosts/miweb.com/httpdocs/include/settings.php' for inclusion (include_path='.:') in /home/httpd/vhosts/miweb.com/httpdocs/datasql/show_page.php on line 13

Warning: include_once(/home/httpd/vhosts/miweb.com/httpdocs/include/user_class.php) [function.include-once]: failed to open stream: No such file or directory in /home/httpd/vhosts/miweb.com/httpdocs/datasql/show_page.php on line 14

Warning: include_once() [function.include]: Failed opening '/home/httpd/vhosts/miweb.com/httpdocs/include/user_class.php' for inclusion (include_path='.:') in /home/httpd/vhosts/miweb.com/httpdocs/datasql/show_page.php on line 14

Warning: include_once(/home/httpd/vhosts/miweb.com/httpdocs/include/home_class.php) [function.include-once]: failed to open stream: No such file or directory in /home/httpd/vhosts/miweb.com/httpdocs/datasql/show_page.php on line 15

Warning: include_once() [function.include]: Failed opening '/home/httpd/vhosts/miweb.com/httpdocs/include/home_class.php' for inclusion (include_path='.:') in /home/httpd/vhosts/miweb.com/httpdocs/datasql/show_page.php on line 15

Warning: include_once(/home/httpd/vhosts/miweb.com/httpdocs/include/lander_admin_class.php) [function.include-once]: failed to open stream: No such file or directory in /home/httpd/vhosts/miweb.com/httpdocs/datasql/show_page.php on line 16

Warning: include_once() [function.include]: Failed opening '/home/httpd/vhosts/miweb.com/httpdocs/include/lander_admin_class.php' for inclusion (include_path='.:') in /home/httpd/vhosts/miweb.com/httpdocs/datasql/show_page.php on line 16

Warning: include_once(/home/httpd/vhosts/miweb.com/httpdocs/include/floor_class.php) [function.include-once]: failed to open stream: No such file or directory in /home/httpd/vhosts/miweb.com/httpdocs/datasql/show_page.php on line 17

Warning: include_once() [function.include]: Failed opening '/home/httpd/vhosts/miweb.com/httpdocs/include/floor_class.php' for inclusion (include_path='.:') in /home/httpd/vhosts/miweb.com/httpdocs/datasql/show_page.php on line 17

Warning: include_once(/home/httpd/vhosts/miweb.com/httpdocs/include/delivery_class.php) [function.include-once]: failed to open stream: No such file or directory in /home/httpd/vhosts/miweb.com/httpdocs/datasql/show_page.php on line 18

Warning: include_once() [function.include]: Failed opening '/home/httpd/vhosts/miweb.com/httpdocs/include/delivery_class.php' for inclusion (include_path='.:') in /home/httpd/vhosts/miweb.com/httpdocs/datasql/show_page.php on line 18

Warning: include_once(/home/httpd/vhosts/miweb.com/httpdocs/include/banking_class.php) [function.include-once]: failed to open stream: No such file or directory in /home/httpd/vhosts/miweb.com/httpdocs/datasql/show_page.php on line 19

Warning: include_once() [function.include]: Failed opening '/home/httpd/vhosts/miweb.com/httpdocs/include/banking_class.php' for inclusion (include_path='.:') in /home/httpd/vhosts/miweb.com/httpdocs/datasql/show_page.php on line 19

Warning: include_once(/home/httpd/vhosts/miweb.com/httpdocs/include/reports_class.php) [function.include-once]: failed to open stream: No such file or directory in /home/httpd/vhosts/miweb.com/httpdocs/datasql/show_page.php on line 20

Warning: include_once() [function.include]: Failed opening '/home/httpd/vhosts/miweb.com/httpdocs/include/reports_class.php' for inclusion (include_path='.:') in /home/httpd/vhosts/miweb.com/httpdocs/datasql/show_page.php on line 20

Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/httpd/vhosts/miweb.com/httpdocs/datasql/show_page.php:13) in /home/httpd/vhosts/miweb.com/httpdocs/datasql/show_page.php on line 24

Fatal error: Class 'user' not found in /home/httpd/vhosts/miweb.com/httpdocs/datasql/show_page.php on line 36


Gracias por la ayuda!!

Última edición por zxeus; 23/06/2011 a las 09:46
  #2 (permalink)  
Antiguo 23/06/2011, 09:58
Avatar de cluster28  
Fecha de Ingreso: enero-2008
Ubicación: Donostia - San Sebastián
Mensajes: 756
Antigüedad: 16 años, 3 meses
Puntos: 32
Respuesta: define("BASE_DIR", $_SERVER['DOCUMENT_ROOT'])

En tu FTP esta ruta httpdocs/include/settings.php existe?
  #3 (permalink)  
Antiguo 23/06/2011, 10:03
 
Fecha de Ingreso: junio-2011
Ubicación: Marbella
Mensajes: 10
Antigüedad: 12 años, 9 meses
Puntos: 0
Respuesta: define("BASE_DIR", $_SERVER['DOCUMENT_ROOT'])

no tengo ninguna carpeta llamada httpdocs, es por eso? osea q muevo todo esos archivos a una carpeta llamada asi?
  #4 (permalink)  
Antiguo 23/06/2011, 10:04
Avatar de iviamontes  
Fecha de Ingreso: enero-2011
Ubicación: $cubano->Arg->Mendoza
Mensajes: 1.184
Antigüedad: 13 años, 3 meses
Puntos: 209
Respuesta: define("BASE_DIR", $_SERVER['DOCUMENT_ROOT'])

httpdocs puede ser la raiz del sitio donde estaba antes, muchos hosting usan esa, otros usuan public_html
  #5 (permalink)  
Antiguo 23/06/2011, 10:09
 
Fecha de Ingreso: junio-2011
Ubicación: Marbella
Mensajes: 10
Antigüedad: 12 años, 9 meses
Puntos: 0
Respuesta: define("BASE_DIR", $_SERVER['DOCUMENT_ROOT'])

Perdon, corrijo, si existe, es que estaba entrando a ese direcctorio y por eso no lo veia pero al entrar a traves del ftp estan muchas carpetas entre ellas "httpdocs" y "httpsdocs".

Estoy manualmente borrando todos los "include_once(BASE_DIR . '/adodb/adodb.inc.php');" y poniendo include "/adodb/adodb.inc.php", a ver si asi me funciona pero son tantos archivos que voy a estar modificandolos bastante.

Etiquetas: document_root
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 14:44.