-
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

GIGABYTE A520M DS3H AC AMD AM4 Motherboard mATX
$59.99

MSI B560M Pro-E LGA 1200 Intel B560 M-ATX Intel Motherboard Intel 10th 11th gen
$69.99

Gigabyte B365M AORUS ELITE Motherboard Intel B365 Micro ATX LGA 1151 DDR4 DIMM
$84.99

GIGABYTE H610M S2H V2 Motherboard, Supports 14th/13th/12th Gen Intel Core i5 i7
$69.59

GIGABYTE B365 HD3 LGA1151 Intel 9th Gen motherboard
$59.99

ASUS H110I-PLUS Motherboard LGA1151 w/ I5-7400 CPU, 8GB, Heatsink & I/O Shield
$60.00

ASRock B550M Phantom Gaming 4 AM4 AMD B550 SATA 6Gb/s Micro ATX AMD Motherboard
$81.99

Intel H81 Motherboard M.2 NVMe LGA 1150 mATX w/ IO Shield (Random Slot Color)
$29.99

Asrock Z390 Phantom Gaming 4-CB Wifi 8th/9th Geb 1151 Motherboard
$84.99

GIGABYTE Z390 GAMING X Motherboard Intel 9th Gen DDR4 LGA 1151 ATX w/ IO Shield
$94.99