Login
User Name:

Password:



Register
Forgot your password?
Vote for Us!
parse description bug
Dec 15, 2017, 10:08 pm
By Remcon
Couple bugs
Dec 12, 2017, 5:42 pm
By Remcon
Bug in disarm( )
Nov 12, 2017, 6:54 pm
By GatewaySysop
Bug in will_fall( )
Oct 23, 2017, 1:35 am
By GatewaySysop
Bug in do_zap( ), do_brandish( )
Oct 18, 2017, 1:52 pm
By GatewaySysop
LOP 1.45
Author: Remcon
Submitted by: Remcon
LOP Heroes Edition
Author: Vladaar
Submitted by: Vladaar
Heroes sound extras
Author: Vladaar
Submitted by: Vladaar
6Dragons 4.3
Author: Vladaar
Submitted by: Vladaar
Memwatch
Author: Johan Lindh
Submitted by: Vladaar
Users Online
CommonCrawl, Yahoo!, Google

Members: 0
Guests: 6
Stats
Files
Topics
Posts
Members
Newest Member
477
3,706
19,240
608
LAntorcha
Today's Birthdays
There are no member birthdays today.
Related Links
» SmaugMuds.org » General » User Lounge » Apache web server
Forum Rules | Mark all | Recent Posts

Apache web server
< Newer Topic :: Older Topic >

Pages:<< prev 1 next >>
Post is unread #1 Jun 29, 2002, 3:03 pm
Go to the top of the page
Go to the bottom of the page

elbryan

GroupMembers
Posts34
JoinedMay 13, 2002

Not sure if anyone can help me out on this but here goes anyways.

I have a linux box which runs my afkmud, plus I have apache setup mainly for learning experience and to work on webpages without sending them to my isp constantly to see how they look. My problem is, CGI scripts are giving me problems.

I can write a simple script which will display Hello World and such to a web browser just fine. Making sure to have it print content-type text/html on the first line and such. Here's the problem though. If I download a script from the net say for ad banners or gif rotation, it bugs out with internal server errors. The error_log file from apache says premature end of script header...no such file or directory. I have the pointer to perl correct and checked through the code for directory errors.
I triple checked my file permissions chmod 755 for scripts in the cgi-bin directory.

Also, if I try to execute the script from the linux prompt, I get bad interpreter....no such file or directory.

Any comments, pointers into a specific direction to look at would greatly be appreciated.
       
Post is unread #2 Jun 30, 2002, 4:04 am
Go to the top of the page
Go to the bottom of the page

Guest - (Unregistered)

Also, if I try to execute the script from the linux prompt, I get bad interpreter....no such file or directory.

Any comments, pointers into a specific direction to look at would greatly be appreciated.

Okay if its saying that sorta thing from the command line, it rekons it definately can't find the Perl command.

One test would be to run the script using "perl script.pl" or whatever, and see if that runs.. if that doesn't then there is a fault with the script possibly (or its looking for something in the middled of execution that is causing this). If using "perl script.pl" works, then use "which perl" to give you the path to the Perl its using, and use that in the top of the script (I actually have 3 versions installed on mine so it is sometimes possible to have the wrong one )

Once you have it working on the command line, then worry about the apache execution, as the error via apache you are getting if the "bad interpreter" message going out before the Content-type header which is an error. Due to this fact, once the command line is alright, you'll prolly find it'll work via Apache (unless you are using mod_perl which has other dependancies, but thats a totally different matter )
       
Post is unread #3 Jun 30, 2002, 3:42 pm
Go to the top of the page
Go to the bottom of the page

elbryan

GroupMembers
Posts34
JoinedMay 13, 2002

Thanks. I'll give that a shot and see what happens.
       
Post is unread #4 Jul 4, 2002, 7:09 pm
Go to the top of the page
Go to the bottom of the page

kilroy
Magician
GroupMembers
Posts122
JoinedMay 1, 2002

nod
check to make sure that the script is seeing perl
also try setting it to 777

if it works - then set it to 775
and work down from there
sure 755 is about as secure as it will be for general cgi scripts, but 775 is also gonna be pretty good.

make sure in your httpd.conf that you are correctly allowing the use of cgi scripts. and that you have allowed the .cgi & .pl extensions .

those are a few of the nasties that I ran it to.

Kilroy
       
Post is unread #5 Jul 5, 2002, 8:48 pm
Go to the top of the page
Go to the bottom of the page

elbryan

GroupMembers
Posts34
JoinedMay 13, 2002

well, I've tried almost everything. I've doule checked my httpd.conf. I have options ExecCGI set under the cgi directory, addhandler for cgi is .cgi .pl. The path to perl in the script is pointing to the correct directory. I've tried chmod 700 755 750 777. Tried executing the script from the linux box using perl script.cgi. It seems to work fine that way. I get promted with comman line mode use name=value pairs. I can send my httpd.conf if anyone cares to check it over. One last thing, I am using mod perl, I'll try disabling it in the conf and restarting httpd and see if it lets me that way.
       
Post is unread #6 Jul 5, 2002, 11:32 pm
Go to the top of the page
Go to the bottom of the page

elbryan

GroupMembers
Posts34
JoinedMay 13, 2002

OK! Mod_Perl must be one heck of a pain in the but to make work! Anyways, I commented out the mod_perl sections of my httpd.conf, and walla. it works!!!!! Thanks for all your help.
       
Pages:<< prev 1 next >>