Reputation: 19
laravel 5 giving me "Operation timed out" after 30 second on hostgator dedicated server.
But I change the max time to 3600 second and Its working without error on my localhost
my code is
$total = '';
for ($i=0;$i<60;$i++){
$total .= $i;
sleep(1);
}
echo $total;
links http://oemsys.net/test2
No I use dedicated server so I think i must add in my codes only
safe mode = off
memory_limit = 256M
max_execution_time = 3600
max_input_time = 60
post_max_size = 64M
upload_max_filesize = 64M
enable_dl = on
Upvotes: 0
Views: 2009
Reputation: 67
because its looping 60 times it need 60secs,
are you shared hosting hostgator? if yes, currently hostgator have some PHP settings that cannot be changed..
safe mode = Off (cannot adjust)
memory_limit = 256M (MAXIMUM)
max_execution_time = 30 (MAXIMUM in seconds)
max_input_time = 60 (MAXIMUM in seconds)
post_max_size = 64M (MAXIMUM)
upload_max_filesize = 64M (MAXIMUM)
enable_dl = Off (cannot adjust)
source : http://support.hostgator.com/articles/pre-sales-policies/php-settings-that-cannot-be-changed
my suggestions why using sleep? or try upgrade to VPS or other shared hosting can edit your PHP.ini
Upvotes: 1