This forum is no longer open and is for reading/searching only.

Please use our new MachForm Community Forum instead.

MachForm Community Forums » MachForm 4

Where should .htaccess file be stored?


  1. jimarner
    Member

    I have a form that allows users to upload 3 image files (.jpg). Currently, the form allows a maximum file-size of 2MB. I want to change that to a maximum file-size of 4MB.

    I have written a .htaccess file with the following lines:
    php_value upload_max_filesize 4M
    php_value post_max_size 16M

    The form still only allows files of 2MB size or smaller.

    I have placed the .htaccess file in the machform folder and also in the folder for the particular form.

    Here is the link to the form:
    http://www.rmaba.org/rmbpf/fi-submission-form.html

    Any help greatly appreciated. Thanks.
    Jim

    Posted 9 years ago #
  2. frankzobitz
    Member

    On the properties for that element, you can set the maximum file size. It is right underneath where you set how many files to upload.

    Posted 9 years ago #
  3. jimarner
    Member

    I have set the property to allow a 4MB file-size. However, the server that hosts the web-site isn't allowing files greater than 2MB. Tech support, for the host, states that the .htaccess file, that allows larger file sizes should be stored in the same directory as the .php files. As stated above, I have placed that file in both the main machform folder and also in the individual folder for that form.

    Still, the form will not accept files greater than 2MB.

    Jim

    Posted 9 years ago #
  4. yuniar

    To check if the .htaccess is being applied correctly or not, you can upload php file into your machform folder, let say "info.php"
    Then put this code into the file:

    <?php phpinfo(); ?>

    Then run the info.php file and see if the post_max_size and upload_max_filesize is being applied correctly or not?


    MachForm Founder

    Posted 9 years ago #
  5. jimarner
    Member

    Results:

    Directive Local Value Master Value
    ...
    post_max_size 16M 8M
    ...
    upload_max_filesize 4M 2M

    Posted 9 years ago #
  6. jimarner
    Member

    Issue resolved. Tech support for the hosting service made a change so the Master Value is now 20M.

    Posted 9 years ago #

RSS feed for this topic

Reply