srinivasa Posted March 26, 2010 Report Share Posted March 26, 2010 Here i have attached a file name prime.php ,basically am reading input from a form and check whether no is prime or not....there is problem with code, its really working well for small nos upto 10(user input),if user enter above 10 like 11,100...its showing the following error Fatal error: Maximum execution time of 30 seconds exceeded in C:\wamp\www\prime.php on line 25 Kindly i request you to have a look at code, n suggest me solution. prime.php Quote Link to comment Share on other sites More sharing options...
krillz Posted March 26, 2010 Report Share Posted March 26, 2010 Here i have attached a file name prime.php ,basically am reading input from a form and check whether no is prime or not....there is problem with code, its really working well for small nos upto 10(user input),if user enter above 10 like 11,100...its showing the following error Fatal error: Maximum execution time of 30 seconds exceeded in C:\wamp\www\prime.php on line 25 Kindly i request you to have a look at code, n suggest me solution. It's because it takes PHP more than 30 seconds to reach and check that number, and as the maximum excecution time for a script is set to 30 seconds the code is terminated before it gets there. One way is to bumbp the time up in your php.ini config file; check for the maximum excecution time limit. Or as these types of stuff really aren't suited for doing using php parser a long with the the browser approach. I would suggest you install php as a shell extension, that way you can run it in the terminal/command prompt instead and not having to mind the maximum excecution time. Quote Link to comment Share on other sites More sharing options...
srinivasa Posted March 26, 2010 Author Report Share Posted March 26, 2010 thanks a lot... Quote Link to comment 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.
Note: Your post will require moderator approval before it will be visible.