ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
I'm attempting to install a simple PERL script. I've tried it on two servers, with the same results on both. If I run the script from the commant line it works fine. When accessing it from a browser all I get output is the text of the file.
Permissions are set correctly on the file (755) and directory (777) it resides in. It's running in the HTML directory of my site (as recommended by the script's author) rather than the cgi-bin, but my server is set up to allow that and I have another script in the same place that works.
Path to perl is correct in the script. print "Content-type: image/gif\n"; is in the script. The file extension is .cgi and that works elsewhere. Syntax checks OK.
Server is running RH Linux/Apache
I'm missing something obvious, I'm sure. I've been searching around the web for an answer, but haven't managed to figure out search terms to use that could lead me to an answer (I get hundreds of pages about other errors).
I'd really appreciate any thoughts you might have.
i see that you have a line saying "Content-type: image/gif\n"
if that's the last header line printed by your script prior to printing the gif then it should have another "\n". i e. "Content-type: image/gif\n\n"
Look at your Apache error log file. And yes, you'll need to make sure that ExecCGI is on, or that the file lives in a directory (i.e. /cgi-bin) where CGIs are allowed to be executed. Your issue isn't OS-side permissions, it's Apache configuration permissions.