Results 1 to 1 of 1
Hello, i am completely new to perl.
i have setup mod_perl on apache, and i have a problem:
i have to files:
test1.pl is:
Code:
#!/usr/bin/perl
print "Content-type: text/plain\n\n";
print ...
- 06-30-2007 #1Just Joined!
- Join Date
- Mar 2007
- Posts
- 15
apach 2 + mod_perl
Hello, i am completely new to perl.
i have setup mod_perl on apache, and i have a problem:
i have to files:
test1.pl is:
and is here: http://streamkid.de/~alex/test1.plCode:#!/usr/bin/perl print "Content-type: text/plain\n\n"; print "hello world from perl\n";
test2.pl is:
and is here: http://streamkid.de/~alex/test2.plCode:#!/usr/bin/perl print "Content-type: text/plain\n\n"; use Net::MySQL; print "hello world from perl\n"; print "now connection to mysql database:\n"; my $mysql = Net::MySQL->new( hostname => 'host', database => 'database', user => 'user', password => 'password' ); $mysql->query(q{SELECT content FROM welcome WHERE id="1"}); my $record_set = $mysql->create_record_iterator; while (my $record = $record_set->each) { printf "einai: %s\n\n", $record->[0]; } $mysql->close; print "succesfully executed";
the problem:
the first one executes and displayes the message on my firefox,
whereas the seconds wants to get downloaded.
what am i missing?


Reply With Quote
