in reply to Starting shell in CGI problem

Your HTTP server's error log file might have a clue.

And surely the error is on line 42. (aka "show us the code").

You haven't told us what "is not working" means - is there an error? if yes, what? if no, how do you know it didn't work?