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

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.


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."