Current location: Hot Scripts Forums » Programming Languages » PHP » script timing out when adding entries to database


script timing out when adding entries to database

Reply
  #1 (permalink)  
Old 04-24-07, 07:33 PM
Jay6390's Avatar
Jay6390 Jay6390 is offline
Code Master
 
Join Date: Apr 2007
Location: United Kingdom
Posts: 1,330
Thanks: 0
Thanked 0 Times in 0 Posts
script timing out when adding entries to database

Hi, i have a large .csv file that is read, data is taken from where is needed and then the data is sent to be added to the database. this is using php. however when i run the script, it works fine for the first 700 or so entries, and then dies on me. the script has no errors with regard to adding the data, it has been checked thoroughly. i suspect it is to do with a timeout. any suggestions?

Thanks
Jay
__________________
Useful Tutorials
[ PHP Video-1-2-3 ] [ MySQL 1-2-3 ]
For any php function reference type

www.php.net/FunctionName
Reply With Quote
  #2 (permalink)  
Old 04-24-07, 07:37 PM
Nico's Avatar
Nico Nico is offline
Community Leader
 
Join Date: Sep 2005
Location: Spain
Posts: 8,075
Thanks: 11
Thanked 88 Times in 83 Posts
Try setting this at the top of your script:
PHP Code:

set_time_limit(0); 

Reply With Quote
  #3 (permalink)  
Old 04-24-07, 08:31 PM
Jay6390's Avatar
Jay6390 Jay6390 is offline
Code Master
 
Join Date: Apr 2007
Location: United Kingdom
Posts: 1,330
Thanks: 0
Thanked 0 Times in 0 Posts
once again nico i thank you
__________________
Useful Tutorials
[ PHP Video-1-2-3 ] [ MySQL 1-2-3 ]
For any php function reference type

www.php.net/FunctionName
Reply With Quote
  #4 (permalink)  
Old 04-24-07, 08:34 PM
Nico's Avatar
Nico Nico is offline
Community Leader
 
Join Date: Sep 2005
Location: Spain
Posts: 8,075
Thanks: 11
Thanked 88 Times in 83 Posts
No problem.

I'm moving this to PHP though, 'cause it has not much to do with databases.
Reply With Quote
  #5 (permalink)  
Old 04-24-07, 08:47 PM
Jay6390's Avatar
Jay6390 Jay6390 is offline
Code Master
 
Join Date: Apr 2007
Location: United Kingdom
Posts: 1,330
Thanks: 0
Thanked 0 Times in 0 Posts
Red face

yeh, when i ask mysql and php questions i jus take a guess at which to post in
__________________
Useful Tutorials
[ PHP Video-1-2-3 ] [ MySQL 1-2-3 ]
For any php function reference type

www.php.net/FunctionName
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
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

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

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
CSS Border Width Question. nova912 CSS 6 09-07-06 09:13 AM
database script dizzlelab Script Requests 1 07-05-06 09:50 AM
updating database script xParablex Script Requests 1 01-19-06 10:10 PM
error when creating database tables with php script spiroth10 PHP 4 01-06-04 03:59 PM


All times are GMT -5. The time now is 06:01 AM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.