billybrag Posted June 14, 2004 Share Posted June 14, 2004 At the site i am working on if i click on the nonFiction category the page takes ages to load and then (im guessing) times out, but i have no idea why this is the error Fatal error: Maximum execution time of 30 seconds exceeded in /home/www/mysite/includes/modules/new_products.php on line 61 heres the site to see what i mean (click on "non fiction") Here "because it'll hurt more"- the greatest film of all time? Link to comment Share on other sites More sharing options...
♥bruyndoncx Posted June 14, 2004 Share Posted June 14, 2004 perhaps you have a problem with a particular record that is locked for editing ? what's the query on line 61 ? KEEP CALM AND CARRY ON I do not use the responsive bootstrap version since i coded my responsive version earlier, but i have bought every 28d of code package to support burts effort and keep this forum alive (albeit more like on life support). So if you are still here ? What are you waiting for ?! Find the most frequent unique errors to fix: grep "PHP" php_error_log.txt | sed "s/^.* PHP/PHP/g" |grep "line" |sort | uniq -c | sort -r > counterrors.txt Link to comment Share on other sites More sharing options...
billybrag Posted June 14, 2004 Author Share Posted June 14, 2004 i just tried it again and it said Fatal error: Maximum execution time of 30 seconds exceeded in /home/www/mystore/includes/functions/database.php on line 106 "because it'll hurt more"- the greatest film of all time? Link to comment Share on other sites More sharing options...
billybrag Posted June 14, 2004 Author Share Posted June 14, 2004 this is the code around line 61 of new_products ?if ($num_rows > 0) { ? ? ? ? ? ?while ($pCount < $max_new_products) { ? ? ? ? ?// choose a random row ? ? ?$random_product = ''; ? ? ?$random_row = tep_rand(0, ($num_rows - 1)); ? ? ?tep_db_data_seek($new_products_query, $random_row); ? ? ?$random_product = tep_db_fetch_array($new_products_query); ? ? ?// see if found already, if not use else skip ? ? ?$found = 0; ? ? ?for ($ii=0; $ii < $pCount; $ii++) { ? ? ? ?if ($found_products[$ii] == $random_product['products_id']) { ? ? ? ? ?$found = 1; ? ? ? ? ?break; ? ? ? ?} ? ? ?} and this is the code for 106 of database function tep_db_data_seek($db_query, $row_number) { "because it'll hurt more"- the greatest film of all time? Link to comment Share on other sites More sharing options...
♥bruyndoncx Posted June 14, 2004 Share Posted June 14, 2004 tep_db_data_seek will return true is OK, false otherwise. Could it be that you only have 1 new product, $random_row being 0 and causing error ? Can you add additional statements to check the return value and only execute the next statements when return was true ? KEEP CALM AND CARRY ON I do not use the responsive bootstrap version since i coded my responsive version earlier, but i have bought every 28d of code package to support burts effort and keep this forum alive (albeit more like on life support). So if you are still here ? What are you waiting for ?! Find the most frequent unique errors to fix: grep "PHP" php_error_log.txt | sed "s/^.* PHP/PHP/g" |grep "line" |sort | uniq -c | sort -r > counterrors.txt Link to comment Share on other sites More sharing options...
billybrag Posted June 14, 2004 Author Share Posted June 14, 2004 tep_db_data_seek will return true is OK, false otherwise.Could it be that you only have 1 new product, $random_row being 0 and causing error ? Can you add additional statements to check the return value and only execute the next statements when return was true ? sorry but that means nothing :( there are two products in that category "because it'll hurt more"- the greatest film of all time? Link to comment Share on other sites More sharing options...
billybrag Posted June 14, 2004 Author Share Posted June 14, 2004 just tried it again and its now saying the same but new_products.php on line 57 i am getting very confused "because it'll hurt more"- the greatest film of all time? Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.