in reply to HTML Template

Could you meanwhile rule out the environment? During your "update from XP to 7", possibly you (re)moved your perl.exe or something like this.

If you temporarily replace your script by the following, does it say something understandable, or is it still giving the 502 error?

#!d:/perl/bin/perl -w print "Content-Type: text/plain\n\nHi there!";
If it still gives the error, this means there is something wrong with your Perl installation, or your Webserver doesn't find it (e.g. it isn't in D:\perl\bin anymore).
If it says Hi there! then, of course, all the hints from the other monks apply.

Replies are listed 'Best First'.
Re^2: HTML Template
by Anonymous Monk on May 11, 2015 at 08:49 UTC
      That's right, but (at least XAMPP's) Apache does mimic /bin/sh's behaviour. This is configurable, so the OP should possibly check this.