Timeout's while uploading

Need help installing PHP, configuring a script, or configuring a server? Then come on in and post your questions! We'll try to help the best we can!

Moderator: General Moderators

Post Reply
hellfish
Forum Newbie
Posts: 8
Joined: Wed Nov 06, 2002 12:48 pm
Contact:

Timeout's while uploading

Post by hellfish »

Hi, I've been cracking my head with this one, the script worked fine before updating PHP to v5.0.4, now all I get is the 30 seconds Timeout.

This is my php.ini

Code: Select all

;;;;;;;;;;;;;;;;
; File Uploads ;
;;;;;;;;;;;;;;;;

; Whether to allow HTTP file uploads.
file_uploads = On

; Temporary directory for HTTP uploaded files (will use system default if not
; specified).
;upload_tmp_dir = C:\PHP\uploadtemp  ; temporary directory for HTTP uploaded files (will use system default if not specified)

; Maximum allowed size for uploaded files.
upload_max_filesize = 4M
does anyone have any ideia of what I could do to fix this?
User avatar
s.dot
Tranquility In Moderation
Posts: 5001
Joined: Sun Feb 06, 2005 7:18 pm
Location: Indiana

Post by s.dot »

take a look at set_time_limit, setting your time in seconds.

set_time_limit(0); would make the script execution time unlimited, unless you're running PHP in safe mode.. In which case you'd have to include max_execution_time amd max_input_time values in your php.ini file.
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

there is a posting time limit setting as well.. check into that: http://php.net/features.file-upload
hellfish
Forum Newbie
Posts: 8
Joined: Wed Nov 06, 2002 12:48 pm
Contact:

Post by hellfish »

I could really try that but do you think that it would be usefull?

I mean the script worked before and I'm trying to upload imagens with sizes smaller than 100Kb

My belief is that it migth be something that the PHP 5.0.4 windows installer did not configure correctly, but what would that be?


I've been using FTP method but I also tried this

Code: Select all

<form action="" method="post" enctype="multipart/form-data">
<p>Pictures:
<input type="file" name="pictures[]" />
<input type="file" name="pictures[]" />
<input type="file" name="pictures[]" />
<input type="submit" value="Send" />
</p>
</form>

Code: Select all

<?php
foreach ($_FILES["pictures"]["error"] as $key => $error) {
   echo "<br>aqui vai um...";
   if ($error == UPLOAD_ERR_OK) {
   echo " " . $_FILES["pictures"]["name"][$key] . " temp: " . $_FILES["pictures"]["tmp_name"][$key];   
       $tmp_name = $_FILES["pictures"]["tmp_name"][$key];
       $name = $_FILES["pictures"]["name"][$key];
       if (move_uploaded_file($tmp_name, "httpdocs/temp/$name")) {
	   	echo " ... concluido";
	   } else {
	   	echo " ... não deu";
	   }
   }
}
?>

And watching the windows temp directory I see that the files are uploaded there but they don't get moved to the correct directory
Post Reply