hello,

my problem (and i found some other people with this problem) is that when I upload 'large' files, say >200 kb using PHP, weird things occur. Other people have problems around 450 and 4000 kb. Same signs, totally different scripts.

It just refuses to be uploaded, resulting in an endless wait. When i abort during the upload, it executes the script anyway (say what?!?!) resulting in broken links...

Small files of around 60 kb. work like a charm. I'm using PHP 4.0.3pl1.

PLEASE someone, i've tried everything, i'm not stupid 🙂 but this just ARGHHH!!!!

    i had something like this happen to me a while back. if the the size of the file is larger than the value of 'upload_max_filesize' in your php.ini file wierd things like that tend to happen. u can change the size of the max allowed file size though, try setting it to 10000000 (approx 10 M😎 or whatever u think u will need.

      sorry, all values are >1 mb and 200 kb seems impossible...

      anyone?

        18 days later

        The problem is not usually php but the Web server. IIS 5 comes with a cap at 200kb. IIS 4 comes with a cap at 2mb.
        Don't ask me how to change this in IIS, in Apache it's quite easy at least =)

          hmz, it's set to 2 mb i think [apache server], but even 500 kb files fail...

          (still no solution)

            a month later

            I have the same file upload problem as described in the previous posts. All files around 400k in size fail to upload correctly. Changing the max file size setting in the PHP.ini to a value greater than the file size I need doesn't seem to resolve the issue. Currently, I am using a Roxen server. Is there a server setting I need to change to allow these files to upload correctly?

            Interesting side note. After the upload fails the first time I can sometimes get it to work correctly by refreshing my browser. Any ideas?

            Thanks.

              You have to write what webserver you're using

                We are currently using Roxen Challenger/1.3.111

                  As I said before this problem is not always related to PHP. Please check your webserver documentation to see what limit it places on file uploads.
                  Both Apache and IIS has a setting where you can limit file upload size. The latest IIS is particularly restrictive in this case (200k) as an example.

                    6 days later

                    Does anyone know how to change to max file size in Apache?

                    Cheers

                      2 months later

                      It's not the max_file_size problem, it's something else.

                        a month later

                        umm

                        the book - php4 developper's guide - says
                        apache's uploading file limit causes large file upload problem.

                        but I can't find such a limit setting in apache files...

                        please tell me how to manage the limit of a uploading file size..

                          9 days later

                          There are several factors that could be the source of your problem:

                          1. HTML
                            if you use the <FORM> tag for upload, include <input type=hidden name=MAX_FILE_SIZE value=25165824> for a 25MB limit.
                          1. PHP
                            set this in the php.ini file:
                            file_uploads = On
                            upload_max_filesize = 25M
                          1. MySQL (or other db)
                            set this in my.cnf (for MySQL)
                            [mysqld]
                            set-variable = max_allowed_packet = 25M
                            18 days later

                            In php.ini,
                            you must modify,

                            first, upload_max_filesize,
                            second, max_execution_time,
                            and the last, post_max_size.

                            These three make problems for large files uploading...

                              a month later

                              jeps, that did it for me... my problem in short, if any other should run into it:

                              the vars, that are filled($file_name, $file_size etc) was set when uploading a 150kb file, but a 1500kb file failed and printing $file_name gave \"none\", like no file was uploaded... Still can´t see, why changing these values should help, since the files both were under the limits...

                              Another hint: remember to restart (or graceful dep. on apacheversion :-) Your server, after manipulation php.in

                                check timeout limit on Apache.conf too

                                  Try increasing post_max_size in php.ini too

                                    U mean like BABO wrote on the 23-6 this year? ;-)

                                    And watch out for the HTML tag MAX_FILE_SIZE, mine was set to 20000(approx. 20K😎 and that gave me a hard time. If set to low, it gives the file_name value "none"

                                    Syntax: <INPUT TYPE="hidden" name="MAX_FILE_SIZE" value="20000000"> # approx. 20MB

                                      17 days later

                                      My host is using PHP as an apache module compiled and says they can't change the max_file_size to a larger number because they would have to recompile and too many sites are using PHP. Is there a way to change the Max_file_size without having to compile it again, or is it just a mood point?

                                      Thanks in advance.

                                      JIM (A Designer NOT a programmer)

                                        that´s the worst crap I´ve ever heard... all U need to do is change the amount in the php.ini and reload the apache.. at least in the non-module version, can´t imagine it would be any different in the module version...