Results 1 to 3 of 3

Thread: [solved]Uploading files bigger than 2Mb in Contao 3.0

  1. #1
    User
    Join Date
    01-29-13.
    Posts
    64

    Default [solved]Uploading files bigger than 2Mb in Contao 3.0

    Hello to everybody,
    I'm trying to upload a file bigger than 2Mb in Contao 3.0. I changed the value of the MAX_UPLOAD_SIZE key in php.ini and added new new keys in this way:

    post_max_size = 256M
    upload_max_filesize = 256M
    max_execution_time = 1000
    max_input_time = 1000

    Although I did this I'm surprised I still get the "The maximum size for file uploads is 2.0 MB (Contao or php.ini settings)!" error and I wonder why. Can you tell me something about this?

    Thank you
    --
    Marco
    ---------
    Triste e' l'uomo
    che ama le cose
    solo quando si allontanano.
    (Baolian, libro dei pensieri Baol, I, vv. 1240-1242)

  2. #2
    Experienced user
    Join Date
    01-12-10.
    Posts
    814

    Default Re: Uploading files bigger than 2Mb in Contao 3.0

    Did you also set the Contao setting "Maximum upload file size" to a setting larger then 2048000? And you are sure that you can set the php.ini and this setting is correct? Can other scripts upload larger files then 2Mb?

    The contao setting can be made in the backend settings, or manually in the localconfig.php file:
    Code:
    $GLOBALS['TL_CONFIG']['maxFileSize']    = 2048000;

  3. #3
    User
    Join Date
    01-29-13.
    Posts
    64

    Default Re: Uploading files bigger than 2Mb in Contao 3.0

    Great, it worked!
    I didn't know I could add the 'maxFileSize' parameter to Contao itself. It's funny that changing it into php.ini is not enough.

    Anyway, thank you very very much, I hope this is going to be usefule to somebody else in the future!
    --
    Marco
    ---------
    Triste e' l'uomo
    che ama le cose
    solo quando si allontanano.
    (Baolian, libro dei pensieri Baol, I, vv. 1240-1242)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •