-
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

Dell ST6000NM0034 1HT27Z-150 NWCCG 6TB SAS 3.5 7.2K ENTERPRISE SERVER DRIVE
$68.99

Western Digital HUS726T4TAL5204 4TB 7.2K SAS 12Gb/s 3.5" 512e HDD NetApp X375A
$64.00

HDD 3.5" SATA Hard Drive with Windows 10/Win 11 64x Installed Legacy
$35.00

New Western Digital WD40EFPX 68C6CN0 4TB 3.5" SATA III Internal NAS Red Plus HDD
$137.59

HGST HUA723030ALA640 3TB SATA 7200 RPM 3.5 in Enterprise HDD | 0F14044 (100%)
$45.00

Seagate ST6000NM0115 6TB 256MB 7200RPM 3.5" SATA 6.0Gb/s Enterprise Hard Drive
$159.99

HGST HUS724040ALA640 4TB 7200 RPM SATA 3.5" Internal Desktop Drive 100% Health
$78.00

Hitachi / HGST Travelstar HTS541010B7E610 1TB 2.5" SATA III HDD
$29.99

6TB Seagate Enterprise Capacity 3.5 HDD v4 ST6000NM0024
$70.00

Toshiba 1TB 2.5" SATA HDD MQ01ABD100V 5400RPM 9.5mm Laptop Internal Hard Drive
$53.99