Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   Perl Misc (http://www.velocityreviews.com/forums/f67-perl-misc.html)
-   -   need help, will pay (http://www.velocityreviews.com/forums/t911278-need-help-will-pay.html)

boman 09-02-2009 04:36 PM

need help, will pay
 
Need help with a simple Perl cgi script running from Apache 2.2 on
Windows XP, willing to pay $100 for the solution. Please email me for
details. Prefer NYC-based coder, payment in cash.

Nathan Keel 09-02-2009 04:49 PM

Re: need help, will pay
 
boman wrote:

> Need help with a simple Perl cgi script running from Apache 2.2 on
> Windows XP, willing to pay $100 for the solution. Please email me for
> details. Prefer NYC-based coder, payment in cash.


Why don't you post what the error is and the relevant portions of the
script? You can probably get good help for no charge right now.

boman 09-02-2009 05:06 PM

Re: need help, will pay
 
On Sep 2, 12:49*pm, Nathan Keel <na...@gm.ml> wrote:
> boman wrote:
> > Need help with a simple Perl cgi script running from Apache 2.2 on
> > Windows XP, willing to pay $100 for the solution. Please email me for
> > details. Prefer NYC-based coder, payment in cash.

>
> Why don't you post what the error is and the relevant portions of the
> script? *You can probably get good help for no charge right now.


This question has been asked before, and I've tried almost all of the
solutions, with no success. So I'm trying not to annoy this group by
asking the question again. After the reading the "why doesn't this
work" thread from Aug 20, I didn't want to start another brawl.

But you graciously asked, Nathan, so here goes!

1. display web page with simple form w/ radio buttons
2. user selects radio button and clicks submit
3. single parameter is passed from the radio button
4. exe command on web server is initiated (I was using
Win32::Process), parameter is passed
5. output of command is sent back to browser in real time (this is
where I'm stuck)
6. when command is done, start 2nd command, send output to browser in
real time

I've got 1-4 working, but cannot get output of command to the browser
in real time, as the output is generated. It simply waits for command
to finish, then sends the entire out put in one blob.

Yes, I've got the $|=1 set, and I made sure apache is not buffering
output, but can't get around the browsers doing the buffering (I think
this is what's happening).

Yes, I've read the stonehenge article which uses traceroute as an
example, but cannot get that to work on my Windows perl v5.8.8. I
tried some of the concepts from this article, but it's a bit out of my
league.

At this point I cannot spend much more time trying to get this to work
myself, and I need a simple, yet professional level solution. I've
read lots of forums, paged thru numerous books, I can't really spend
time on that anymore. I need something that works, and I need it this
week.

I know this can probably be done in javascript, but I'd prefer this to
be done in Perl. Also, I won't be able to install any modules, we'll
have to use what's installed by default.

thanks!

Brian Wakem 09-02-2009 05:57 PM

Re: need help, will pay
 
boman wrote:

> On Sep 2, 12:49*pm, Nathan Keel <na...@gm.ml> wrote:
>> boman wrote:
>> > Need help with a simple Perl cgi script running from Apache 2.2 on
>> > Windows XP, willing to pay $100 for the solution. Please email me for
>> > details. Prefer NYC-based coder, payment in cash.

>>
>> Why don't you post what the error is and the relevant portions of the
>> script? *You can probably get good help for no charge right now.

>
> This question has been asked before, and I've tried almost all of the
> solutions, with no success. So I'm trying not to annoy this group by
> asking the question again. After the reading the "why doesn't this
> work" thread from Aug 20, I didn't want to start another brawl.
>
> But you graciously asked, Nathan, so here goes!
>
> 1. display web page with simple form w/ radio buttons
> 2. user selects radio button and clicks submit
> 3. single parameter is passed from the radio button
> 4. exe command on web server is initiated (I was using
> Win32::Process), parameter is passed
> 5. output of command is sent back to browser in real time (this is
> where I'm stuck)
> 6. when command is done, start 2nd command, send output to browser in
> real time
>
> I've got 1-4 working, but cannot get output of command to the browser
> in real time, as the output is generated. It simply waits for command
> to finish, then sends the entire out put in one blob.
>
> Yes, I've got the $|=1 set, and I made sure apache is not buffering
> output, but can't get around the browsers doing the buffering



A quick and easy way around browser buffering is to print something like
this 100 or so times after every line you output.

<!-- this wont show up on the page but will force the browser to flush -->



--
Brian Wakem


Jürgen Exner 09-02-2009 06:03 PM

Re: need help, will pay
 
boman <shambo_p@yahoo.com> wrote:
>1. display web page with simple form w/ radio buttons
>2. user selects radio button and clicks submit
>3. single parameter is passed from the radio button
>4. exe command on web server is initiated (I was using
>Win32::Process), parameter is passed
>5. output of command is sent back to browser in real time (this is
>where I'm stuck)
>6. when command is done, start 2nd command, send output to browser in
>real time
>
>I've got 1-4 working, but cannot get output of command to the browser
>in real time, as the output is generated. It simply waits for command
>to finish, then sends the entire out put in one blob.


As has been explained to you back then this is _NOT(!)_ a Perl issue but
a problem somewhere in the long chain of receiving CGI response,
creating and sending HTTP response, receiving HTTP response, rendering
the page in the browser. You really need someone who is familiar with
those areas (no matter in which language) instead of someone who is
familiar with Perl.

In short: you are barking up the wrong tree.

>Yes, I've got the $|=1 set, and I made sure apache is not buffering
>output, but can't get around the browsers doing the buffering (I think
>this is what's happening).


As I said, you need someone who is familiar with web programming, not
someone familiar with Perl.

>I know this can probably be done in javascript, but I'd prefer this to
>be done in Perl.


That is not possible! Please, please, please, you already set the Perl
buffer to auto-flush. There REALLY is nothing else you can do in your
Perl code.

You said yourself that the buffering probably happens in the brower.
Maybe so, maybe somewhere else in the chain. But it really, really isn't
Perl.

Aside of that, "in real time" is a non-starter to begin with because the
HyperText Transfer Protocol is not real-time to begin with.
If you need real time then you need to look into a different protocol,
but that's even more off topic than web programming.

jue

boman 09-02-2009 06:19 PM

Re: need help, will pay
 
On Sep 2, 2:03*pm, Jürgen Exner <jurge...@hotmail.com> wrote:
> As I said, you need someone who is familiar with web programming, not
> someone familiar with Perl.
>
> You said yourself that the buffering probably happens in the brower.
> Maybe so, maybe somewhere else in the chain. But it really, really isn't
> Perl.


Jürgen, I've read your previous posts and I respect your opinion, but
I'm pretty sure what I'm asking for can be done in Perl, the
stonehenge article with the traceroute example seems to prove that. I
simply cannot spent any more time trying different things.

Hence the offer of money; if someone can provide me with a solution
based on the requirements (which include using Perl), than I will pay
cash.

> Aside of that, "in real time" is a non-starter to begin with because the
> HyperText Transfer Protocol is not real-time to begin with.
> If you need real time then you need to look into a different protocol,
> but that's even more off topic than web programming.


OK, not real time, how about updating the browser every 5 seconds? I
actually do have something like this working, but I can't get around
the browser buffer issue, and I'm pretty sure someone who knows Perl
very well can provide a clever solution to get around that. I simply
cannot spend any more time researching this, I need a solution now.

thanks




Nathan Keel 09-02-2009 06:23 PM

Re: need help, will pay
 
boman wrote:

> Yes, I've got the $|=1 set, and I made sure apache is not buffering
> output, but can't get around the browsers doing the buffering (I think
> this is what's happening).
>


I see, well then you might need to get someone to take a look or give
you different options. There are some things you can try, but if
you've set the buffering in the script, then the problem does lie
elsewhere. You also might consider something like a server-push
solution or just saying "click here to view the results", which can
then open a file or read in the data as its happening (perhaps not via
a CGI script).

boman 09-02-2009 06:33 PM

Re: need help, will pay
 
On Sep 2, 2:23*pm, Nathan Keel <na...@gm.ml> wrote:
> I see, well then you might need to get someone to take a look or give
> you different options. *There are some things you can try, but if
> you've set the buffering in the script, then the problem does lie
> elsewhere. *You also might consider something like a server-push
> solution or just saying "click here to view the results", which can
> then open a file or read in the data as its happening (perhaps not via
> a CGI script).


The link idea could be a fall back, but I'd like to automate that. I
would think you can do that by setting the refresh parameter in
cgi::pm's header call, but I cannot figure out how to get the refresh
to exit once the process is complete, it just refreshes and refreshes
and refreshes, even when the process completes. The stonehenge
traceroute script gave me ideas, but I can't get it to work, and I'm
out of time for troubleshooting.

Jürgen Exner 09-02-2009 06:54 PM

Re: need help, will pay
 
boman <shambo_p@yahoo.com> wrote:
>On Sep 2, 2:03*pm, Jürgen Exner <jurge...@hotmail.com> wrote:
>> As I said, you need someone who is familiar with web programming, not
>> someone familiar with Perl.
>>
>> You said yourself that the buffering probably happens in the brower.
>> Maybe so, maybe somewhere else in the chain. But it really, really isn't
>> Perl.

>
>Jürgen, I've read your previous posts and I respect your opinion, but
>I'm pretty sure what I'm asking for can be done in Perl, the
>stonehenge article with the traceroute example seems to prove that. I
>simply cannot spent any more time trying different things.


Ok, one final attempt:

You are trying to haul a yard of sand with your pickup truck and it
doesn't work. You keep trying to convince the car mechanic to finally
fix the car while actually the problem is the washed out bridge to the
sand pit.

This is exactly what you keep doing. You are looking for a solution in
Perl (your pickup) and keep asking Perl guys (your car mechanic) how to
fix the program (your pickup) while actually Perl (your pickup) is doing
just fine and the problem is not related to Perl (your pickup) at all
and you should be asking web programmers (the DOT) about how to
implement a non-bufferd path (fix the bridge).

>> Aside of that, "in real time" is a non-starter to begin with because the
>> HyperText Transfer Protocol is not real-time to begin with.
>> If you need real time then you need to look into a different protocol,
>> but that's even more off topic than web programming.

>
>OK, not real time, how about updating the browser every 5 seconds? I


If you mean updating the displayed document rather than the browser,
then HTML has such a directive, see "refresh" for HTTP-EQUIV. If that's
a good choice I don't know, probably not.

jue

Jürgen Exner 09-02-2009 06:59 PM

Re: need help, will pay
 
boman <shambo_p@yahoo.com> wrote:
>On Sep 2, 2:23*pm, Nathan Keel <na...@gm.ml> wrote:
>> I see, well then you might need to get someone to take a look or give
>> you different options. *There are some things you can try, but if
>> you've set the buffering in the script, then the problem does lie
>> elsewhere. *You also might consider something like a server-push
>> solution or just saying "click here to view the results", which can
>> then open a file or read in the data as its happening (perhaps not via
>> a CGI script).

>
>The link idea could be a fall back, but I'd like to automate that. I
>would think you can do that by setting the refresh parameter in
>cgi::pm's header call, but I cannot figure out how to get the refresh
>to exit once the process is complete, it just refreshes and refreshes
>and refreshes, even when the process completes.


That is trivial to fix: for the final report, i.e. when the process is
finished, just _don't_ set the refresh parameter in that final document.
Problem solved.

jue


All times are GMT. The time now is 10:52 PM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.