An "Internal Server Error" is typically triggered by printing something before the proper HTTP headers. This often happens, as in your case, when an error happens and some error message is output. You probably have an error loading the module Config::IniFiles when running as the CGI user. This user account is usually the same as the main web server user, like "nobody", "apache", "http", or similar.
One way to see what is going on is while you're developing your program to use CGI::Carp and more specifically its fatalsToBrowser mode. This allows you to see the error message that's causing the web server to give up on your program by means of injecting a minimal HTTP header in case of errors in the program. It'll just pop the error perl reports right into your browser window over the network as if it was the page you were seeking. That allows you to fix the problem, whatever that may be, and get back to developing the program.
It's probably a good idea to disable this debugging aid when your program goes to production. The end users don't need to know what modules refuse to load and things of that sort. You can always leave it enabled on your development system and enable it as needed on your testing or staging server.
In reply to Re: Using Config::IniFiles in CGI
by mr_mischief
in thread Using Config::IniFiles in CGI
by KyussRyn
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |