We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 37550 ☆ A M B ☆
    • 711 Posts
    Nope 30mb
      http://www.onesmarthost.co.uk
      UK MODX Hosting with love.
      • 25663 MODX Staff
      • 12,272 Posts
      Is there a local php.ini override?
        Ryan Thrash, MODX Co-Founder
        Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
        • 37550 ☆ A M B ☆
        • 711 Posts
        Quote from: rthrash at May 30, 2007, 12:27 PM

        Is the max upload limit in PHP set to 2MB ... the default?

        This post just made me think about what had been changed, for the user and sites we tested this morning we set in the custom php.ini (per site)

        upload_max_filesize = 30 (without the M at the end)

        now on my second server I’ve just installed MODx changed the site PHP.ini to upload_max_filesize = 30M (with the M) and a 3mb file uploads.

        I’ve then changed the php.ini to 30 (without the M) and the /php/ dir was deleted.

        I’ve just ran both of these tests on multiple sites on my servers and found that

        a) upload_max_filesize = 30 - results in /php/ being deleted
        b) upload_max_filesize = 30M - the upload works.

        So its either a PHP config issue or FCK issue.

        One thing that has been puzzling me though is the main php.ini on the server is set as upload_max_filesize = 2M (with the M) however under this setting a file larger than the allowed size results in the dir being deleted.

        I’ve just re-verified that with 2M limit if you upload over 2mb the /php/ gets deleted.

        So now I’m confused theres definitly a problem on IIS where if max_filesize <= the file you want to upload it will delete the /php/ dir.

        Tests above were performed on two Windows 2003 IIS servers, and one desktop PC running IIS.

        Thanks
        Aaron



          http://www.onesmarthost.co.uk
          UK MODX Hosting with love.
          • 25663 MODX Staff
          • 12,272 Posts
          That sounds like a bug in PHP honestly ... and insane!

          What version of PHP?
            Ryan Thrash, MODX Co-Founder
            Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
            • 37550 ☆ A M B ☆
            • 711 Posts
            4.3.1 I’ll switch the domain to the latest PHP 5 and let you know the results.

            Its definitly insane a few weeks ago i was getting requests to restore /php/ every couple of days and at first thought it was the user or their client doing something wrong.

              http://www.onesmarthost.co.uk
              UK MODX Hosting with love.
              • 37550 ☆ A M B ☆
              • 711 Posts
              Ok, just ran test using PHP 5.2.2

              For this test I set the limit as 2m for local PHP.INi as ive got a feeling its something to do with what FCK does if the file reaches it limit during upload.

              So for the test I tried to upload a 2.79mb zip file, during the upload time I had the php/uploadtemp folder open on the server and in the background connectors/php so there I was waiting for the upload hitting F5 to refresh the /uploadtemp folder every few seconds it got to a mighty 2,050KB then the file size didnt change a few seconds later whilst i was refreshing uploadtemp folder i seen in the background window /php/ dir disapear.

              So there it is if PHP.INI if set to less than the size you are trying to upload FCK kinda panics and deletes the /php/ folder.

              For the time being I will set the site PHP.INIs to 30M max size (with the M). This will allow my customer to get on with what he needs, I’m still puzzled by all this so I’m going to upload the latest version of FCK outside of MODx to see what happens then.

                http://www.onesmarthost.co.uk
                UK MODX Hosting with love.
                • 25663 MODX Staff
                • 12,272 Posts
                It may be a paths issue in the integration bridge with non-windows-friendly paths ... just a thought.
                  Ryan Thrash, MODX Co-Founder
                  Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
                  • 37550 ☆ A M B ☆
                  • 711 Posts
                  You could be right I could not find much on fck forums, but after installing the latest version on a test domain outside of MODx it goes through the upload process but at the end you get no error about file size being too big but the great thing is, is that it does not delete any directories!

                  I’ve done a little more digging around and found that if i mod

                  D:\domains\mydomain.com\wwwroot\fckeditor\editor\filemanager\browser\default\frmupload.html

                  and replace:


                  case 0 :
                  window.parent.frames[’frmResourcesList’].Refresh() ;
                  break ;

                  to:


                  case 0 :
                  alert(’The file you are trying to upload is too big’);
                  window.parent.frames[’frmResourcesList’].Refresh() ;
                  break ;

                  I can now try and upload files larger than 2mb and get a friendly error instead of the dir being deleted.

                  I’ve tried searching for the code which does the delete in hope of fixing it but the fckeditor code is very confusing, for now I will advise my customers to upgrade the fckeditor / mcpuk browser and apply the change above.

                  Thanks for your help, if any one has seen this problem on Windows Hosting other than my servers please let us know as if it is an issue for others it could be worthwhile the MODx team looking for a proper fix.

                  Thanks Aaron
                    http://www.onesmarthost.co.uk
                    UK MODX Hosting with love.
                    • 36634
                    • 3 Posts
                    Where can I change this value? (2 MB), Do I have to edit some file? or is a value in a table of mysql?
                      • 6038
                      • 228 Posts
                      Thank you to onesmarthost for posting your experience. This issue has also been reported on a server I have some sites on, and we thought we were going mad - its good to see we are not the only ones with this issue. The connectors/php folder is being deleted for uploads over 2M. We are pending some changes to get round the issue.

                      MODX Evolution 1.0.4
                      PHP 5.2.1 (with upload_max_filesize 2M)
                      IIS 6
                      Windows NT