Results 1 to 3 of 3

Thread: Knoppix 5.3.1 Apache2 CGI w/ Perl script

  1. #1
    Junior Member
    Join Date
    Mar 2006
    Location
    Saint Paul, MN USA
    Posts
    4

    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

  2. #2
    Member registered user
    Join Date
    Mar 2005
    Posts
    77
    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;

  3. #3
    Junior Member
    Join Date
    Mar 2006
    Location
    Saint Paul, MN USA
    Posts
    4
    Quote Originally Posted by WaKa View Post
    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
  •  


1U Supermicro Server 10 Bay 2x Intel Xeon 3.3Ghz 8C 128GB RAM 480GB SSD 2x 10GBE picture

1U Supermicro Server 10 Bay 2x Intel Xeon 3.3Ghz 8C 128GB RAM 480GB SSD 2x 10GBE

$297.00



HPE ProLiant MicroServer Gen8 Intel Xeon E3-1265L 16GB ECC PCIe x16 4x1TB HDD picture

HPE ProLiant MicroServer Gen8 Intel Xeon E3-1265L 16GB ECC PCIe x16 4x1TB HDD

$249.99



HP ProLiant Xeon E3-1220L V2 MicroServer Gen8 2.30 GHz 16 GB RAM NO DRIVES picture

HP ProLiant Xeon E3-1220L V2 MicroServer Gen8 2.30 GHz 16 GB RAM NO DRIVES

$199.99



SuperMicro Server 505-2 Intel Atom 2.4GHz 8GB RAM SYS-5018A-FTN4 1U Rackmount picture

SuperMicro Server 505-2 Intel Atom 2.4GHz 8GB RAM SYS-5018A-FTN4 1U Rackmount

$202.49



HPE ProLiant MicroServer Gen10 Plus v2 Ultra Micro Tower Server - 1 x Intel Xeon picture

HPE ProLiant MicroServer Gen10 Plus v2 Ultra Micro Tower Server - 1 x Intel Xeon

$846.19



Supermicro 505-2 Mini-1U Server 5018A-FTN4 16GB 2.4ghz Atom + Rack Ears picture

Supermicro 505-2 Mini-1U Server 5018A-FTN4 16GB 2.4ghz Atom + Rack Ears

$199.00



Microsel Server Tower Supermicro X10SAE E3-1275 V3 @3.5GHz 16GB 509849-001 picture

Microsel Server Tower Supermicro X10SAE E3-1275 V3 @3.5GHz 16GB 509849-001

$149.99



Supermicro 5018A-FTN4 Rack Server - Black picture

Supermicro 5018A-FTN4 Rack Server - Black

$125.00



1U Supermicro Server X10DRU-i+ 2x Xeon Total 36 Cores 64GB 4x 10GBE-T 2PS picture

1U Supermicro Server X10DRU-i+ 2x Xeon Total 36 Cores 64GB 4x 10GBE-T 2PS

$299.00



SUPERMICRO CSE-512 AMD Opteron Processor 6128, 32GB DDR3 RAM NO HDD picture

SUPERMICRO CSE-512 AMD Opteron Processor 6128, 32GB DDR3 RAM NO HDD

$90.00