homepage Welcome to WebmasterWorld Guest from 54.161.175.231
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / Code, Content, and Presentation / Perl Server Side CGI Scripting
Forum Library, Charter, Moderators: coopster & jatar k & phranque

Perl Server Side CGI Scripting Forum

    
Perl/CGI Script
Internal Server Error
madcat




msg:442804
 7:07 pm on Jan 19, 2004 (gmt 0)

Hi:

I'm trying to link to a file, fileA.cgi, which is in the cgi-bin directory in a folder called chap01- from fileA.html.

When I press on a link in fileA.html, I get an Internal Server Error. Just to test it out I created another cgi file called fileB.cgi in the same folder. When I link to it from the same .html page I get the results of the cgi file.

Both .cgi scripts are set to CHMOD 755 and were uploaded as an ASCII. All I did was change the filename in the link, so how come one works and the other doesn't?

I checked for errors using the command line...syntax was OK. I also checked to make sure I could output the .cgi file in question using the command line and everything was fine. I just can't do it from the browser.

Any help is greatly appreciated.

M

 

sugarkane




msg:442805
 2:58 pm on Jan 20, 2004 (gmt 0)

A puzzler. Are both scripts identical, and set to the same user / group?

mjawanda




msg:442806
 6:52 am on Feb 10, 2004 (gmt 0)

Hi,

I am really new to CGI and Perl and also to VI.

Can u tell me what command shall I use on VI to execute the file. I tried sh filename but it gives the error that it cannot recognise the print command.

Please help

Mandeep

greggb




msg:442807
 1:46 am on Feb 13, 2004 (gmt 0)

Hi. Here's a guess on your problem.

I had a similar problem the other day. A file that had been working for a long time suddenly stopped working, right after I uploaded and overwrote it. The error log said "fopen permission denied" or something like that, so it wasn't a syntax problem.

To make a long story short, my FTP client was telling me that it was set to have execute permissions, but it didn't really have execute permissions. I refreshed a number of times, and it still showed that it had execute permissions, but it really didn't.

Here's what I'd do if I were you: Place the following in your Perl code, at the very start of your code (at the very start of where you actually start issuing commands)

die "somethingunique";

Upload it to your server, and execute the script.
Then check your error log and see if it mentions "somethingunique".

If it doesn't, then it means that it hasn't even made it to the first command/expression/statement. In that case, it's probably a file permissions thing.

Hope that helps,
Gregg

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / Perl Server Side CGI Scripting
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved