Jump to content

Recommended Posts

What are you doing inside the loop? Looping over 100 items would take almost no time at all.

 

Disabling the script's time limit is almost always the wrong solution, and depending on the setup may not even work. For instance a hosting provider may kill a script that runs too long and that'd be entirely out of your control.

 

You need to re-design your script so it can execute within the time limit and/or break up the work across multiple runs.

Link to comment
https://forums.phpfreaks.com/topic/305340-script-timeout/#findComment-1552671
Share on other sites

The default timeout for a php script is 30 seconds.   That is a long time.  Is this script batch/conversion oriented?  If you are running it with command line php (php -f) then it is frequently the case that php is configured with a different php.ini than the one that is used by the webserver setup, if you are using Apache.  This would explain why your setting changes are not being reflected.  If you are running this through a web server via a url, then I also have to warn that any changes you make will not be reflected without a restart of apache.

 

The fact that I have to ask you these questions should help you understand that your question is missing vital information needed in order to help you.  

Link to comment
https://forums.phpfreaks.com/topic/305340-script-timeout/#findComment-1552672
Share on other sites

Thanks. I have gone through the code and manged to speed it up a bit. It is definitively doing more before collapsing in a heap. I think the main problem that is taking the time up is resizing and storing umpteen images per Property. As many as 9 or 10 in some cases. I am going to ask if he needs that many

Link to comment
https://forums.phpfreaks.com/topic/305340-script-timeout/#findComment-1552677
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.