Latest LQ Deal: Linux Power User Bundle
Go Back > Forums > Linux Forums > Linux - General
User Name
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.


  Search this Thread
Old 03-22-2002, 06:18 AM   #1
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
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


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).



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 > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 10:11 PM.

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