We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 41869
    • 2 Posts
    I am currently working on a customer site and have a strange problem.
    When I want to upload files which are larger than 7 or 8 MB the file manager uploads the file up to 100% and then outputs a "Access denied"-message in die notes column.

    I have already set the max_upload Limit in the modx Settings. I thought it might correlate with a php upload limit set by the hoster (1&1, Germany) so I added a php.ini file with the following contents to the folder I want to upload to: (I found it on some 1&1 related website)
    memory_limit = 40M
    upload_max_filesize = 20M
    post_max_size = 25M
    max_execution_time = 50000
    browscap = /usr/lib/browscap.ini
    register_globals = On
    error_reporting  =  (E_ALL & ~E_NOTICE & ~E_WARNING)
    url_rewriter.tags="a=href,area=href,frame=src,form=fakeentry,fieldset="


    Might it be, that modx first tries to upload to some kind of temp folder where I also have to put this php.ini, or where else could I try to avoid this error? Seeting these variables via .htaccess is denied by 1&1 and results in a Server error 500.
    • It sounds like a server limit. The IIS or Apache server itself has limits, suhosin has limits, and FastCGI also has limits.

      http://www.webtrenches.com/post.cfm/iis7-file-upload-size-limits
      https://www.dokuwiki.org/faq:uploadsize (scroll down to see server configuration)
        Studying MODX in the desert - http://sottwell.com
        Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
        Join the Slack Community - http://modx.org
        • 41869
        • 2 Posts
        Hi sottwell,
        thanks for your reply. I really changed all possible limits, according to phpinfo() the post_max_size limit seems to be the problem (it is set to 8M by default).
        So I changed it in a custom php.ini. A test with phpinfo() shows that it gets applied. But still I get the same error.
        Do I really have to put the php.ini in the folder which I want to upload to or in the folder where the upload script is run?
        • What my comment is referring to is web server configuration, and has nothing to do with PHP configuration.

          As far as php.ini files, there has to be one in every folder where there is a script running. In the case of MODx, that means the installation's root index.php and /manager/index.php, since everything else is included into those .php files. The exception to this would be in the case of AJAX processors.

          You can examine a phpinfo() function output to see what the global settings are, what the local settings are, and where the php.ini file is being read from.
            Studying MODX in the desert - http://sottwell.com
            Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
            Join the Slack Community - http://modx.org
          • Hi there, you might like to check your system settings in MODX. Go to File System and check out the size of - > Maximum upload size -> upload_maxsize -> 1048576.

            The number at the end is bytes so you will need to increase this to accommodate a 7MB or 8 MB file
              Helen Warner
              Number one pixel!
              Proud to be linked with MODX at Crimson Pixel