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
  •  


HP DL580 G9 4U Server 4x Xeon E7-8890 v3 2.5Ghz 72-Cores | 512GB RAM | 4x 1TB picture

HP DL580 G9 4U Server 4x Xeon E7-8890 v3 2.5Ghz 72-Cores | 512GB RAM | 4x 1TB

$2619.99



Dell EMC PowerEdge R440 Xeon silver 4215 2.5GHz 16 GB ram  2x 550W PSU No HDD picture

Dell EMC PowerEdge R440 Xeon silver 4215 2.5GHz 16 GB ram 2x 550W PSU No HDD

$275.00



Dell Poweredge R720 8SFF 2.5

Dell Poweredge R720 8SFF 2.5" 2x Xeon E5-2680 v2 2.8GHz 20-Cores 64gb 4x Trays

$259.99



Microsoft Windows Server 2022 Standard 64-bit License & DVD 16 Core US Shipping picture

Microsoft Windows Server 2022 Standard 64-bit License & DVD 16 Core US Shipping

$34.99



Dell PowerEdge R620 2x Xeon E5-2630 v2 3.1GHz 2.5

Dell PowerEdge R620 2x Xeon E5-2630 v2 3.1GHz 2.5" 4-BAY 32GB RAM No OS 2x 495w

$174.95



Supermicro 1027GR-TSF 1U Rackmount Server 2x Xeon 2.3GHz 128GB DDR3 picture

Supermicro 1027GR-TSF 1U Rackmount Server 2x Xeon 2.3GHz 128GB DDR3

$219.99



Supermicro 2U GPU Server SYS-2029GP-TR 2x Xeon 6130 32C 6x PCIe 3.0 x16 Slots picture

Supermicro 2U GPU Server SYS-2029GP-TR 2x Xeon 6130 32C 6x PCIe 3.0 x16 Slots

$745.00



Dell Poweredge R630 2x Xeon E5-2680 v3 2.5ghz 24-Cores / 64gb / Raid / 2x 1Tb picture

Dell Poweredge R630 2x Xeon E5-2680 v3 2.5ghz 24-Cores / 64gb / Raid / 2x 1Tb

$374.99



Broadcom 9600-24i Tri-Mode RAID Controller 4.0 NVMe SAS SATA NEW 05-50111-01003 picture

Broadcom 9600-24i Tri-Mode RAID Controller 4.0 NVMe SAS SATA NEW 05-50111-01003

$639.69



WINDOWS SERVER 2025 [REMOTE DESKTOP SERVICES] 50 USER  RDS CAL SEALED picture

WINDOWS SERVER 2025 [REMOTE DESKTOP SERVICES] 50 USER RDS CAL SEALED

$119.18