473,546 Members | 2,243 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

serious problem need help.

Hi all,
I'm having troubles with my hosting and for a few reasons I can't change.

So here is my problem: I receive XML files with images included in the file.
I've to parse the file, save datas in a database and save images after
resizing them. The whole process takes sometimes more than 10 seconds (the
limit of the scripts) so I've errors.

It's there any way to have an other process that do the image processing
(like an automatic "post" wich send the images) ? How ? Exec isnt' allowed
on the server.

Please help....

Bob

Oct 17 '06 #1
15 1517
Hmm Bob Bedford <bo*@bedford.co mwrote:
images after resizing them. The whole process takes sometimes more
than 10 seconds (the limit of the scripts) so I've errors.
then you should to set new time limit for script execution
--
~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~ ~~~~~~~~~~~~
Ikciu | gg: 718845 | yahoo: ikciu_irsa | www: www.e-irsa.pl

2be || !2be $this =mysql_query();
Oct 17 '06 #2
then you should to set new time limit for script execution

Obviously you guess I can't do it !!! I can't modify anything in the server
settings.

Bob

Oct 17 '06 #3
Hmm Bob Bedford <bo*@bedford.co mwrote:
>then you should to set new time limit for script execution

Obviously you guess I can't do it !!! I can't modify anything in the
server settings.

why?

--
~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~ ~~~~~~~~~~~~
Ikciu | gg: 718845 | yahoo: ikciu_irsa | www: www.e-irsa.pl

2be || !2be $this =mysql_query();
Oct 17 '06 #4

Bob Bedford wrote:
then you should to set new time limit for script execution

Obviously you guess I can't do it !!! I can't modify anything in the server
settings.

Bob
Some hosts let you change the timeout using ini_set, does yours?

If not could you split the processing over two scripts?

In the first script parse the xml file, update database, copy the image
to a temporary file and use $_SESSION to store the temp filename. Then
redirect to the second script using header('Locatio n:') and let the 2nd
script finish off the resizing & database updates

This way you have a whole twenty seconds to play with.

Oct 17 '06 #5
..:[ ikciu ]:. wrote:
Hmm Bob Bedford <bo*@bedford.co mwrote:
>>then you should to set new time limit for script execution

Obviously you guess I can't do it !!! I can't modify anything in the
server settings.


why?
he can't, thats it. Maybe he has a shared hosting service.
Bob, I heared of a method how the script calles itself if the execution-time
reaches a limit. Maybe that could be helpfull. I saw it in a script, but i
don't remember its name, it was about mysql, mysqldump or something like
that.
Stefan
Oct 17 '06 #6
Some hosts let you change the timeout using ini_set, does yours?
No, id doesn't allow using ini_set. (it would be too simple).
If not could you split the processing over two scripts?
That's the way I'm looking for.
>
In the first script parse the xml file, update database, copy the image
to a temporary file and use $_SESSION to store the temp filename. Then
redirect to the second script using header('Locatio n:') and let the 2nd
script finish off the resizing & database updates

This way you have a whole twenty seconds to play with.
It's there any way in PHP to execute (without using location as it changes
page) a new page ? I don't have access to exec()...
My idea is to manage the recording in the database then every time I've new
images, send them to a new script. The main process will do easely in 10
seconds then every process will redim and save the images (time consuming)
and it may also do it in 10 seconds.

Problem: I don't know how to do so (launch an other script without exec)
passing the files (like a normal post or get will do).

Bob

Oct 17 '06 #7

Bob Bedford wrote:
Hi all,
I'm having troubles with my hosting and for a few reasons I can't change.

So here is my problem: I receive XML files with images included in the file.
I've to parse the file, save datas in a database and save images after
resizing them. The whole process takes sometimes more than 10 seconds (the
limit of the scripts) so I've errors.

It's there any way to have an other process that do the image processing
(like an automatic "post" wich send the images) ? How ? Exec isnt' allowed
on the server.

Please help....

Bob
Do you have access to CRON? If so, you could parse the xml upon
retrieval and store the paths to the images to be redimensioned in a
table queue. You could then have a cron script run once a minute or
(as often as necessary) to try and clear out the queue.

Oct 17 '06 #8
Daz

Moot wrote:
Do you have access to CRON? If so, you could parse the xml upon
retrieval and store the paths to the images to be redimensioned in a
table queue. You could then have a cron script run once a minute or
(as often as necessary) to try and clear out the queue.
Another alternative to CRON, would be to create a script that checks if
anything needs to be done every time a page is clicked upon. It can be
as simple as adding a function call or include() to the pages you want
to act as the trigger. It's more of an advantage when you get heavier
traffic on a website, but it's a possibility. I think the best place to
add a trigger, would be to the footer (if you use one) which would be
appended to every page, and trigger last thing, so it wouldn't
interfere with the page generation for the user.

Oct 17 '06 #9

Bob Bedford wrote:
Some hosts let you change the timeout using ini_set, does yours?
No, id doesn't allow using ini_set. (it would be too simple).
If not could you split the processing over two scripts?
That's the way I'm looking for.

In the first script parse the xml file, update database, copy the image
to a temporary file and use $_SESSION to store the temp filename. Then
redirect to the second script using header('Locatio n:') and let the 2nd
script finish off the resizing & database updates

This way you have a whole twenty seconds to play with.
It's there any way in PHP to execute (without using location as it changes
page) a new page ? I don't have access to exec()...
My idea is to manage the recording in the database then every time I've new
images, send them to a new script. The main process will do easely in 10
seconds then every process will redim and save the images (time consuming)
and it may also do it in 10 seconds.

Problem: I don't know how to do so (launch an other script without exec)
passing the files (like a normal post or get will do).
You can curl or sockets to post data to another script

http://uk.php.net/manual/en/ref.curl.php
http://uk.php.net/manual/en/function.fsockopen.php.

The 1st script may timeout waiting for the response, I dont think this
will affect the execution of the 2nd script, as long as the 2nd script
starts before the 1st timeouts. A best guess not a guarantee..

Oct 17 '06 #10

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

Similar topics

142
4220
by: Herr Lucifer | last post by:
As the founder of .NET framework, Microsoft claims that it invention will be the next best platform for programming in a near future. Now it is 2005, ..NET is 5 years old, and can talk and walk for himself with some help of his mum. However, we see the same native office applications are coming out again, and many other tools in SP2 of XP...
2
1575
by: Leveridge Systems INC | last post by:
We're in desperate need of contract help for c++/ linux or Unix based talent. 6 month need .. we have budget for a serious coder.. so the dollars are there. anyways.. may be of help to a group member of friend cheers John.
1
1315
by: iceColdFire | last post by:
Hi, I am into C++ compiler validation since past couple of years. Lately I have grown with a strange feeling...while on the course of my work, I start getting bored and very bored...I have always found C++ to be the highly deserved and superb language. Now I am looking for some real serious C++ development...maybe anything which requires...
12
2001
by: Sunny | last post by:
Hi All, I have a serious issue regarding classes scope and visibility. In my application, i have a class name "TextFile", and also a few other classes like "TotalWords", "TotalLines" and etc.., which are suppose to describe the structure of my main TextFile class. Also i have created some custom collection classes, which only take items of...
10
2388
by: BBFrost | last post by:
We just recently moved one of our major c# apps from VS Net 2002 to VS Net 2003. At first things were looking ok, now problems are starting to appear. So far ... (1) ComboBox.SelectedValue = db_value; If the db_value was not included in the ComboBox value list the ComboBox.SelectedIndex used to return -1, Now the very same code is
2
1569
by: WJ | last post by:
This post is a follow up from the original post dated Oct 16, 2004 "I have this problem, pls help!" created by Paul FI. These bugs are rather serious and we would like to know how to get around. Environment: Windows XP Pro. IIS-5 and Sp2. Visual Studio.Net 2003 EA edition. ..NetFW 1.1 Here goes:
1
3506
by: Juan Alvarez | last post by:
hi, everyone, I have a serious problem here, i need to make a program using Regular Expressions in C in Dev-C++. I found some tutorials but all the links are broken :S i have 5 days looking for them and im loosing the hope :(. I need to make that program in less than 2 days. i downloaded some regex.h and regex.c and test programs. When i...
69
3200
by: Edward K Ream | last post by:
The pros and cons of making 'print' a function in Python 3.x are well discussed at: http://mail.python.org/pipermail/python-dev/2005-September/056154.html Alas, it appears that the effect of this pep would be to make it impossible to use the name 'print' in a backward compatible manner. Indeed, if a program is to compile in both Python...
1
1284
by: Johnson545236 | last post by:
I need some serious help. I'm extremely new to vs 2003 .net and I have to work with CRM, sigh. I am trying my first program and I get this error: Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately. ...
1
2055
by: Guy Macon | last post by:
Serious Security Flaw in Google Chrome: http://www.readwriteweb.com/archives/security_flaw_in_google_chrome.php -- Guy Macon <http://www.GuyMacon.com/>
0
7435
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...
0
7698
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
7794
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6030
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...
1
5361
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...
0
3472
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1922
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1046
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
747
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.