Dear Monks

Sometime back, I had posted a query regarding Issue with executing long process through CGI and had asked for help.

I was clueless then as to why the browser was going blank or exiting with a success status immediately (without executing the exec command in the script!!!) but now I have figured out that the PATH env variable is the one that is causing the issue.

i.e. If $PATH is set properly, then the script executes the command and returns the results.

But, if $PATH is not correct, then the script sets

$data->[0] (line no 61)

and enters the loop

if (my $session = param('session')) (line no 7)

immediately and stalls (or exits )

I set some softlinks and then define the PATH during runtime for the script. Hence, this has become an issue if one of the links is not set properly.

Although I can somehow manage this issue by making sure that the proper links are set in the first place, I am curious as to why this is happening. Unfortunately, I don't know how to proceed further to find the rootcause of this problem.

Looking forward for some help to check this further


In reply to Long Process through CGI and issue with $PATH by sara2005

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.