Hi I have the following code on the form page.

<center class="style7">
<input type="hidden" name="MAX_FILE_SIZE" value="10000000000000" />
<span class="style1">Attach a Document/Screen Grab?:

then on log.php i ahve this.

$target_path = "uploads/";

$target_path = $target_path . basename( $FILES['uploadedfile']['name']);
$
FILES['uploadedfile']['tmp_name'];

if(move_uploaded_file($FILES['uploadedfile']['tmp_name'], $target_path)) {
echo "The file ". basename( $
FILES['uploadedfile']['name']).
" has been uploaded";
} else{
echo "";
}

this all works fine untill i try and upload a file larger than 2 megs. then it just goes to the else statement and carrys on like normal without uploading. the php.ini file is set to allow 30M... not just the default 8M and i have included a lot of zeros in the form field bit.

but because its faulting at 2 MB+ (or at elast appears to be) then im guessing its a setting somewhere.

anyone know where it might be?

cheers!

    Just taking a guess here as I can't see all of your code on the form or the php file, but there is a post_max_size limit of 2047M.

    So, I'd check php.ini for post_max_size and raise that limit as you've said you already raised the upload_max_size.

      Hi.

      it was orginally set to 8M but i changed this to 50M.....

      cheers.

        one other thing.
        it was the post_max_size i changed. i just tried to find upload_mx_size and it doesnt seem to exist in my php.ini file...

        could this be a problem?

          Check httpd.conf

          But yes, upload_max_filesize should definitely be in your php.ini

          Maybe try inserting the following line in the problem script:

          ini_set("memory_limit","32M");
          

          Just change the 32M to whatever you wanna crank it up to.

            thanks for this.

            but i tried adding this in and also adding to the php.ini file upload_max_filesize = 64M

            but im still having no joy.

            i also read about changing the MetaBase.xml file in c:/windows/system32/inetsrv and altering the line AspMaxRequestEntityAllowed="204800" to a bigger number.... which i also did to no avail. however, why this would work for php i dont know but they seemed to think ti would. would there be anything i should add to this file specifically for php?

            thanks.

              Write a Reply...