This is my first crack at mysql. I am already connecting easily to parallel mysql databases on Windows98 and on my ISP's server. I have linked to both from Access97 via ODBC and I can connect to both from command lines. I have also installed perl DBI and DBD::mysql at home. The ISP did not yet have these modules installed so the system administrator did so on their server under Perl5.6.1. I have been developing a web interface to the database which works at home through my IE browser and testing from the command line. These perl scripts are set up on my ISP's server where they perform perfectly in telnet session, but when I try to connect through the browser the perl script hangs up as soon as it reaches the call to connect. What's missing? Thanks to anyone who can help.
Here is the test script: #!/usr/local/bin/perl5.6.1 use DBI; print "Content-type: text/html\n\n"; foreach $key (keys(%ENV)) { print "\$ENV{$key} = \"$ENV{$key}\"<br>\n"; } #this environment list comes out fine on the browser my $database = 'reformedme'; my ($sql)= "SELECT * FROM Weekends"; my $hostname = 'alpha.vaxxine.com'; my $port = '3210'; my $user = 'root'; my $password = '*****'; my $dbh = DBI->connect("DBI:mysql:$database:$hostname:$port", $user, $password); my $sth = $dbh->prepare($sql) || die "Cannot prepare statement: $DBI::errstr\n"; my $rv = $sth->execute; my $table = $sth->fetchall_arrayref || die "$sth->errstr\n"; my($i, $j); for $i ( 0 .. $#{$table} ) { for $j ( 0 .. $#{$table->[$i]} ) { print "$table->[$i][$j]<br>\n"; } } my $rc = $dbh->disconnect; #the table gets printed fine from a telnet session #the script never gets this far on a browser print "<br><br>"; foreach $key (keys(%ENV)) { print "\$ENV{$key} = \"$ENV{$key}\"<br>\n"; } exit; --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php