Migrate site to local (XAMPP) - ERROR require_once (): Failed opening required

0

Apparently it can not reach the indicated route, I migrated my production site to XAMPP to work locally.

the error is:

  

Fatal error: require_once(): Failed opening required 'C:/xampp/htdocs/libreria/php/adodb5/adodb.inc.php' (include_path='C:\xampp\php\PEAR') in C:\xampp\htdocs\control_documental\clase\sistema\conexionLn.php on line 24

the connection codeLn.php is:

if($_SERVER['HTTP_HOST'] == '127.0.0.1')
{
    $direccion_acceso_libreria_conexion = Archivo::extraerDireccionServer().'control_documental/';
}
else
{
    $direccion_acceso_libreria_conexion = Archivo::extraerDireccionServer();
}
  

require_once ($ log_admin_access_address.'library / php / adodb5 / adodb.inc.php ');

and from where I get the address:

public static function extraerDireccionServer()
{
    $direccion=str_replace('//', '/', ($_SERVER['DOCUMENT_ROOT']."/"));
    return $direccion;
}

public static function extraerDireccionWeb()
{
    $direccion = $_SERVER['HTTP_HOST'];
    return $direccion;
}
    
asked by Francisco Acevedo 21.11.2017 в 14:57
source

1 answer

1

It seems that in the connection classLn.php the parameter $ _SERVER ['HTTP_HOST'] to get the localhost is different and you must change the condition inside the if so that it works correctly.

if($_SERVER['HTTP_HOST'] == 'localhost:8080')
{
    $direccion_acceso_libreria_conexion = Archivo::extraerDireccionServer().'control_documental/';
}

there, the '127.0.0.1' was changed to 'localhost: 8080'

    
answered by 21.11.2017 / 21:18
source