-
Junior Member
registered user
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 ?
-
Senior Member
registered user
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
-
By brass in forum MS Windows & New to Linux
Replies: 1
Last Post: 05-02-2006, 11:47 AM
-
By Ardil in forum General Support
Replies: 2
Last Post: 05-28-2005, 10:37 PM
-
By bstanard in forum General Support
Replies: 5
Last Post: 01-10-2005, 03:52 PM
-
By Zoplax in forum Customising & Remastering
Replies: 2
Last Post: 10-15-2003, 09:36 PM
-
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
-
Forum Rules

GIGABYTE A520M DS3H AC AMD AM4 Motherboard mATX
$59.99

GIGABYTE Z790 AORUS ELITE AX LGA 1700 Intel Z790 ATX Motherboard with DDR5
$189.99

Intel H310 LGA1151 8-9th Gen DDR4 M.2 NVMe mATX Motherboard IO Shield Battery
$54.99

ASUS PRIME Z490-V Motherboard Intel Z490 10th gen DDR4 LGA 1200 ATX w/ IO Shield
$84.99

GIGABYTE B365 HD3 LGA1151 Intel 9th Gen motherboard
$59.99

MSI B550M PRO-VDH Micro-ATX Motherboard - AMD AM4, Ryzen 5000/4000/3000 Ready, P
$71.49

ASUS PRIME B360M-C MicroATX Intel LGA1151 DDR4 HDMI VGA USB RJ-45 Audio
$34.99

MSI - B550M PRO-VDH WIFI (Socket AM4) AMD B550 MATX DDR4 Wi-Fi 6 Motherboard ...
$89.99

Gigabyte GA-B85M-D3H Motherboard
$54.99

ASRock IMB-X1314 LGA 1700 Intel W680 DDR4 Quad display Micro-ATX Motherboard
$351.99