Go Back   CP Web Hosting - reseller hosting > Server Scripting > PHP
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 07-04-2007, 11:20 AM
Senior Member
 
Join Date: May 2007
Posts: 244
Default time out problem

I have a page that does many regexes with large files and iit's giving me the 60 seconds time out. Is there a good way of avoiding this?
Reply With Quote
  #2 (permalink)  
Old 07-04-2007, 11:22 AM
Senior Member
 
Join Date: Apr 2007
Posts: 311
Default

You can do it several ways..

If the hosting server does not have safe mode enabled, you should be able to use ini_set(max_execution_time, ###);

Otherwise, what you can do, is have the script open the file, and read 100 lines... pause, then reload and read the next 100 lines...
Reply With Quote
  #3 (permalink)  
Old 07-04-2007, 11:23 AM
Senior Member
 
Join Date: May 2007
Posts: 267
Default

Use set_time_limit(99999999);
Reply With Quote
  #4 (permalink)  
Old 07-04-2007, 11:26 AM
Senior Member
 
Join Date: May 2007
Posts: 244
Default

thanx for reply

I have a set of 10 textboxes with 10 url's and my page should extract their titles and metas and lots of other details using regex and it timeouts. I really would like to know if it's possible to run this job with reloads.
Reply With Quote
  #5 (permalink)  
Old 07-04-2007, 11:27 AM
Senior Member
 
Join Date: Apr 2007
Posts: 347
Default

try using (.*?) between title...

and, only get the first half a kb per site
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 02:40 PM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.1.0