-
Knoppix 5.3.1 Apache2 CGI w/ Perl script
As per documentation, my HTML form is located in /var/www/ (which is in the KNOPPIX branch of the live DVD's file hierarchy) while my .cgi is located in /usr/lib/cgi-bin (which is in the KNOPPIX2 branch of the live DVD's file hierarchy).
The HTML form is served quite nicely by apache2 but I must not be pointing to the correct location for the .cgi as there is no response upon submission of the form . . . ?
I've tried both form action="../usr/lib/cgi-bin/[html form]" and "/cgi-bin/[html form]" (the latter relying upon the default Alias) . . . .
Any suggestions (other than that Perl scripts do not work with CGI in Knoppix 5.3.1) would be appreciated.
AD<thanx>VANCE
-
Check out
locate DBI
...
/usr/lib/perl5/DBI
...
And see if this helps
#!/usr/bin/perl -w
print "Content-type:text/html\n\n";
use CGI qw(:standard);
#use Fcntl qw(:flock);
# for DB
use DBI;
# connecting to the mysql server running on the web server.
# you need to specify your own server.
my $sqlhost = "localhost";
my $database = "test";
my $user = "root";
my $password = "your_password";
print "connecting to $sqlhost...";
my $dbh = DBI->connect("DBI:mysql:$database:$sqlhost", $user, $password) or die "Can't connect to MySql server at $sqlhost\n";
print "succeeded.\n";
$dbh->disconnect;
-

Originally Posted by
WaKa
Check out
locate DBI
...
/usr/lib/perl5/DBI
...
Greetings Waka!
I tried locate cgi and it is as I feared - no CGI.pm is found in the Perl lib directory in the Knoppix 5.3.1 DVD distribution
"/usr/lib/perl5/cgi_to_mod_perl.pod" is it as far as "cgi" is concerned . . .
I will keep your reference to DBI handy though as that is my next step in getting the project to run . . . .
Thanks
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules

TP-Link TL-SG105 5-Port Gigabit Ethernet Unmanaged Metal Desktop Network Switch
$19.99

NETGEAR GS308EP Essential Series 8-Port Gigabit PoE+ Unmanaged Switch
$39.99

TP-Link TL-SX105 10GB 5-Port Switch - Unopened
$195.00

NETGEAR 5-Port Gigabit Ethernet Unmanaged Switch (Gs305) - Desktop Quiet Fanless
$25.99

TP-Link TL-SG105, 5 Port Gigabit Unmanaged Ethernet Switch, Network Hub, Ethern
$15.25

10-Port Gigabit PoE Network Switch with 8 PoE+ Ports with 2 Combo SFP Slots 125W
$39.99

TP-Link Omada SG3428 24-Port Gigabit L2+ Managed Switch 4x SFP w/ Ears
$99.99

5 Port Gigabit Unmanaged Ethernet Switch, Home Network Hub, Office Ethernet S...
$14.86

Cisco Catalyst 2960-48TT-L 48-Port Fast Ethernet Managed Rackmount Switch
$46.99

Extreme Networks 10GE X440-G2-24P-10GE4 16533 24Plus-Ports POE+ Switch UP
$127.00