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
  •  


***NEW*** BCM RX67Q Gaming Motherboard | Intel Q67 2nd/3rd Gen. | LGA1155 | DDR3 picture

***NEW*** BCM RX67Q Gaming Motherboard | Intel Q67 2nd/3rd Gen. | LGA1155 | DDR3

$29.77



ASUS H110M-R Motherboard Intel 6th/7th Gen LGA1151 DDR4 Micro-ATX i/o shield picture

ASUS H110M-R Motherboard Intel 6th/7th Gen LGA1151 DDR4 Micro-ATX i/o shield

$42.00



Micro ATX Desktop Motherboard ASUS H110M-C LGA 1151 picture

Micro ATX Desktop Motherboard ASUS H110M-C LGA 1151

$31.95



MSI A320M-A PRO AM4 AMD A320 USB3.2 Gen1 Micro-ATX Motherboard picture

MSI A320M-A PRO AM4 AMD A320 USB3.2 Gen1 Micro-ATX Motherboard

$46.99



Gigabyte AMD B550 UD AC Gaming Motherboard - AMD B550 Chipset - AM4 Socket - AMD picture

Gigabyte AMD B550 UD AC Gaming Motherboard - AMD B550 Chipset - AM4 Socket - AMD

$89.99



Gigabyte GA-B75M-HD3 Intel LGA1155 DDR3 Desktop Motherboard MicroATX USB 3.0  picture

Gigabyte GA-B75M-HD3 Intel LGA1155 DDR3 Desktop Motherboard MicroATX USB 3.0

$26.99



ASUS Prime Q270M-C LGA1151 DP HDMI VGA SATA 6GB/s USB 3.0 MicroATX Motherboard picture

ASUS Prime Q270M-C LGA1151 DP HDMI VGA SATA 6GB/s USB 3.0 MicroATX Motherboard

$37.99



MSI B450M PRO-VDH MAX AM4 AMD B450 USB3.2 Micro-ATX Motherboard picture

MSI B450M PRO-VDH MAX AM4 AMD B450 USB3.2 Micro-ATX Motherboard

$67.99



BTC-S37 Mining Motherboard Kit /w SSD & Ram Preinstalled picture

BTC-S37 Mining Motherboard Kit /w SSD & Ram Preinstalled

$59.99



MSI ‎B550M PRO-VDH WIFI Socket AM4 AMD Motherboard picture

MSI ‎B550M PRO-VDH WIFI Socket AM4 AMD Motherboard

$80.00