We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 38678
    • 24 Posts
    Running MODx Rev 2.0.8 - pl.
    My hosting provider forced me to migrate to a new package and along the way changed PHP versions from 5.2.17 to 5.3.3.

    Since then, I have not been able to upload image files larger than about 100kb into the MODx file upload manager (I get "upload error" message).

    The file size limit WITHIN MODx is set to the default of about 1 MB. Any suggestions on what the problem could be? Some people have suggested checking PHP.ini.
      • 28042 ☆ A M B ☆
      • 24,524 Posts
      Go to Reports -> System Info, and scroll down... and down... until you find the "upload_max_filesize" value.

      The web server itself (Apache, nginx) has settings limiting the size of uploaded files.

      You'll probably need to talk to your hosting tech support.
        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
        • 38678
        • 24 Posts
        @sottwell

        Thanks. upload_max_filesize is set to 2M.
        I also checked MODx system settings (which should not have changed in the migration.
        Upload_max_size there is set to 1048576 bytes or about 1M.

        I suspect there is a bug or problem because the moved me to PHP 5.3.3 from 5.2.17 without telling me.
        I will have to contact my hosting tech support as you suggest.

        If anyone is aware of problems with Revo 2.0.8 running on an PHP 5.3.3 (vs. 5.2.17) please let me know. This is very annoying.
          • 1343 ☆ A M B ☆
          • 2,213 Posts
          Hello,

          It's not surprising that your host would upgrade to PHP 5.3.x considering 5.2.x hasn't been actively supported for roughly a year. Your host should be on at least 5.3.20, or newer (5.3.26 is current). I would be slightly concerned they are running such an old version for starters.

          That being said there shouldn't be any problems using Revo 2.0.8 on PHP 5.3.x, however I would recommend upgrading to 2.2.8 as there are quite a few bug and security fixes released since then. I would start with the upgrade personally, but if you want to troubleshoot things further I would suggest increasing the limit to in MODX and PHP to 5MB (or more).

          I would also check if mod_security and/or suhosin are installed as they could cause problems.

          Can you tell us anything more about your hosting environment and/or provider that might help?

          Thanks
            Patrick | Server Wrangler
            About Me: Website | Tweets |  MODX Hosting
            • 38678
            • 24 Posts
            RESOLVED

            Thanks Patrick. Problem solved and a warning to others who might find themselves in the same situation:

            1) The problem was baffling because both my MODx and PHP.ini parameters were set to allow file uploads up to 2MB
            2) MODx support was engaged and they found the following "mod_fcgid: HTTP request length 131388 (so far) exceeds MaxRequestLen (131072)"
            3) Searching various forums I found the resolution here: http://forum.parallels.com/showthread.php?112735-MaxRequestLen-Issue
            4) So be aware if your hosting provider suddenly puts you on a platform running PHP in fast CGI mode; often even the support people will be clueless to this and tell you just to look in PHP.ini
            5) I had to log into my server admin panel as ROOT to actually get to the configuration file in the following path /etc/httpd/conf.d/fcgid.conf
            6) Once there I edited the file to add the following directive before the </IfModule> line which allows uploads up to 10meg - FcgidMaxRequestLen 1073741824
            7) I also discovered the problem occurred because my host uses Plesk 10.3.1 server management panel in their current standard virtual server config; if they automatically upgrade this software the problem could happen again as the fcgid.conf file could be overwritten; apparently Plesk 10.4.4 and up addresses this issue.

            Good luck to anyone else with this problem and hope it helps. The hosting provider support was pretty clueless.