vit has asked for the wisdom of the Perl Monks concerning the following question:

Dear Monks,
My Perl/CGI code structure is:
The client calls index.pl file located in cgi directory,
index.pl calls perl/CGI code xxxCGI.pl using system() command.
xxxCGI.pl creates HTML and is located in cgi/MyDir
and this works. But when I call pure perl solver.pl from xxxCGI.pl through both back ticks (`) and system() none is working.
solver.pl is located in the same dir with xxxCGI.pl
Does anybody have any clue what may be happening and what I may do wrong.

Replies are listed 'Best First'.
Re: Starting shell in CGI problem
by moritz (Cardinal) on Sep 02, 2008 at 16:39 UTC
    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?

Re: Starting shell in CGI problem
by lamp (Chaplain) on Sep 02, 2008 at 16:42 UTC
    check your web server's error log for more details. If you are using apache http server, check error_log(default error log file name for linux)/error.log(default error log file name for windows) file for the error.

    --lamp
      Thanks,
      The log helped me a lot. It actually prompted what is not working in calling my perl program and what did not work inside, so that I finally made it work.