En 29 de junio de 2020 3:56:59 p. m. dperez1...@gmail.com escribió:

Hola amigos, instalé el sqstat con squid y al intentar abrirlo en el navegador me muestra esto:

errno=4; $squidclass->errstr="Error in the configuration file.". 'Please, specify $squidhost['.$config.']/$squidport['.$config.']'; $squidclass->showError(); exit(4); } for($i=0;$ierrno=4; $squidclass->errstr="Error in the configuration file. ". '"group_by" can be only "username" or "host"'; $squidclass->showError(); exit(4); } } else{ $squidclass->errno=4; $squidclass->errstr="Configuration file not found.". "Please copy file config.inc.php.defauts to config.inc.php and edit configuration settings."; $squidclass->showError(); exit(4); } // loading hosts file $hosts_array=array(); if(isset($hosts_file)){ if(is_file($hosts_file)){ $handle = @fopen($hosts_file, "r"); if ($handle) { while (!feof($handle)) { $buffer = fgets($handle, 4096); unset($matches); if(preg_match('/^([0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3})[ \t]+(.+)$/i',$buffer,$matches)){ $hosts_array[$matches[1]]=$matches[2]; } } fclose($handle); } else { $squidclass->errno=4; $squidclass->errstr="Hosts file not found.". "Cant read '$hosts_file'."; $squidclass->showError(); exit(4); } } else { $squidclass->errno=4; $squidclass->errstr="Hosts file not found.". "Cant read '$hosts_file'."; $squidclass->showError(); exit(4); } } if(!$squidclass->connect($squidhost,$squidport)) { $squidclass->showError(); exit(1); } $data=$squidclass->makeQuery($cachemgr_passwd); if($data==false){ $squidclass->showError(); exit(2); } // print_r($data); if(!isset($use_js)) $use_js=true; echo $squidclass->makeHtmlReport($data,$resolveip,$hosts_array,$use_js); ?>

Esta es mi fichero config.inc.php:

<?php
/* global settings */

$use_js=true; // use javascript for the HTML toolkits

// Maximum URL length to display in URI table column
DEFINE("SQSTAT_SHOWLEN",60);

/* proxy settings */

/* Squid proxy server ip address or host name */
$squidhost[0]="10.2.2.7";
/* Squid proxy server port */
$squidport[0]=3128;
/* cachemgr_passwd in squid.conf. Leave blank to disable authorisation */
$cachemgr_passwd[0]="admin";
/* Resolve user IP addresses or print them as numbers only [true|false] */
$resolveip[0]=true;
/* uncomment next line if you want to use hosts-like file.
   See hosts.txt.dist. */
// $hosts_file[0]="hosts.txt"
/* Group users by hostname - "host" or by User - "username". Username work only
   with squid 2.6+ */
$group_by[0]="host";
$hosts_file[0]="/var/www/html/sqstat/hosts.txt"
/* you can specify more than one proxy in the configuration file, e.g.: */
// $squidhost[1]="192.168.0.2";
// $squidport[1]=3129;
// $cachemgr_passwd[1]="secret";
// $resolveip[1]=true;
// $hosts_file[1]="otherhosts.txt"

Quisiera saber que estoy haciendo mal, gracias de antemano
_______________________________________________
Gutl-l mailing list -- gutl-l@listas.jovenclub.cu
To unsubscribe send an email to gutl-l-le...@listas.jovenclub.cu

Necesitas soporte de php en tu servidor web para poder ejecutar el mismo. Y configurar tu Nginx/Apache2 para correr dichos script.

Salu2.



_______________________________________________
Gutl-l mailing list -- gutl-l@listas.jovenclub.cu
To unsubscribe send an email to gutl-l-le...@listas.jovenclub.cu

Responder a