edwardoit Posted January 3, 2008 Share Posted January 3, 2008 Guys i just have a question regarding this prob. My database is too large. about 2million records a month All my datatypes are varchar, because i just parsed the raw data from a sqlserver My pc is quite old. And my query.. i don't think theres a problem with it.. When im doing a test with my php/mysql, im recieving an error message regarding the query takes too long to perform. Is it the performance of the Hardware specs or what??? ??? What would be the best specs for a server. Just for localhost. Quote Link to comment https://forums.phpfreaks.com/topic/84251-solved-error-message-after-60-seconds/ Share on other sites More sharing options...
rajivgonsalves Posted January 3, 2008 Share Posted January 3, 2008 What is the error you get can you cut and paste the exact error message ? Quote Link to comment https://forums.phpfreaks.com/topic/84251-solved-error-message-after-60-seconds/#findComment-429074 Share on other sites More sharing options...
kopytko Posted January 3, 2008 Share Posted January 3, 2008 I suppose you get a timeout error. What you can do? You can run your script not in browser but in command line or you can use limit function in your sql statement. Another way is to change in php.ini max_execution_time to some higher value. If you are looking for new hardware for local machine, you can buy standard computer (2 - 3 GHz processor, 2 GB ram) but new machine will not help you with timeout error. Quote Link to comment https://forums.phpfreaks.com/topic/84251-solved-error-message-after-60-seconds/#findComment-429086 Share on other sites More sharing options...
rajivgonsalves Posted January 3, 2008 Share Posted January 3, 2008 if its a php timeout error you can use @set_time_limit(0); on the top of your php script that will allow the script to run longer... without any time limit... Quote Link to comment https://forums.phpfreaks.com/topic/84251-solved-error-message-after-60-seconds/#findComment-429087 Share on other sites More sharing options...
edwardoit Posted January 3, 2008 Author Share Posted January 3, 2008 Fatal error: Maximum execution time of 60 seconds exceeded in filename.php on line 250. something like this... where should i put the @set_time_limit(0); ??? on the very first line of my php? by the way... after i emptied all the records and load some few... it works. but i'll face the same problem after i load the over 2 million of records with no index Quote Link to comment https://forums.phpfreaks.com/topic/84251-solved-error-message-after-60-seconds/#findComment-429110 Share on other sites More sharing options...
rajivgonsalves Posted January 3, 2008 Share Posted January 3, 2008 on top of the php file and tell me if it works Quote Link to comment https://forums.phpfreaks.com/topic/84251-solved-error-message-after-60-seconds/#findComment-429113 Share on other sites More sharing options...
edwardoit Posted January 9, 2008 Author Share Posted January 9, 2008 It works so fine. Before I didn't put this code: @set_time_limit(0); I got the Fatal Error. But then after that, i tried to put this line on top of php. Error Message no more!!! That solve this prob! Thank you Rajiv! Your C 8) L Why there's no bowing smiley here... Quote Link to comment https://forums.phpfreaks.com/topic/84251-solved-error-message-after-60-seconds/#findComment-434346 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.