Perl CGI no longer working

  • Answered
I created a CGI program for calculating tax withholdings for my clients and it was working fine until recently. When I went to demo it for a client yesterday, it started giving me a 500 - Internal Server Error. A support tech gave me a piece of the error log stating "user not found" yesterday. I have gone through and verified the two user accounts that I have on the website for all folders involved with this CGI and both appeared to be fine. Just to be sure I deleted both user accounts for all the folders they need access to and then recreated them. I am still getting a 500 - internal server error message when I try to use this simple little CGI. I need this program to work from my website. Please advise.
Hello Dave, and thanks for the question. It looks like you've got a password protected directory setup that houses your Perl application. I believe that's what you were referring to with regards to deleting and re-creating the users. I did some authentication errors in the logs, but the 500 Internal Server Error that you were getting was coming from the Perl script itself and not Apache trying to handle the request. When I directly try to run the script not in a web-browser the same error is logged, or if I temporarily take off password protection on the directory the same thing happens:
Useless use of private variable in void context at [FILE.plx] line 170.
Unable to access list of allowances
No such file or directory at [FILE.plx] line 63.
It looks like possibly something to deal with date calculation looking at your code:
my $allow_file="Allowances\_$year";
open ALLOW, "./tables/$allow_file.dat" or die
I don't see anything that would have changed on the server that would be affecting this, so it looks like possibly just a code update is needed. Unfortunately I'm not great with Perl so wouldn't be able to offer exact suggestions about where to check, but definitely those lines mentioned would be a good starting point. Please let us know if you have any further questions at all. - Jacob