View Full Version : strange upload problem

02-08-2006, 11:07 AM
Heya, I'm having trouble with a really weird problem over here. I tried a tutorial, resulting in these (two) files:

<form enctype="multipart/form-data" action="uploader.php" method="POST">
Choose a file to upload: <input name="uploadedfile" type="file" /><br />
<input type="submit" value="Upload File" />


$target_path = basename( $_FILES['uploadedfile']['name']);

echo $target_path;

echo 'It never made it! ';

if(move_uploaded_file($_FILES['uploadedfile']['tmp_name'], $target_path)) {
echo "The file ". basename( $_FILES['uploadedfile']['name']). " has been uploaded";
} else{
echo "There was an error uploading the file, please try again!";


The upload procedure does work for small files, but when I try something big the upload fails.

I'm using XAMPP, here is the php.ini:

; Resource Limits ;

max_execution_time = 0 ; Maximum execution time of each script, in seconds
max_input_time = 0 ; Maximum amount of time each script may spend parsing request data
memory_limit = 200M ; Maximum amount of memory a script may consume (8MB)

; Maximum size of POST data that PHP will accept.
post_max_size = 1000M

; Magic quotes

; Magic quotes for incoming GET/POST/Cookie data.
magic_quotes_gpc = On
; 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:\Programme\xampp\tmp"

; Maximum allowed size for uploaded files.
upload_max_filesize = 1000M



So, any ideas? Your help would be deeply appreciated.

Regards, d

P.S.: The XAMPP version is 1.4.15, in case that may help