Hi guys, I am a bit stuck and after some help. I studying through a book called practical web 2.0 applications. Through this book you build a full application as you are learning. Now I have got to a section and can't go further. When I go to insert data into MySQL via a form, I get this error message:

Fatal error: Maximum execution time of 30 seconds exceeded in C:\wamp\www\phpweb20\htdocs\Zend\Db\Statement\Pdo.php on line 229

Now I have gone through the book over and over again re-checking everything, and I have followed it right to the nail. Can someone please tell me what are the usual causes of this kind of error, so I know where to look. I have coded about 20 odd scripts and don't know where to look. Thank you in advance:)

Comments
Richie is a guy with nice attitude,He has great sense of understanding problems, I Just say to hime GREAT

Check your loops. I guess you have an infinite loop somewhere OR maybe the queries to fetch the data from the table is taking a long time. Umm.. I think the problem is with the loops!

Well I'm not sure as the code I've written so far doesn't contain any loops. Unless it is occurring in the Zend framework. Maybe the queries are taking a long time. Would you know how to extend the maximum exceed time in the Zend framework?

I can't find it in the pdo.php file anywhere, but that is where the exception is coming from!

You can extend the maximum execution time by changing max_execution_time in php.ini to whatever amount you want. You can remove the time limit by setting it to 0. If you want to change it during the runtime, use set_time_limit(0); in your script.

haha so that is where you change it, all this time I've been learning PHP and never knew that, well they say you learn something new everyday lol. Thanks for your help Naveen, I'll let you know if I get this problem solved:)

I found the problem Naveen, silly me didn't have my SMTP settings correct in the php.ini file and therefore was waiting for a response back from the server, because it wasn't receiving it, the script maxed out. But it's all working now:)

This question has already been answered. Start a new discussion instead.