Web Hosting Talk







View Full Version : What would cause this to happen (perl)


ccnc
06-19-2007, 01:26 PM
Out of curiosity, what would typically cause a page written in perl to display as text, as opposed to executing? This assuming nothing on the server has been altered or re-compiled.


Why do I ask?

There happens to be a somewhat well-known page on the net from which one of the request components isn't working. Instead it returns, as a result, code (in perl), with secure db name/user/pass info. I have written postmaster@thedomain and hopefully they catch it before someone does something nefarious. :dgrin:

mwatkins
06-19-2007, 01:40 PM
Its likely there is a change in the web server configuration or local configuration (.htaccess perhaps).

Likely cause: Web server mime/type misconfiguration. If you have curl installed on your system you can see what is happening - you'll probably see the HTTP response header set to text/plain. Thus the webserver isn't looking at the page as a CGI resource or executable. There may also be CGI configuration issues, file mode changes, etc.

curl -I http://thedomain/thesourcepage.pl

Codelphious
06-20-2007, 12:30 AM
Maybe they forgot the shebang line?

#!/usr/local/bin/perl

foobic
06-20-2007, 01:22 AM
My bet would be a change, probably accidental, in the Apache config - Options (ExecCGI) or scriptalias. Sure, it could also be a stuff-up within the account itself (.htaccess or perl script) but anyone doing that would be much more likely to notice and fix it.

Another e-mail to webmaster@thedomain might be worth a try.