If you have a problem please post the actual error messages, they really help!
What am I doing wrong?
1) Hand parsing your form data. use CGI or die; You could replace all your initial code with:
use CGI; use CGI::Carp 'fatalsToBrowser'; # this will make debugging easier my $q = new CGI; my $userIP = $q->remote_host; # get REMOTE_HOST my %rawData = $q->Vars(); # get CGI data as a hash
2) When you do your dbmopen you should have something like this (a)full path to file and (b) possibly the 0666 option. Note at the CL you script will run with your permissions so 0600 on the allIPs db file should be OK. Under CGI it will run as user 'nobody' so you need R/W for everybody so chmod 666 allIPs (606 should also do)
my %allIPs; dbmopen( %allIPs, "/full/path/to/database/allIPs", 0666 ) or die "Cannot open allIPs database: $!"; $allIPs{$userIP} = $dbEntry or die "$!"; dbmclose %allIPs;
3) Not reporting or perhaps even looking for error messages. With a CGI you often need to look in the server logs or write a die_nice() function. CGI Help Guide
cheers
tachyon
s&&rsenoyhcatreve&&&s&n.+t&"$'$`$\"$\&"&ee&&y&srve&&d&&print
In reply to Re: dbm troubles
by tachyon
in thread dbm troubles
by Guildencrantz
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |