in reply to Html not printing my shell command output

@job_run = `autorep -J my_job_name -w`;

Maybe your web server cannot access the "autorep" command the way you do when running it from a shell.

You do access your page on a web server, don't you? Because your browser on its own does not know what to do with it.

There will be an error log for the web server that should tell you what happened there and then.

Cheers, Sören

Créateur des bugs mobiles - let loose once, run everywhere.
(hooked on the Perl Programming language)

Replies are listed 'Best First'.
Re^2: Html not printing my shell command output
by mshreya (Initiate) on Feb 05, 2015 at 10:18 UTC
    As I mentioned, I am getting the output of my Autorep command and this script is running fine in command line when I run like ./my_code.cgi. So I dont think that is the problem here. Not sure what else Iam missing here.

      "So I dont think that is the problem here."

      I don't think you understand what you have been told. While you can run this from the command line when logged in, this does not mean that your webserver can. Did you check your web server logs?

      As I mentioned, there is a difference in accessing a programme from the command line, or from a browser, or from a web server.

      It may be just as simple as the path to the executable not being in the environment of the web server.

      I have not seen you ruling it out yet.

      Cheers, Sören

      Créateur des bugs mobiles - let loose once, run everywhere.
      (hooked on the Perl Programming language)

        I got it Soren. I think you are right. I added my Autosys profile Source in the wrapper CGI which is called from my html and it worked. As you said, command line, it was invoking Autosys but the html apache server was not able to till i explicitly sourced it. Thanks so much for the help. It is working now.