in reply to Re: Identical files, only one works?
in thread Identical files, only one works?

Problem is, it's one of those hosts with no error log and no tel-net(ish) acess. all I get is a 500 error on one version, and the correct output on the other. The first file was already there and running from about a year and a half ago, and I just overwrote it with the content of the new one to see if it made a difference... It did.



My code doesn't have bugs, it just develops random features.

Flame ~ Lead Programmer: GMS | GMS

  • Comment on Re: Re: Identical files, only one works?

Replies are listed 'Best First'.
Re: Re: Re: Identical files, only one works?
by graff (Chancellor) on Dec 08, 2002 at 05:40 UTC
    The first file was already there and running from about a year and a half ago

    So, the file name (indeed, the inode) of the first file is now being used to store the new script? Sounds more like a server/file permission problem than a problem of script content.

    Do either you or your friend remember what was done a year and a half ago when that first file was installed and made to run? Are you sure you repeated the same steps this time when trying to install a second file? Are you sure the folks who run the server haven't changed policy since then -- e.g. no more new cgi scripts without some additional check/approval/blahblah? (Who knows? Maybe they put in a check to see if a perl cgi script has "-T" on the shebang line.) If there was a policy change, it's possible that it applies only to new stuff, and existing script files were allowed to continue operating.

Re: Re: Re: Identical files, only one works?
by tachyon (Chancellor) on Dec 08, 2002 at 14:41 UTC

    Add this to your script to reveal the source of the 500 error fairly reliably. If you still get a 500 error then the script is not executable, the permissions are wrong or the shebang line is wrong.

    # ensure all fatals go to browser during debugging and set-up # comment this BEGIN block out on production code for security BEGIN { $|=1; print "Content-type: text/html\n\n"; use CGI::Carp('fatalsToBrowser'); }

    cheers

    tachyon

    s&&rsenoyhcatreve&&&s&n.+t&"$'$`$\"$\&"&ee&&y&srve&&d&&print