I hope you can help, I'm just a beginner! I have listed a few extra details which may not be relevant.

I upload cgi scripts onto local/personal directory on a Apache/2.2.10 server, using FTP95Pro in ASCII. The scripts execute correctly using perl on my web-server in a terminal session. Thus my code has no fatal syntax errors.

Webpages 'action' each cgi script at /cgi-bin/. There are symbolic links which link system directory files to my local directory files. FollowSymLinks is enabled (unsure how). Permissions are correct (755). This set-up hasnt changed, apparently.

The scripts have excuted perfectly for years, up to 2010. But now, in 2010, I have replaced working scripts with new script/files, now with exactly the same text, filename and permissions. Only the date (last modified) has changed. But now I receive a 500 Internal Server Error, and cannot determine why. My server administator assumes I have code errors. But code is unchanged since last year, and it runs fine (albeit no arguments) on web-server console using perl myscript.cgi

Is there anything you can think of which may have changed ? I'm suspicious of the new decade. I think the server swapped from Linux to Windows OS last year, but my server administrator got it all working OK. Is there something unusual he may have missed, related to 2010?

  • 500 Internal Server Error means "Look in the server error log". What does it say? – Quentin Apr 10 '10 at 11:53

There is a well-known 2010 bug in Spamassassin related to a regular expression. Perhaps yours is similar. I would suggest that you recheck your code for assumptions related to dates. I'm voting to move this question to Stackoverflow.

  • Thanks Dennis, but the problem is not related to my most basic of code. – Barry F Feb 2 '10 at 8:40

Unless the CGI script broke as of 1 January 2010, then I strongly doubt that it is related to 2010.

  • See Question Q3.4 of the Perl and CGI FAQ, and double check the items on this Perl CGI Script Debugging list.

  • Use a diff tool to compare the old and new version to verify that nothing else is different in your source code.

  • Add Perl Cgi:Carp support to help debug the script as installed.

  • Use use warnings and use strict in the Perl script

  • Test using perl -c script.cgi (see: perldoc perlrun)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy