Jump to content

Timeout


han003

Recommended Posts

Hi!

 

Im currently inserting multiple images by running a for loop and then inserting them into my database.

Problems I have is

 

If the inserting takes more than 10secs

If I try to insert more than 20 images at once, if I select 23 for insertion only 20 is inserted.

 

I dont think I can access the ini file since my database is at a webhost.

Link to comment
https://forums.phpfreaks.com/topic/273676-timeout/
Share on other sites

Forbidden

 

You don't have permission to access /upload.php on this server.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

 

-------------------------------------

 

Thats what happens if it isnt finished uploading within 10 secs of pressing the submit button in my form

and no cant have them in FTP, need database

and need timeout to be gone or increased or anythiong!!

Link to comment
https://forums.phpfreaks.com/topic/273676-timeout/#findComment-1408457
Share on other sites

Hi Hann

You said you're using a loop, therefore you must be using PHP or something to process the request.

 

As such you can not overide the php.ini setting with php calls like set_time_limit(300) as this only at script level. But you can try to edit the php.ini setting (max_execution_time) with php this may work because in php max_execution_time is a set anywhere "changeable mode value" .

<?php

ini_set('max_execution_time','300');

//default is 30 (30 secs);

?>

 

Not sure if it will work, but can't hurt to try.

 

In general people try to offer advice even when they don't understand the question. While Jessica gave you sound advice your question wasn't how is the best way to handle X problem. It was specifically asking how to edit php time limits. This is a valid question for many scenarios. While it is not normal to save images as blobs() it can be done and in some cases makes perfect sense.

Link to comment
https://forums.phpfreaks.com/topic/273676-timeout/#findComment-1408548
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.