Foros del Web » Programando para Internet » PHP »

[SOLUCIONADO] Problema con index.php Gen4

Estas en el tema de Problema con index.php Gen4 en el foro de PHP en Foros del Web. Muy buenas compañeros, les comento mi situación. Obtuve mi Gen4 y me propuse a instalarlo en mi web. Todo bien.. creo la base de datos, ...
  #1 (permalink)  
Antiguo 22/04/2015, 17:38
 
Fecha de Ingreso: abril-2015
Ubicación: Argentina
Mensajes: 9
Antigüedad: 8 años, 11 meses
Puntos: 0
Problema con index.php Gen4

Muy buenas compañeros, les comento mi situación. Obtuve mi Gen4 y me propuse a instalarlo en mi web. Todo bien.. creo la base de datos, modifico los archivos a configurar, subo los archivos y listo!! Consigo acceder al panel de administración.. y desde allí activo el template que viene por defecto... pero a acceder al index.php de mi web me da como respuesta el siguiente mensaje de error:

"The configuration did not recieve appropriate variables to accept your request."

Si no fuera mucha molestia les agradecería su apoyo para resolver esta situación.. a continuación les dejo el source del index.php:

Código:
<?php
session_start();
include_once('lib/lib.php');
include_once('lib/configuration.php');

$ddir = THDIR.$do->get_file_url();
include($ddir);

if(file_exists(HEADER)) { include_once(HEADER); }
if($contents) { print $contents; }
if(file_exists(FOOTER)) { include_once(FOOTER); }
?>
y aquí les dejo el de lib.php y configuration.php:

Código:
<?php

/* security*/

  //lib start
session_start();

if(!defined('DB_DETAILS')) {
include_once('lib_database.php');
}

if(!function_exists("set_error")) {
include_once('lib_functions.php');
}

if(mysql_ver() < 5)
{
set_error("Your server doesn't support MySQL 5, Please install MySQL 5 to have Gen4 perform at it's best.");
}

if(PHP_VERSION < 5.1)
{
set_error("Your server's PHP version is incompatible with Gen4. Gen4 is only compatible with PHP Version 5.1.0 and above.");
}

if(!defined('load_Gen4'))
{
set_error("We could not load the agent because a request was not declared properly.");
$err_l = true;
}

if(!$c = mysql_connect(DB_HOST, DB_USER, DB_PASS))
{
set_error("We couldn't establish a connection to your MySQL server.");
$err_l = true;
}
if(!mysql_select_db(DB_NAME, $c))
{
set_error("We couldn't establish a connection to your MySQL database.");
$err_l = true;
}


if(!$error_load)
{
DEFINE('START_PROCESS', true);
}

$do->refresh_sess();
?>
Código:
<?

  session_start ();

  if (!$stop_eval)
  {

	global $c;
	if(is_dir('install/'))
	{
	header("Location: install/");
	}

	

	if(defined('DB_DETAILS') && $c && !$error_log) {

	if(!$_SESSION['setting'])
	{
	$setq = mysql_query("SELECT * FROM settings");
	while($r=mysql_fetch_array($setq))
	{
	$set[$r[set_name]] = $r['set_value'];
	$_SESSION['setting'][$r[set_name]] = $r['set_value'];
	}
	} else {
	$set = $_SESSION['setting'];
	}

	if(!is_array($set))
	{
	 die("An error occured while trying to process the settings, Please re-

	access the site later or consult the administrator.");
	}


	DEFINE('GEN4_PROCESS', true);

	if($set['theme_active'])
	{
	DEFINE('THDIR', 'themes/'.$set['theme_active'].'/');
	DEFINE('HEADER', 'themes/'.$set['theme_active'].'/t.php');
	DEFINE('FOOTER', 'themes/'.$set['theme_active'].'/f.php');
	} else {
	DEFINE('THDIR', 'themes/default/');
	DEFINE('HEADER', 'themes/default/t.php');
	DEFINE('FOOTER', 'themes/default/f.php');
	}

	$signin_username = $_SESSION['account_username'];
	$signin_password = $_SESSION['account_password'];
	$signin_token = $_SESSION['account_token'];

	$admin_username = $_SESSION['admin_username'];
	$admin_password = $_SESSION['admin_password'];
	$admin_token = $_SESSION['admin_token'];


	if($admin_username && $admin_password && $admin_token == 

	session_id())
	{
	$admin_loggedin = 1;
	$aq = mysql_query("SELECT * FROM admins WHERE 

	aUsername='{$admin_username}' AND aPassword='{$admin_password}' 

	LIMIT 1;");
	$ar = mysql_fetch_array($aq);
	}

	if($signin_username && $signin_password && $signin_token == 

	session_id())
	{
	$loggedin = 1;
	if($_SESSION['me'])
	{
	$ir=$_SESSION['me'];
	} else {
	$iqcn = mysql_query("SELECT COUNT(*) AS cnt FROM users WHERE 

	username='{$signin_username}' AND password='{$signin_password}' 

	AND suspended='0' LIMIT 1;");
	$iqcn = mysql_fetch_array($iqcn);
	$iqcn = $iqcn['cnt'];
	if(!$iqcn) { $do->logout(); } else {
	$iq = mysql_query("SELECT * FROM users WHERE 

	username='{$signin_username}' AND password='{$signin_password}' 

	AND suspended='0' LIMIT 1;");
	$ir = mysql_fetch_array($iq);
	$_SESSION['me'] = $ir;
	}
	}
	}

	} else {
	die("The configuration did not recieve appropriate variables to accept 

	your request.");
	}

	if ($set['next_clearup'] < time ())
    {
      $next_clearup = time () + 60 * 60 * 24;
      mysql_query ('' . 'UPDATE settings SET set_value=\'' . $next_clearup . '\' WHERE set_name=\'next_clearup\' LIMIT 1;');
      mysql_query ('UPDATE users SET ads_clicked=\'\' WHERE ads_clicked!=\'\'');
    }
  }

?>
Gracias!!
  #2 (permalink)  
Antiguo 24/04/2015, 05:27
 
Fecha de Ingreso: abril-2015
Ubicación: Argentina
Mensajes: 9
Antigüedad: 8 años, 11 meses
Puntos: 0
Respuesta: Problema con index.php Gen4

Sigo sin saber que puedo hacer...
  #3 (permalink)  
Antiguo 24/04/2015, 07:26
Avatar de hhs
hhs
Colaborador
 
Fecha de Ingreso: junio-2013
Ubicación: México
Mensajes: 2.995
Antigüedad: 10 años, 8 meses
Puntos: 379
Respuesta: Problema con index.php Gen4

Mientras esperas, puedes ir depurando el código para determinar donde falla e ir eliminando posibilidades. Lo que descubras lo puedes ir agregando al hilo original y eso le servirá a la persona que decida ayudarte.
__________________
Saludos
About me
Laraveles
A class should have only one reason to change.
  #4 (permalink)  
Antiguo 24/04/2015, 13:56
 
Fecha de Ingreso: abril-2015
Ubicación: Argentina
Mensajes: 9
Antigüedad: 8 años, 11 meses
Puntos: 0
Respuesta: Problema con index.php Gen4

Cita:
Iniciado por hhs Ver Mensaje
Mientras esperas, puedes ir depurando el código para determinar donde falla e ir eliminando posibilidades. Lo que descubras lo puedes ir agregando al hilo original y eso le servirá a la persona que decida ayudarte.
gracias hhs! justo eso voy a hacer :) perdona mi impertinencia

Última edición por folch; 24/04/2015 a las 14:28
  #5 (permalink)  
Antiguo 24/04/2015, 19:04
 
Fecha de Ingreso: abril-2015
Ubicación: Argentina
Mensajes: 9
Antigüedad: 8 años, 11 meses
Puntos: 0
Respuesta: Problema con index.php Gen4

Esto es el mensaje que me da:


Warning: shell_exec() has been disabled for security reasons in /home/u789501020/public_html/gen4/lib/lib_functions.php on line 11

Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in /home/u789501020/public_html/gen4/lib/lib.php on line 32

Etiquetas: mysql, select, sql, variable
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 11:34.