Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game. |
Notices |
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.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
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.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
09-20-2004, 01:05 AM
|
#1
|
Member
Registered: Jul 2004
Location: Delhi
Distribution: FC3, RH 9.0
Posts: 39
Rep:
|
CGI not working in Apache
Hi to all,
I am trying to Install LXR (Linux Cross Refrencing tool). I was easy, untill the time I got stuck at run it.
As per the requirements of LXR, I can open the default page [blurb.html] from the web browser on my system. But there is a CGI script [that is what the documentation says] that is supposed to be executed by Apache as CGI script. It infact reads that script as a file and prints it on screen.
I tried excuting it by ./<the script> and it gave a HTML file as output, so that means the script is fine. I could have used this file, but there are many more scripts that have to be executed as CGI.
THese are the things that I tried:
1. kept the code in cgi-script folder of the www, NOT wroking
2. I changed the httpd.conf file to allow execution of CGI scripts in directories besides CGI using the Apache TOMCAT manual: NOT WORKING YET
3. I added a file .htaccess in the directory having the LXR code for access permissions, as per what the LXR documentation says: Still NOT WORKING.
4. NO MORE I AM EXHAUTSED...
ANy body who has done any related kind of work, please do help me.
Thanks a lot,
Shrey
|
|
|
09-20-2004, 05:11 PM
|
#2
|
Senior Member
Registered: Oct 2003
Location: Zurich, Switzerland
Distribution: Debian/unstable
Posts: 1,357
Rep:
|
The directory must contain ExecCGI option and apache must recognise the file as cgi-script.
See apache cgi tutorial for details.
|
|
|
09-20-2004, 05:14 PM
|
#3
|
Senior Member
Registered: Oct 2003
Location: Zurich, Switzerland
Distribution: Debian/unstable
Posts: 1,357
Rep:
|
A test script:
Code:
#!/usr/bin/perl
use strict;
print "Content-type: text/html\n\n";
print "Hello, world!...";
If you drop this to some location and access that with web browser, you should get a string
"Hello, world!.." in your browser if you have configured your cgi hooks correctly.
|
|
|
09-21-2004, 12:11 AM
|
#4
|
Member
Registered: Jul 2004
Location: Delhi
Distribution: FC3, RH 9.0
Posts: 39
Original Poster
Rep:
|
Thanks ToniT,
I will try that out, and if successful will mail back here.
|
|
|
09-22-2004, 12:28 AM
|
#5
|
Member
Registered: Jul 2004
Location: Delhi
Distribution: FC3, RH 9.0
Posts: 39
Original Poster
Rep:
|
Hi ToniT,
Thanks a lot, I ws able to make the server execute the files as CGI, I has missed out a point specified in the Apache DOC previously.
Thanks a ton.
|
|
|
All times are GMT -5. The time now is 10:28 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|