LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 03-22-2002, 06:18 AM   #1
JSP
LQ Newbie
 
Registered: Dec 2001
Posts: 8

Rep: Reputation: 0
Unhappy Problem with perl and cgi files


I have an apache web server running in a linux platform. I put a perl and cgi file in the /usr/local/apache/htdocs so that users can access these two files andexecute it. The problem is when the user access to the perl file, a message prompts up asking user to store the file in which folder in their PC. What could be the possible problem? Why this is happening? Users suppose to execute the file. For the CGI file, the same thing happens but user can see the content of the file instead of running it or executing it.
I need help on this. Anyone.......
 
Old 03-22-2002, 08:01 AM   #2
Bert
Senior Member
 
Registered: Jul 2001
Location: 406292E 290755N
Distribution: GNU/Linux Slackware 8.1, Redhat 8.0, LFS 4.0
Posts: 1,004

Rep: Reputation: 46
You should have a directory generated by the apache server program called cgi-bin. Put your CGI stuff in there.

The folder is usually /var/www/cgi-bin/

Access the stuff in your browser (probably) with

http://localhost/cgi-bin/slippydoo.cgi

Where slippydoo is the name of your perl file.

Also make sure the shebang !#/usr/bin/perl actually is where your perl executable resides. (The above is no good if perl is in /usr/include/perl !!)

Make sure that the environment varibales such as the document root in the perl file are defined (if there are any such variables, if there aren't, that's ok).

Bert
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
HELP:perl CGI problem supermyself Programming 2 06-12-2005 08:34 AM
CGI -PERL Problem!!! lewkh Fedora 3 05-10-2005 12:19 AM
CGI/Perl problem with SuExec kalbaz Linux - General 2 10-18-2003 06:25 PM
Apache2 CGI-Perl will not read files fefeh Linux - Software 0 06-30-2003 08:07 PM
CGI perl links to files in Dir ocularbob Programming 3 04-29-2003 08:40 AM


All times are GMT -5. The time now is 10:45 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration