Hi
It would be ideal if you had updated your post with the /gestioip/install/index.cgi source code, though it is easy to find on the Gestioip page.
Assuming (based on what you say in Re^4: Premature end of script headers line 27 in your source file) is reffering to the code below we can access from their site ,Its likely there is a config issue which is causing the script to die before it can return the Content-Type Header Tag.
I feel you must now also look in the logfile called setup.log mentioned in the Gestioip install_guide pdf, for any clues about errors/issues in config or during setup.
Also im not sure which apache log u are referring to is it the error log or access log ?
eg: tail -n 5 /var/log/apache~~/error.log
#!/usr/bin/perl -T -w
use strict;
#comments till line 27
my $lang;
if ( $ENV{'QUERY_STRING'} ) {
$ENV{'QUERY_STRING'} =~ /.*lang=(\w{2}).*/;
$lang=$1;
my $fut_time=gmtime(time()+365*24*3600)." GMT";
my $cookie = "GestioIPLang=$lang; path=/; expires=$fut_time; 0
+";
print "Set-Cookie: " . $cookie . "\n";
} elsif ( $ENV{'HTTP_COOKIE'} ) {
$ENV{'HTTP_COOKIE'} =~ /.*GestioIPLang=(\w{2}).*/;
$lang=$1;
}
if ( ! $lang ) {
$lang=$ENV{HTTP_ACCEPT_LANGUAGE};
$lang =~ /(^\w{2}).*/;
$lang = $1;
}
my $config;
if ( $lang eq "es" ) {
$config="./vars_es";
} elsif ( $lang eq "en" ) {
$config="./vars_en";
} elsif ( $lang eq "de" ) {
$config="./vars_de";
} else {
$config="./vars_es";
}
open(CONFIG,"<$config") or die "can't open $config: $!";
my %preferences;
while (<CONFIG>) {
chomp;
s/#.*//;
s/^\s+//;
s/\s+$//;
next unless length;
my ($var, $value) = split(/\s*=\s*/, $_, 2);
$preferences{$var} = $value;
}
close CONFIG;
print <<EOF;
Content-type: text/html\n
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<HTML>
<head><title>$preferences{title}</title>
The Great Programmer is one who inspires others to code, not just one who writes great code
|