hii

While i am accessing a PHP web page,time out occurs.
But the max_execution_time in php.ini is set to 300 seconds.
But timeout occurs after 2 or 3 minutes.
How can solve this pblm.
Please help me

Recommended Answers

All 5 Replies

It means your page took too long to load and exceeded to time limit. Try setting the timeout in php.ini to zero for infinite timing or setting it to something like 99999 seconds.

But how can i set this timeout ?

But how can i set this timeout ?

By judging your first post I thought you already did set it to 300. But anyway, place the following code at the very top of your php file:

<?
set_time_limit(0); //number of seconds and zero for infinite
Member Avatar for Rhyan

keep in mind that if a wrong if/else or while loop has been written, you can eventually crash the server with an infinite request, because a wrong loop that loads itself will continue forever..., so you better check the error log prior to modifying time limit.

yes..
and also look at query optimization and indexing,if you are using joins and complex query in your page...
Minimize your loop as make as possible..this is better on rather to set a time for infinite...

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.