We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 18339
    • 14 Posts
    Mark Scudder Reply #1, 16 years ago
    I have a new Revo install on a virtual host at Voxel. I am trying to set up the file manager so my client can upload photos, some of which will be large files and will be brought back down to web size by phpThumb (we occasionally need to make the originals available, this is artist booking stuff, and the venues may need hi-res photos for print advertisements etc. - I tell you all this because someone will inevitably reply to this message, "just make the files smaller").

    Files above a certain size won’t upload. I did a phpinfo() on this server. post_max_size is set to 8M and upload_max_filesize is set to 2M. Obviously these need to be adjusted upward.

    At the bottom of MODx’s .htaccess, I added the following lines:

    php_flag post_max_size 100M
    php_flag upload_max_filesize 100M


    I then saved the .htaccess file. I was logged in to the manager at the time, and after saving the file, any page I went to in the manager was grayed out, and an "Error" dialog box appeared and all it said was "action_err_ns".

    I logged out of the manager, and tried to log in again, but MODx simply loads the manager login window again. No matter what I do I can’t log back in to the manager until I remove those two lines from .htaccess and save. Then MODx behaves normally.

    I tried increasing upload_maxsize in System Settings, but this did not change the file manager’s behavior at all.

    In the past, with other CMSs and custom programmed scripts, increasing post_max_size and upload_max_filesize in .htaccess has always solved this problem.

    In case you need additional information: MODx Revolution 2.00-pl, Traditional distro, Linux 2.6.18-164.el5, don’t know the distro, it’s probably Debian though. PHP 5.2.14, MySQL client 5.0.91. If you need any more information, phpinfo() for this server is here: http://www.yeahello.com/test.php

    Thanks,
    -mark
      • 6228
      • 249 Posts
      Try this:

      post_max_size = 100M
      upload_max_filesize = 100M


      EDIT:

      I should have mentioned to put this within a php.ini file somewhere near (or in) your web root.
        lo9on.com

        MODx Evolution/Revolution | Remote Desktop Training | Development
        • 18339
        • 14 Posts
        Mark Scudder Reply #3, 16 years ago
        Thanks, but that didn’t change anything. I suppose my web host would have to specifically support a php.ini in my web root, which I don’t think they do. Last time I had to do this on this host, adding the parameters to the .htaccess worked (and in fact the .htaccess that comes with MODx has --

        Oh wait, I see what’s wrong.

        php_flag is for on/off yes/no type things. I should have been using "php_value". My client added this for me while I was doing something else and it *looked* right. It now works fine at the bottom of the MODx .htaccess file.

        Man I feel stupid. Thanks!