NYCPHP Meetup

NYPHP.org

[nycphp-talk] php script timeout not working

Corey H Maass - gelform.com corey at gelform.com
Sun Apr 5 16:51:02 EDT 2009


I want it to call the other script (the uploader) and then stop. So I'm
setting it to timeout after one second on purpose to make sure it won't
keep running.

On Sun, 5 Apr 2009 16:46:41 -0400, "Darryle Steplight"
<dsteplight at gmail.com> said:
> set_time_limit(1);
> in that line you are setting the time limit to one second. You should
> make this number a  lot higher. set_time_limit(60) if you want to set
> the time limit to 60 seconds.
> 
> 
> Also, you just might be running out of memory so try increasing your
> script's memory usage. ini_set(&#8221;memory_limit&#8221;,&#8221;16M&#8221;);
> 
> 
> On Sun, Apr 5, 2009 at 4:28 PM, Corey H Maass - gelform.com
> <corey at gelform.com> wrote:
> > Hey, folks. I've got a script that uploads a file from my server to
> > Amazon's S3. It works fine, and I'm using ignore_user_abort(true) so
> > that I can call it, but don't have to wait for the response. Great. Now
> > I am trying to create the file that will call the uploader and then die.
> > It basically looks like this:
> >
> > set_time_limit(1);
> >
> > $handle = fopen("http://localhost/s3uploader.php", "r");
> > stream_set_timeout($handle, 1);
> >
> > But neither timeout is working - it sits and spins while the upload
> > takes place. Any ideas?
> >
> > Thanks,
> >
> > Corey
> >
> > //
> > Corey H Maass
> > Gelform Design
> > Brooklyn, NY
> > Web design and development for art and business
> >
> > em corey at gelform.com
> > ww http://www.gelform.com
> > ph 646/228.5048
> > fx 866/502.4861
> > IM gelform
> >
> > _______________________________________________
> > New York PHP User Group Community Talk Mailing List
> > http://lists.nyphp.org/mailman/listinfo/talk
> >
> > http://www.nyphp.org/show_participation.php
> >
> _______________________________________________
> New York PHP User Group Community Talk Mailing List
> http://lists.nyphp.org/mailman/listinfo/talk
> 
> http://www.nyphp.org/show_participation.php

//
Corey H Maass
Gelform Design
Brooklyn, NY
Web design and development for art and business

em corey at gelform.com
ww http://www.gelform.com
ph 646/228.5048
fx 866/502.4861
IM gelform




More information about the talk mailing list