Re: [nyphp-talk] php script timeout not working

2009-04-08 Thread Corey H Maass - gelform.com
Aaah, that's huge. Okay. I will continue to play. On Wed, 8 Apr 2009 15:22:58 -0400, "Daniel Convissor" said: > On Mon, Apr 06, 2009 at 08:29:18PM -0400, Corey H Maass - gelform.com > wrote: > > > > curl_setopt($curl_handle,CURLOPT_CONNECTTIMEOUT,2); > ... > > But it doesn't timeout. Any ideas?

Re: [nyphp-talk] php script timeout not working

2009-04-08 Thread Daniel Convissor
On Mon, Apr 06, 2009 at 08:29:18PM -0400, Corey H Maass - gelform.com wrote: > > curl_setopt($curl_handle,CURLOPT_CONNECTTIMEOUT,2); ... > But it doesn't timeout. Any ideas? FYI... CURLOPT_CONNECTTIMEOUT just works on the connection attempt. So once you're connected, this option doesn't mean a

Re: [nyphp-talk] php script timeout not working

2009-04-06 Thread Corey H Maass - gelform.com
> Two options. Use fsockopen() instead of fopen(), see the > stream_set_timeout() documentation for examples. Or use > ini_set('default_socket_timeout', 1) before you call fopen(). Ooh, this worked: ini_set('default_socket_timeout', 1); @fopen("http://dubfiler/upload/tos3/Id/11";, "r"); Had

Re: [nyphp-talk] php script timeout not working

2009-04-06 Thread Corey H Maass - gelform.com
Okay, trying curl. Using: $curl_handle=curl_init(); curl_setopt($curl_handle,CURLOPT_URL,'http://localhost/uploader'); curl_setopt($curl_handle,CURLOPT_CONNECTTIMEOUT,2); curl_exec($curl_handle); curl_close($curl_handle); But it doesn't timeout. Any ideas? Thanks, Corey On Mon, 6 Apr 2009 14:2

Re: [nyphp-talk] php script timeout not working

2009-04-06 Thread Corey H Maass - gelform.com
Okay, awesome. I was looking at curl too at one point. I'll try it with: CURLOPT_TIMEOUT - The maximum number of seconds to allow cURL functions to execute. On Mon, 6 Apr 2009 14:27:26 -0400, "Brent Baisley" said: > wget or curl basically hit a web page. One of the parameters is a URL > to hit, y

Re: [nyphp-talk] php script timeout not working

2009-04-06 Thread Brent Baisley
wget or curl basically hit a web page. One of the parameters is a URL to hit, you're just not using a browser. Although you could tell the server you are a browser of your choice. Brent Baisley On Mon, Apr 6, 2009 at 2:01 PM, Corey H Maass - gelform.com wrote: > Interesting. I'll take a look at

Re: [nyphp-talk] php script timeout not working

2009-04-06 Thread Corey H Maass - gelform.com
Interesting. I'll take a look at wget. I do need to pass a param so I do need to run it as a URL I think. Corey On Mon, 6 Apr 2009 12:02:33 -0400, "Brent Baisley" said: > It's fairly easy to convert a PHP script to an executable script under > Unix. Just make it executable. Most things work with

Re: [nyphp-talk] php script timeout not working

2009-04-06 Thread Brent Baisley
It's fairly easy to convert a PHP script to an executable script under Unix. Just make it executable. Most things work without changes, although you will be missing any URL parameters and web specific directives. I've used parts of the Zend framework in command line scripts without changes. But if

Re: [nyphp-talk] php script timeout not working

2009-04-06 Thread Corey H Maass - gelform.com
Thanks, Rob. I looked at that for a minute cos it seems like the best option, but I'm using the Zend framework, where it would be a pain to break the code out to be an executable script. Plus I want to be able to call it from a URL. Corey On Sun, 5 Apr 2009 18:51:44 -0400, "Rob Marscher" said: >

Re: [nyphp-talk] php script timeout not working

2009-04-05 Thread Rob Marscher
Corey, Are you on a unix based machine? Is that script really local? Try shell_exec('/path/to/s3uploader.php &'); instead of fopen. The ampersand will get it to return without waiting for the upload script to finish. On Apr 5, 2009, at 6:16 PM, Daniel Convissor > wrote: Hi Corey: On Sun

Re: [nyphp-talk] php script timeout not working

2009-04-05 Thread Daniel Convissor
Hi Corey: On Sun, Apr 05, 2009 at 04:28:20PM -0400, Corey H Maass - gelform.com wrote: > > set_time_limit(1); set_time_limit() works for your PHP code. Streams, in a way, are outside your PHP code. > $handle = fopen("http://localhost/s3uploader.php";, "r"); > stream_set_timeout($handle, 1);

Re: [nyphp-talk] php script timeout not working

2009-04-05 Thread Corey H Maass - gelform.com
Nope - by specifying ignore_user_abort(true); in the uploader script, the uploader script will continue after the launcher exits. On Sun, 5 Apr 2009 16:54:36 -0400 (EDT), "Ajai Khattri" said: > On Sun, 5 Apr 2009, Corey H Maass - gelform.com wrote: > > > I want it to call the other script (the u

Re: [nyphp-talk] php script timeout not working

2009-04-05 Thread Ajai Khattri
On Sun, 5 Apr 2009, Corey H Maass - gelform.com wrote: > 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. Unless you're running it in a separate thread, won't the script die when the

Re: [nyphp-talk] php script timeout not working

2009-04-05 Thread Corey H Maass - gelform.com
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" said: > set_time_limit(1); > in that line you are setting the time limit to one seco

Re: [nyphp-talk] php script timeout not working

2009-04-05 Thread Darryle Steplight
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(”memory_

[nyphp-talk] php script timeout not working

2009-04-05 Thread Corey H Maass - gelform.com
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 look