[FX.php List] 5 minute timeout?

Gjermund Gusland Thorsen ggt667 at gmail.com
Tue Aug 29 09:56:17 MDT 2006


Also it's good practice to not mix file upload script with other scripts.

ggt667

On 8/29/06, Dale Bengston <dbengston at preservationstudio.com> wrote:
> Hi David,
>
> Try using set_time_limit at the top of the html page being loaded
> instead of within the while loop. I think it's designed to work per-
> script, not per-iteration of a loop.
>
> Regards,
> Dale
>
> On Aug 29, 2006, at 10:12 AM, David Ness wrote:
>
> > My fx.PHP solution has a feature where the user can 'batch upload'
> > data
> > to a FileMaker table using a properly formatted csv file. I've got
> > everything working great, except I can't get the page to stop
> > timing out
> > after 5 minutes. I get about 320 records posted (of a test set of
> > 1000),
> > then the script stops, throwing the following error to the php error
> > log:
> >
> > [29-Aug-2006 10:53:48] PHP Warning:  fsockopen() [<a
> > href='function.fsockopen'>function.fsockopen</a>]: unable to
> > connect to
> > 10.10.10.4:80 (A connection attempt failed because the connected party
> > did not properly respond after a period of time, or established
> > connection failed because connected host has failed to respond.
> >
> > 10.10.10.4 being my FM WPE.
> >
> > The basic structure of the php code is:
> >
> > $handle = fopen("uploadedfilename.csv", "r");
> > while (($importdata = fgetcsv($handle, 0, ",")) != FALSE) {
> >       set_time_limit( 50000 );
> >       $newApplication->AddDBParam('builder_reference_number',
> > $importdata[0]  );
> >       $newApplication->AddDBParam('builder_number', $importdata[1] );
> >       $newApplication->AddDBParam('homeowner_firstname',
> > $importdata[2]  );
> >       $newApplication->AddDBParam('homeowner_lastname', $importdata[3]
> > );
> >       $newApplicationResult = $newApplication->FMNew();
> > } // end of while
> > fclose($handle);
> >
> >
> > As you can see, I've tried playing around with the usual subjects;
> > max_execution_time, max_input_time, and set_time_limit.
> >
> > My ini info is located at:
> > http://www.bondedbuilders.com/builderportal_development/phpinfo.php
> >
> >
> > I use a MS IIS v6 server, and don't see any options there (though I'm
> > not ruling out the solution being there), and I also wondered if the
> > solution lies in placing some statement in the HTML HEADER of the
> > page,
> > which I haven't found.
> >
> > If you know of any potential solutions to this timeout problem, please
> > offer them up!
> >
> > Thanks!
> >
> > --
> > David Ness,
> > Database Systems Programmer
> >
> > Bonded Builders Warranty Group
> > 1500 Kings Highway
> > Port Charlotte, FL 33980
> > 800.749.0381 x3123 (National Toll Free)
> > 941.255.3274 x3123 (Local)
> > _______________________________________________
> > FX.php_List mailing list
> > FX.php_List at mail.iviking.org
> > http://www.iviking.org/mailman/listinfo/fx.php_list
>
> _______________________________________________
> FX.php_List mailing list
> FX.php_List at mail.iviking.org
> http://www.iviking.org/mailman/listinfo/fx.php_list
>


More information about the FX.php_List mailing list