ClemenzoDK Posted May 28, 2012 Share Posted May 28, 2012 Hello, I've made a script that runs a numerous of JSON request to an external source. The JSON data given is being ripped and stored in a MySQL database. Since i'm only testing the script, it's currently being run on my own PC. I've calculated that it will take approx. 55-60 minutes before the script is finished ripping of all the data. But the script dies out after only 120 seconds, without any errors given. I'm using XAMPP on my own PC with the following specs.: + Apache 2.2.17 + MySQL 5.5.8 (Community Server) + PHP 5.3.5 (VC6 X86 32bit) + PEAR I've set the following to unlimited in PHP.ini: + max_execution_time + max_input_time + memory_limit I've also added set_time_limit() to the code without any help. I hope you guys wanna help me out, thanks.. Quote Link to comment https://forums.phpfreaks.com/topic/263288-script-dies-after-120-seconds/ Share on other sites More sharing options...
Barand Posted May 29, 2012 Share Posted May 29, 2012 run it from the command line. Quote Link to comment https://forums.phpfreaks.com/topic/263288-script-dies-after-120-seconds/#findComment-1349372 Share on other sites More sharing options...
ClemenzoDK Posted May 30, 2012 Author Share Posted May 30, 2012 Just tried running it from the command line, and once again the script died exactly after 120 seconds. Can it have something to do with the Apache settings? Quote Link to comment https://forums.phpfreaks.com/topic/263288-script-dies-after-120-seconds/#findComment-1349875 Share on other sites More sharing options...
.josh Posted May 30, 2012 Share Posted May 30, 2012 did you restart apache after you made the change to php.ini? Quote Link to comment https://forums.phpfreaks.com/topic/263288-script-dies-after-120-seconds/#findComment-1349879 Share on other sites More sharing options...
ClemenzoDK Posted May 30, 2012 Author Share Posted May 30, 2012 Thanks for the fast reply. Yes I restarted both Apache and MySQL. Quote Link to comment https://forums.phpfreaks.com/topic/263288-script-dies-after-120-seconds/#findComment-1349880 Share on other sites More sharing options...
ClemenzoDK Posted June 1, 2012 Author Share Posted June 1, 2012 It amazes me that no one has experienced the same problem. I've searched through all MySQL and all Apache configs, but without finding anything that relates to 120 seconds. I've also run a phpinfo(), without any luck. If you guys have any suggestions, please post them - I'm running dry on ideas to solve this. Quote Link to comment https://forums.phpfreaks.com/topic/263288-script-dies-after-120-seconds/#findComment-1350350 Share on other sites More sharing options...
.josh Posted June 1, 2012 Share Posted June 1, 2012 Make sure you are editing the right php.ini file, some all-in-one programs have multiple php.ini files. Also check your mysql config file, maybe it is the mysql execution timing out, not php Quote Link to comment https://forums.phpfreaks.com/topic/263288-script-dies-after-120-seconds/#findComment-1350370 Share on other sites More sharing options...
RobertP Posted June 1, 2012 Share Posted June 1, 2012 http://php.net/manual/en/function.set-time-limit.php nevermind, i can see you have attempted this already :-\ Quote Link to comment https://forums.phpfreaks.com/topic/263288-script-dies-after-120-seconds/#findComment-1350396 Share on other sites More sharing options...
ClemenzoDK Posted June 1, 2012 Author Share Posted June 1, 2012 Make sure you are editing the right php.ini file, some all-in-one programs have multiple php.ini files. Also check your mysql config file, maybe it is the mysql execution timing out, not php I double-checked by running phpinfo() everytime I edited the configs, I also checked both the MySQL and Apache cfg's without luck. UPDATE: I tried the script on my new dedicated server, and it worked perfectly. I then copy-pasted all the configs from my local XAMPP folders, and it still worked perfectly. So I guess it has something to do with my PC in someway, though it's not a heavy script. Anyway, thanks for all the suggestions. Quote Link to comment https://forums.phpfreaks.com/topic/263288-script-dies-after-120-seconds/#findComment-1350403 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.