Results 1 to 2 of 2

Thread: Running Server Side Perl Scripts

  1. #1
    Junior Member registered user
    Join Date
    Apr 2006
    Location
    victoria
    Posts
    14

    Running Server Side Perl Scripts

    I have been able to run PHP Server Side Scripts on Apache using the Knoppix Live CD. But cannot run Server Side Perl Scripts. I cannot save a Perl Script in the cgi-bin directory, it is READ ONLY. I have tried changing the File Permissions from the Root Shell but have had NO Luck.

    Is there a way to run Server Side Perl Scripts from the Live CD ?

  2. #2
    Senior Member registered user
    Join Date
    Aug 2003
    Posts
    126
    Hi,
    Re: perl and bash scripts.
    You need to be root to do this.
    Use whatever text editor you prefer out of those available (gedit, kate, kwrite, emacs and vim).
    Create a file as root with the following.
    Code:

    #!/bin/bash

    printf "Content-type:text/html\r\n\r\n";
    printf "<html>hello world</html>\r\n";


    This bash script should be saved as hello.cgi and saved in the /usr/lib/cgi-bin directory.
    It also needs to be made executable for all users:
    At the root prompt type
    chmod 755 /usr/lib/cgi-bin/hello.cgi
    Then visit the file with a browser e.g. mozilla
    http://127.0.0.1/cgi-bin/hello.cgi

    Once this works you can do the same for perl. This time saving the file as hello.pl
    and using the following code:
    Code:
    #!/usr/bin/perl

    print "Content-type:text/html\n\n";
    print "<html>hello world</html>\n";


    Once you have got these two programs going then you have a wide choice to start open source web programming under Knoppix Debian/Gnu/Linux.
    Regards,
    Mark
    See also
    http://www.knoppix.net/forum/viewtopic.php?t=19300

Similar Threads

  1. Server Side Perl Scripts and Inaccessible cgi-bin Directory
    By brass in forum MS Windows & New to Linux
    Replies: 1
    Last Post: 05-02-2006, 11:47 AM
  2. web server +perl cgi problems
    By Ardil in forum General Support
    Replies: 2
    Last Post: 05-28-2005, 10:37 PM
  3. where is cgi-bin so I can test perl scripts
    By bstanard in forum General Support
    Replies: 5
    Last Post: 01-10-2005, 03:52 PM
  4. Knoppix Apache / SQL / PHP / Perl Web Server?
    By Zoplax in forum Customising & Remastering
    Replies: 2
    Last Post: 10-15-2003, 09:36 PM
  5. Shell scripts running at Knoppix
    By majales in forum General Support
    Replies: 2
    Last Post: 05-15-2003, 04:21 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Vintage Compaq Keyboard KB-9963 PS/2 picture

Vintage Compaq Keyboard KB-9963 PS/2

$6.99



Vintage Dot Matrix Printer Contin Feed Paper 8.5 x 11.  Lots of 5 to 250 sheets. picture

Vintage Dot Matrix Printer Contin Feed Paper 8.5 x 11. Lots of 5 to 250 sheets.

$4.00



Vintage 1/3 height slimline Canon md5501 5.25 1.2mb floppy drive. For Compaq. picture

Vintage 1/3 height slimline Canon md5501 5.25 1.2mb floppy drive. For Compaq.

$29.99



Vintage Mac PCI Ethernet Card picture

Vintage Mac PCI Ethernet Card

$25.00



Vintage Radio Shack TRS-80 Model 100 Portable Computer Not Powering Clean Case picture

Vintage Radio Shack TRS-80 Model 100 Portable Computer Not Powering Clean Case

$44.95



Pioneer Vintage Camouflaged DVR-A05 Internal IDE DVD-R/RW Writer picture

Pioneer Vintage Camouflaged DVR-A05 Internal IDE DVD-R/RW Writer

$15.99



Vintage Motorola MC6800LD, 8 Bit Microprocessor, Gold Top, Purple Ceramic picture

Vintage Motorola MC6800LD, 8 Bit Microprocessor, Gold Top, Purple Ceramic

$10.00



Z80 - NABU PC & Keyboard - Vintage New Old Stock (Retro 80's) picture

Z80 - NABU PC & Keyboard - Vintage New Old Stock (Retro 80's)

$139.99



Vintage PCMCIA Notebook TV PCMCIA Card Video Capture Coaxial Adapter Win95 Win98 picture

Vintage PCMCIA Notebook TV PCMCIA Card Video Capture Coaxial Adapter Win95 Win98

$140.00



Vintage Plextor PlexWriter 40/10/24 PX-W2410TU External CD-RW Burner picture

Vintage Plextor PlexWriter 40/10/24 PX-W2410TU External CD-RW Burner

$65.00