473,668 Members | 2,308 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

scripts and timout

hi all,

I have this problem...

I have created a picturealbum. The user can upload about 20 pictures
simultaniously. My album automaticly reduces the image size when too big
(done with GD module).

I have 2 classes Album.class and UploadPicture.c lass.
the uploadPicture class deals with the reducing stuff. The Album class is
mainly a controller/database insert class (no heavy duty thus). When a user
uploads the images a alum object is created and inside the album object a
uploadpicture object is created. somewhere in the Album class a function
like this is called
for ($i=0;$i<20;^$+ +)
{
$this->UploadPictur e->putPicture()
}
So the images are altered 20 times. This process can take some time cerainly
when the images are somewhat heavy. In fact, sometimes only some images have
been alered. I 'm prity sure that this is caused by the script execution
time limit.

The trick would be to foul php that it is is not 1 task but 20 seperate.
Maybee someone can help me with this?

kind regards
Stijn

Jul 17 '05 #1
1 1335
On Thu, 04 Mar 2004 15:54:56 GMT, "Stijn Goris" <me*****@hotmai l.com> wrote:
So the images are altered 20 times. This process can take some time cerainly
when the images are somewhat heavy. In fact, sometimes only some images have
been alered. I 'm prity sure that this is caused by the script execution
time limit.


So extend it with set_time_limit( ). If you can't, then break it into multiple
steps, or spawn a background process (either directly, through a daemon process
of some sort, or through your OS scheduler, e.g. 'at' or 'cron').

--
Andy Hassall <an**@andyh.co. uk> / Space: disk usage analysis tool
<http://www.andyh.co.uk > / <http://www.andyhsoftwa re.co.uk/space>
Jul 17 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
3650
by: Jeff Wagner | last post by:
I have a project of converting numerous DOS cmd shell scripts to Python. Is there a tutorial to getting started? Thanks, Jeff
2
12737
by: RJ | last post by:
We currently send product releases to our customers, and often have to include scripts that need to be ran on the Oracle databases (also do it for SqlServer customers, but we use a different set of scripts for that). Some of the Sql scripts can be quite long, and so we break them out to their own script files and call them all from one main ..sql file, using sqlplus to execute it all. The admin would run the file like:
2
2536
by: Matt | last post by:
I am having trouble with the HttpWebRequest.GetRequestStream method. I am posting data to my web server running NT4 iis4 using a loop. So every time the loop executes I want it to post data to my web page. It work the first 2 times the loop iterates, but on the third time around it gives me a timout error. The line it gives me an error on is: --Stream newStream = myRequest.GetRequestStream();--
7
4288
by: ergobob | last post by:
Hello, I have two small PHP scripts running on a test page at: http://www.usernomics.com/ergonomic-products-accessories5.html Both scripts work perfectly when there is one script on a page. However, if I place two on the page (one above the other), the second script will not render. I get no PHP error messages - the script will just not render. I think the PHP Scripts are OK as they were automatically generated by RSS
0
962
by: Eyal Sharabi Horwitz | last post by:
im trying to use the sqlhelper.filldataset on a few tables with querys that return num of rows ranging from 16 to just shy of 6000, and it always fails to load my last (and largest table) because of a timeout expired exception. is there anyway to change the timout settings for this function? or perhaps some other way to avoid this rather annoining little error?
0
1105
by: Perecli Manole | last post by:
I have a need for logged in users to be timed out after 20 min of inactivity. This works well with the built in functionality that ASP.NET provides except for a certain situation. I have a reminder system in one of the stationary frames that polls the server every several minutes to see if a reminder is due. The polling mechanism uses a client side ActiveXObject("Microsoft.XMLHTTP") object so the whole page doesn't refresh constantly....
2
1534
by: Bernie Yaeger | last post by:
I'm getting the following error - not always, only randomly - when I run a certain routine (the routine is a simple executenonquery and it appears to complete despite the message) against sql server 2000: "timout expired. The timeout period elapsed prior to completion of the operation or the server is not responding" Anyone have any idea what causes this and how to avoid it? Thanks for any help.
0
900
by: Agnes | last post by:
the application run in my office is very well. However, as it move to the client's company, Timeout and general network error always happend. We found that the firewall had a default setting "if it detect a idle connection , it will cut it". So, if the user open the application and leave it alone around 2-3 mins, When he back to the system, "General network Error ","timeout" will be occured. i had set the connection timout "30", it seems...
1
1543
by: ponsibabu | last post by:
We have several scripts for sale. We are selling them at reasonable prices and willing to work around your budget. For more information please contact totascriptz@yahoo.com with "Scripts" as the subject line. We have all types of scripts. We are very flexible with pricing and try to work around your budget. Some of our scripts are mentioned below. For more information please contact totascriptz@yahoo.com with "Scripts" as the...
8
2377
by: Alan Isaac | last post by:
Suppose I have a directory `scripts`. I'd like the scripts to have access to a package that is not "installed", i.e., it is not on sys.path. On this list, various people have described a variety of tricks they use, but nobody has proposed a pretty way to allow this. I am therefore assuming there is not one. (?) How about allowing a `scripts.pth` file in such a `scripts` directory, to work like a path configuration file?
0
8459
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8374
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
8575
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7398
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6206
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5677
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4202
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4373
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2018
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.