[FX.php List] RE: 5 minute timeout?

David Ness dness at bondedbuilders.com
Tue Aug 29 14:27:23 MDT 2006


Drew,

Thanks for the info. Unfortunately, I work with an IT manager that will
not consider non-Microsoft products. He's said no to Apache many times
before.

I did find something that has shown the first signs of providing a
solution:

// Batch file Script to set CGI timeout to 30 minutes in Windows 2003
IIS. This prevents IIS from terminating a PHP thread in Windows when PHP
is running in CGI mode.

@rem --- set IIS cgi timeout to 30 minutes ---
cscript.exe c:\inetpub\adminscripts\adsutil.vbs set w3svc/cgitimeout
1800
@pause

// End script

See the complete discussion here:

http://www.activecampaign.com/support/forum/showthread.php?t=1253

As soon as I did this, I increased my maximum records imported from 330
to about double that number, but still not ALL the records. Further
increases in the "1800" cgitimeout number above yielded no further
improvement. This is the first thing I've done that resulted in improved
functionality.

I'm playing with the other php.ini settings again to see if now that
IIS's 5-minute CGI limit is breached, other settings can have an affect.

I'll let the list know if I resolve this problem.


--
David Ness,
Database Systems Programmer

-----Original Message-----
From: fx.php_list-bounces at mail.iviking.org
[mailto:fx.php_list-bounces at mail.iviking.org] On Behalf Of Dr. Andrew J.
Fallon
Sent: Tuesday, August 29, 2006 2:12 PM
To: fx.php_list at mail.iviking.org
Subject: [FX.php List] RE: 5 minute timeout?

I had this trouble too with WinXP and Win2003.
IIS would always time out. I could not solve the issue With changing the
timeout function in php.ini or using set_time_limit() Or any changes in
the IIS properties. Eventually I installed Apache2 And have not had one
timeout error at all. This isn't so much a solution as an alternative.
But I think it's a good alternative.

Drew

Message: 2
Date: Tue, 29 Aug 2006 11:12:15 -0400
From: "David Ness" <dness at bondedbuilders.com>
Subject: [FX.php List] 5 minute timeout?
To: "FX.php Discussion List" <fx.php_list at mail.iviking.org>
Message-ID:
	
<5CF517C96A6D704984FB81D6D61383A20103F9B3 at exchange.bondedbuilders.com>
Content-Type: text/plain;	charset="us-ascii"

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)


------------------------------ 

-- 

No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.405 / Virus Database: 268.11.6/430 - Release Date:
8/28/2006
 

_______________________________________________
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