LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 11-06-2003, 08:15 PM   #1
clefler
LQ Newbie
 
Registered: Nov 2003
Posts: 10

Rep: Reputation: 0
running perl scripts une mdk9.l and apache


I am having problems running simple perl scripts on my home system.

I want to write a script that uses a browser to display a string or something.

There is a test.cgi file that is on my system in my cgi-bin directory. When I run it, it says that it worked, and then displays the environment variables. So I know that it is working for that.

The problem is that when I write my own perl file, it says there is a system error(#500). I have only asked it to display a simple hello workd test line. Is there something that I am doing wrong. Here is the code that I used.


#!/usr/bin/perl

print "Content-type: text/html\n\n";

print "Hello, World.\n";


I have checked the path to perl, and it is correct. Also, this file is located in the cgi-bin directory, so it should run.

Can anyone help me with this problem.

Thanks,

Craig.
 
Old 11-06-2003, 08:18 PM   #2
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 270Reputation: 270Reputation: 270
Is the file executable?

chmod +x <filename>
 
Old 11-06-2003, 08:22 PM   #3
clefler
LQ Newbie
 
Registered: Nov 2003
Posts: 10

Original Poster
Rep: Reputation: 0
Thank You trickykid. I can't believe that I didn't do that. Isn't it always the simplest of solutions. Thanks Again.

Craig.
 
Old 11-06-2003, 08:27 PM   #4
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 270Reputation: 270Reputation: 270
Quote:
Originally posted by clefler
Thank You trickykid. I can't believe that I didn't do that. Isn't it always the simplest of solutions. Thanks Again.

Craig.
You know how many times I hit myself in the head for the small things I've overlooked myself..

Glad to know it was that simple for you.
 
Old 11-15-2003, 12:35 PM   #5
perry
Member
 
Registered: Sep 2003
Location: USA & Canada
Distribution: Slackware 12.0
Posts: 978

Rep: Reputation: 30
Quote:
Originally posted by trickykid
Is the file executable?

chmod +x <filename>
what package would fine "perl(strict)" in ?

i type "perl" in rpmdrake and get about 50 entries for perl and nothing specific to what i'm looking for. i need it for the wine rpm

thanks

- perry
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
problems in running cgi/perl scripts... raymond Linux - General 17 02-09-2010 04:06 AM
running perl scripts very system start abdul_zu Programming 16 09-26-2005 01:55 AM
Running perl scripts outside of cgi-bin ylikone Programming 1 09-08-2005 04:34 AM
Running web based perl scripts in userdirs markham82 Linux - Networking 1 12-15-2004 06:51 AM
Running Perl/CGI scripts hso_sof Linux - Newbie 3 08-22-2003 10:26 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 01:42 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration