Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??

I am trying to use meryln's code for watching a long process from here. As it is, it works perfectly on one of my systems, yet on another it doesn't work at all. The two systems are entirely different (one is Solaris 10, other is RHEL 6.3; one running Perl 5.8.8, other running perl 5.10.1; both running different apache versions with differing setups).

I do not expect that because it works on system A that it will work on system B. However, I'd like to figure out what is wrong with the script. I have installed Cache::Cache and Digest::MD5. The script runs, but it doesn't seem to pass of the session. What I mean is this: one server A (where script works), I enter host and goes to a new page that refreshes with traceroute results; on server B I enter host and it waits for traceroute to completely finish before going to the next page and showing me the results. I'd just like to figure out why this is the case. My apache logs are completely useless, and I can't run the script at a terminal.

Thanks for taking the time to read my post fellow monks.

UPDATE

Alright, so in the process of debugging (my method was to just throw a bunch of print statements in to see where it was stalling) I somehow got it to work by adding a print statement. Go to merlyn's article for the original code, and below is all I added (and it now works):

} elsif (my $host = param('host')) { # returning to select host if ($host =~ /^([a-zA-Z0-9.\-]{1,100})\z/) { # create a session $host = $1; # untainted now print h1("Yes"); # The line I added, only thing I changed. my $session = get_session_id(); my $cache = get_cache_handle(); $cache->set($session, [0, ""]); # no data yet
Anyone have any idea why that print statement would make it work? Also, after a run through it never even prints "Yes."

In reply to Debugging cgi-bin script by walkingthecow

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



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others chanting in the Monastery: (3)
As of 2024-04-19 15:32 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found