-
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
LSI 9305-16i SATA SAS 12Gbs RAID Controller PCIe 3.0 x8 IT-Mode 4* 8643 SATA
$229.99
Dell R630 8SFF 2.4Ghz 12-Core 128GB H330 RAID 10GB RJ-45 NIC 2x750W PSU 8x Trays
$430.04
Dell R630 8SFF 2.4Ghz 20-Core 128GB H730 RAID 10GB RJ-45 NIC 2x750W PSU 8x Trays
$455.04
ACASIS 2.5/3.5 inch 2 Bay SATA USB 3.0 Hard Drive Disk HDD SSD Enclosure 4 RAID
$58.99
Inspur LSI 9300-8i Raid Card 12Gbps HBA HDD Controller High Profile IT MODE
$15.98
LSI MegaRAID 9361-8i 12Gb PCIe 8-Port SAS/SATA RAID 1Gb w/BBU/CacheVault/License
$39.95
LSI MegaRAID 9361-8i 12Gbps PCIe 3 x8 SATA SAS 3 8 Port RAID + BBU & CacheVault
$39.00
ORICO Multi Bay RAID Hard Drive Enclosure USB 3.0/ Type-C For 2.5/3.5'' HDD SSDs
$82.49
NEW LSI MEGARAID SAS 9361-8i 12GB/s SAS + SATA RAID CONTROLLER CARD PCIe x8 3.0
$99.00
Yottamaster 4Bay RAID RGB Hard Drive Enclosure Type B Fr 2.5'' 3.5" SATA HDD SSD
$149.99