Valeu vou dar uma olhada no link e realizar alguns testes. Qualquer coisa
entro em contato novamente.
Em 01/08/07, Jorge Augusto Senger [EMAIL PROTECTED] escreveu:
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Tiago,
Você está usando o pragma strict [1] no seu CGI, com ele é obrigatória a
declaração de todas as variáveis do seus programa:
[...]
my $login = $cgi-param(login);
[...]
[1] http://perldoc.perl.org/strict.html
Jorge A. Senger
Tiago Dias escreveu:
All,
Criei um script para autenticação em Perl (bem simples) que
esta funcionando normal, mas quando tentei mesclar este script com o do
AWStats para ter um acesso as estátisticas da página somente com
autenticação ocorreram os seguintes erros descritos abaixo que acredito
estarem relacionadas ao cabeçalho do script em Perl.
O que esta em azul é o cabeçalho do meu script e o que esta em
vermelho é o cabeçalho do AWStats, se alguém puder me ajudar?
Erros apresentados no Apache2:
[Wed Aug 01 13:12:58 2007] [error] [client 192.168.0.99
http://192.168.0.99] (F) You've said use strict vars, which
indicates that all variables
[Wed Aug 01 13:12:58 2007] [error] [client 192.168.0.99
http://192.168.0.99] must either be lexically scoped (using my),
declared beforehand using
[Wed Aug 01 13:12:58 2007] [error] [client 192.168.0.99
http://192.168.0.99] our, or explicitly qualified to say which
package the global variable
[Wed Aug 01 13:12:58 2007] [error] [client 192.168.0.99
http://192.168.0.99] is in (using ::).
[Wed Aug 01 13:12:58 2007] [error] [client 192.168.0.99
http://192.168.0.99]
[Wed Aug 01 13:12:58 2007] [error] [client 192.168.0.99
http://192.168.0.99] Uncaught exception from user code:
[Wed Aug 01 13:12:58 2007] [error] [client 192.168.0.99
http://192.168.0.99] \tGlobal symbol $cgi requires explicit package
name at /usr/lib/cgi-bin/awstats.pl line 20.
[Wed Aug 01 13:12:58 2007] [error] [client 192.168.0.99
http://192.168.0.99] Global symbol $login requires explicit package
name at /usr/lib/cgi-bin/awstats.pl line 22.
[Wed Aug 01 13:12:58 2007] [error] [client 192.168.0.99
http://192.168.0.99] Global symbol $cgi requires explicit package
name at /usr/lib/cgi-bin/awstats.pl line 22.
[Wed Aug 01 13:12:58 2007] [error] [client 192.168.0.99
http://192.168.0.99] Global symbol $senha requires explicit package
name at /usr/lib/cgi-bin/awstats.pl line 23.
[Wed Aug 01 13:12:58 2007] [error] [client 192.168.0.99
http://192.168.0.99] Global symbol $cgi requires explicit package
name at /usr/lib/cgi-bin/awstats.pl line 23.
[Wed Aug 01 13:12:58 2007] [error] [client 192.168.0.99
http://192.168.0.99] Global symbol $_auth requires explicit package
name at /usr/lib/cgi-bin/awstats.pl line 24.
[Wed Aug 01 13:12:58 2007] [error] [client 192.168.0.99
http://192.168.0.99] Global symbol $cgi requires explicit package
name at /usr/lib/cgi-bin/awstats.pl line 24.
[Wed Aug 01 13:12:58 2007] [error] [client 192.168.0.99
http://192.168.0.99] Global symbol $_auth requires explicit package
name at /usr/lib/cgi-bin/awstats.pl line 60.
[Wed Aug 01 13:12:58 2007] [error] [client 192.168.0.99
http://192.168.0.99] Global symbol $login requires explicit package
name at /usr/lib/cgi-bin/awstats.pl line 61.
[Wed Aug 01 13:12:58 2007] [error] [client 192.168.0.99
http://192.168.0.99] Global symbol $senha requires explicit package
name at /usr/lib/cgi-bin/awstats.pl line 61.
[Wed Aug 01 13:12:58 2007] [error] [client 192.168.0.99
http://192.168.0.99] Global symbol $login requires explicit package
name at /usr/lib/cgi-bin/awstats.pl line 65.
[Wed Aug 01 13:12:58 2007] [error] [client 192.168.0.99
http://192.168.0.99] Global symbol $senha requires explicit package
name at /usr/lib/cgi-bin/awstats.pl line 65.
[Wed Aug 01 13:12:58 2007] [error] [client 192.168.0.99
http://192.168.0.99] Global symbol $login requires explicit package
name at /usr/lib/cgi-bin/awstats.pl line 69.
[Wed Aug 01 13:12:58 2007] [error] [client 192.168.0.99
http://192.168.0.99] BEGIN not safe after errors--compilation aborted
at /usr/lib/cgi-bin/awstats.pl line 75.
[Wed Aug 01 13:12:58 2007] [error] [client 192.168.0.99
http://192.168.0.99] Premature end of script headers: awstats.pl
#!/usr/bin/perl
use CGI;
$cgi = new CGI;
$login = $cgi-param(login);
$senha = $cgi-param(senha);
$_auth = $cgi-param(_auth);
require 5.005;
use strict;no strict refs;
use Time::Local;# use Time::Local 'timelocal_nocheck' is faster
but not supported by all Time::Local modules
use Socket;
use vars qw/ $REVISION $VERSION /;
$REVISION='$Revision: 1.814 $'; $REVISION =~ /\s(.*)\s/; $REVISION=$1;
$VERSION=6.4 (build $REVISION);
...
--
Tiago Dias da Silva
Administrador de Sistemas GNU/Linux
HomePage: www.dias.eti.br http://www.dias.eti.br
Email: [EMAIL PROTECTED] mailto:[EMAIL PROTECTED]
A