Login
User Name:

Password:



Register

Forgot your password?
void nanny_get_new_race -- comm.c
Mar 13, 2025 7:08 am
By Elwood
IPv6
Jan 25, 2025 10:45 pm
By Samson
mudstrlcpy and mudstrlcat
Jan 18, 2025 5:23 pm
By Samson
I3 and IMC
Jan 17, 2025 9:35 pm
By Samson
AFKMud 2.5.1
Jan 17, 2025 2:22 pm
By Samson
SmaugFUSS 1.9.7
Author: Various
Submitted by: Samson
AFKMud 2.5.1
Author: AFKMud Team
Submitted by: Samson
Kayle's Weather Code for AFKMud
Author: Kayle
Submitted by: Samson
AFKMud 2.5.0
Author: AFKMud Team
Submitted by: Samson
SWFotEFUSS 1.5.2
Author: Various
Submitted by: Samson
Users Online
Anthropic, Google, AhrefsBot, Bing

Members: 0
Guests: 23
Stats
Files
Topics
Posts
Members
Newest Member
503
3,812
19,720
591
TracySpencer

» SmaugMuds » 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 5:03 pm   
Go to the top of the page
Go to the bottom of the page

elbryan
Fledgling
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 6: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 5:42 pm   
Go to the top of the page
Go to the bottom of the page

elbryan
Fledgling
GroupMembers
Posts34
JoinedMay 13, 2002

 
Thanks. I'll give that a shot and see what happens.

Post is unread #4 Jul 4, 2002 9: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 10:48 pm   
Go to the top of the page
Go to the bottom of the page

elbryan
Fledgling
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 6, 2002 1:32 am   
Go to the top of the page
Go to the bottom of the page

elbryan
Fledgling
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 >>