LinuxQuestions.org
Review your favorite Linux distribution.
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 10-24-2003, 01:56 AM   #1
Kronos3
LQ Newbie
 
Registered: Oct 2003
Posts: 8

Rep: Reputation: 0
Apache 2.o + CGIs


Ok, I can't figure out how to make CGIs work

Here is the config

<Location /cgi-bin>
PerlHandler Apache::Registry
SetHandler perl-script
PerlSendHeader On
Options +ExecCGI
</Location>

Which is what the test.cgi says to add to the httpd2.conf file

Now, the test.cgi works, and the first.pl that Apache.org tells you to make to test CGI works:

first.pl:

#!/usr/bin/perl
print "Content-type: text/html\n\n";
print "Hello, World.";

But if I try and load any other

[Fri Oct 24 01:58:41 2003] [error] [client 63.138.160.177] Usage: Apache::RequestRec::notes(obj, val=NULL) at /usr/lib/perl5/vendor_per
l/5.8.0/i386-linux-thread-multi/Apache/Registry.pm line 30.

or

[Fri Oct 24 00:15:07 2003] [error] Missing right curly or square bracket at /path/to/my/cgi/folder/cgi-bin/form/a
f.cgi line 304, at end of line
syntax error at /path/to/my/cgi/folder/cgi-bin/form/a
f.cgi line 304, at EOF

Has anyone had this problem, if so how did you fix it, and if now, HOW DO YOU HAVE APACHE CONFIGURED!!!!!! I need an asnwer asap... I just redid my server and and I need this running NOW.

No pressure =)
 
Old 10-24-2003, 01:58 AM   #2
Kronos3
LQ Newbie
 
Registered: Oct 2003
Posts: 8

Original Poster
Rep: Reputation: 0
Oh, and before anyone askes, yes the files were uploaded in ASCII formate, yes the files are correct (perl -c filename returned no syntax errors)

Yes the permissions are correct, I have also tried multiple combos of 777, 755, 555, 775, etc

Its a config problem, trust me.
 
Old 10-24-2003, 07:23 AM   #3
verbal
Member
 
Registered: Jul 2002
Location: New York
Distribution: Red Hat 7.2, SuSE 7.3
Posts: 60

Rep: Reputation: 15
hey there...

if you compiled in mod_cgi (on by default), then you "usually" don't need to do any configuration to get cgi's to work in the server cgi-bin.


this sounds like you have it working properly....
Quote:
Now, the test.cgi works, and the first.pl that Apache.org tells you to make to test CGI works:

first.pl:

#!/usr/bin/perl
print "Content-type: text/html\n\n";
print "Hello, World.";

But if I try and load any other

this looks like an error in your code, not the configuration...
Quote:
[Fri Oct 24 00:15:07 2003] [error] Missing right curly or square bracket at /path/to/my/cgi/folder/cgi-bin/form/a
f.cgi line 304, at end of line
syntax error at /path/to/my/cgi/folder/cgi-bin/form/a
f.cgi line 304, at EOF


what distro are you running (linux)?
try posting your code, I am not much with perl, never had much use for the language, butsomeone might be able to help you debug it.

Verbal
 
Old 10-24-2003, 07:31 AM   #4
verbal
Member
 
Registered: Jul 2002
Location: New York
Distribution: Red Hat 7.2, SuSE 7.3
Posts: 60

Rep: Reputation: 15
hey again...

I just saw your post on my thread...

are you having problems with cgi in general...or just in the user root?

if you are experiencing the same problem that I am, there doesn't seem to be a fix. I'm currently getting assistance through the apache mail list.

I'm of the opinion that there is a bug in apache 2, at least when compiled on RH9.

in my problem: cgi's run fine, so long as they atay in the server cgi-bin, they just wont run under /home/*/public_http/cgi-bin


Verbal
 
Old 10-25-2003, 02:43 AM   #5
Kronos3
LQ Newbie
 
Registered: Oct 2003
Posts: 8

Original Poster
Rep: Reputation: 0
Its definatly not the file. I have used this file on all sorts of distros and it worked fine...

I hope you can find an answer...

I am running Mandrake 9.1 and have Mod_perl installed...
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
Problems running CGIs from user directories lsgko Linux - Software 0 10-13-2005 11:56 AM
Nagios cgis not working in fedora core 3? Jamesk5 Linux - Software 9 04-29-2005 07:26 AM
Nagios GD related CGIs not working! masterJ Linux - Software 3 01-05-2005 12:39 PM
Perl CGIs on Apache won't work Neorio Linux - Networking 1 09-13-2004 08:43 AM
nagios cgis on redhat 8 aetengoku Linux - Software 1 01-23-2004 11:15 PM


All times are GMT -5. The time now is 04:39 PM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration