The site.php file is just for configuration and initialization. Here's the file in its entirety, with excess comments removed for clarity:

<?php
/* $Id: site.php,v 1.7 2002/10/16 07:05:08 fong Exp $ */

// define full filesystem path to includes directory for IIS compatibility
// with virtual hosting setup
define('INCLUDES_PATH', '.;d:/inetpub/includes');

// define the PEAR DB DSN to the database
define('DB_DSN', 'odbc://name:pass@systemdsn');

// attempt to use persistent DB connections?
define('DB_PCONNECT', true);

// define name of session to use
define('SESSION_NAME', 'ac');

// define the number of search results each page will display
define('PAGE_SIZE', 25);


/**
* DO NOT MODIFY ANYTHING BELOW THIS LINE *
*
*/

// we must set the include path for Windows IIS servers
if (!ini_set('include_path', INCLUDES_PATH)) {
exit('Fatal error setting include path.');
}

// get frequently used functions and files
require_once('DB.php');
?>

I'm not sure this has anything to do with site.php since set_time_limit is being called before I include site.php and PHP indicates that the script is stopping at the set_time_limit line. Moving the set_time_limit function call to the very top of the file (i.e., above the comments) makes PHP stop even earlier in the execution process (line 1 instead of line 3), which sort of indicates to me that it's not one of those weird, unrelated errors that PHP can spit out from time to time. Everything I've read indicates that I'm doing the right thing, but there still seems to be some variable I'm missing here which is completely frustrating me. :-/

Oh yes, I forgot to mention originally that this is running on a Windows 2000 setup accessing a Microsoft SQL Server 2000 database, if that makes any difference.

-f


On Friday, October 25, 2002, at 11:41 am, Michael Hazelden wrote:

What happens when you execute the site.php seperately?

Does it give you a better error as to where in the file the execution fails?

Michael.

-----Original Message-----
From: derek fong [mailto:php-win@;subtitled.com]
Sent: 25 October 2002 15:54
To: Michael Hazelden
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP-WIN] Problem with set_time_limit() and uploading large
f iles


Hi Michael,

Unfortunately, that is not the case. The site is using custom-built
code and functions from the PEAR repository, and this is the only
occurrence of a set_time_limit() function call. :( I don't think PEAR
uses set_time_limit() anywhere either, but I'll do a grep for that and
see what turns up...

-f


On Friday, October 25, 2002, at 03:43 am, Michael Hazelden wrote:

Derek - I was battling with this very problem myself ... but in the
end - I
discovered that in a module I'd downloaded - there was (buried under
5000
lines of code) another set_time_limit function. I removed that and my
problem went away.

Check over site.php - follow the code path exactly and I'm sure you'll
find
one.

Michael.

-----Original Message-----
From: derek fong [mailto:php-win@;subtitled.com]
Sent: 25 October 2002 03:55
To: [EMAIL PROTECTED]
Subject: [PHP-WIN] Problem with set_time_limit() and uploading large
files


Hi,

I am having a major problem getting set_time_limit() to work at all
with PHP 4.2.3 running as a CGI program under IIS. I have a script
that accepts large files for upload, with the following lines at the
top of the script:

<?php
// let this script take as long as it needs to complete its work
// and ignore if user hits stops button in his browser
set_time_limit(0);
ignore_user_abort(true);

// include site-wide configs and other include files
require_once('../includes/site.php');
...

If the file upload takes longer than 30 seconds, PHP bombs out with the
following error:

"Fatal error: Maximum execution time of 30 seconds exceeded in
D:\InetPub\test.php on line 3"

I've also tried adding:

ini_set('max_execution_time', 60000);

before the set_time_limit() function, but to no avail. PHP is not
running in safe mode. Does anyone have any ideas why this is not
working as expected? I'm sure it's something obvious, but I don't know
what it is.

Thanks in advance,

-f


--
Derek Fong
Web Application Developer
subtitle designs inc. <http://www.subtitled.com/>

"Mistakes are the portals of discovery." --James Joyce
GPG key/fingerprint available upon request <<

--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


_____________________________________________________________________
This message has been checked for all known viruses by the
MessageLabs Virus Control Centre.

This message has been checked for all known viruses by the MessageLabs
Virus Control Centre.

	
*********************************************************************

Notice:  This email is confidential and may contain copyright material
of Ocado Limited (the "Company"). Opinions and views expressed in this
message may not necessarily reflect the opinions and views of the
Company.
If you are not the intended recipient, please notify us immediately
and delete all copies of this message. Please note that it is your
responsibility to scan this message for viruses.

Company reg. no. 3875000.  Swallowdale Lane, Hemel Hempstead HP2 7PY

*********************************************************************



--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


_____________________________________________________________________
This message has been checked for all known viruses by the
MessageLabs Virus Control Centre.

This message has been checked for all known viruses by the MessageLabs Virus Control Centre.


*********************************************************************

Notice: This email is confidential and may contain copyright material of Ocado Limited (the "Company"). Opinions and views expressed in this message may not necessarily reflect the opinions and views of the Company.
If you are not the intended recipient, please notify us immediately and delete all copies of this message. Please note that it is your responsibility to scan this message for viruses.

Company reg. no. 3875000. Swallowdale Lane, Hemel Hempstead HP2 7PY

*********************************************************************

--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to