Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8084379
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T17:46:41+00:00 2026-06-05T17:46:41+00:00

I have set up upload_max_filesize and post_max_size to 32Mb in php.ini. I am using

  • 0

I have set up upload_max_filesize and post_max_size to 32Mb in php.ini.

I am using Symfony2. I have created an entity that contains a file variable so that people can upload a file:

/**
 * @Assert\File(maxSize="3M")
 */
public $file;
  • When the file is smaller than 3Mb, the file is correctly uploaded.
  • When 3Mb the validator is working fine, displaying the normal error message “file is too big”
  • However, when file > 32Mb (post_max_size):

Fatal error: Allowed memory size of 150994944 bytes exhausted (tried
to allocate 62353390 bytes) in
/Applications/MAMP/htdocs/Symfony/vendor/symfony/src/Symfony/Component/HttpKernel/Profiler/Profiler.php
on line 177

Is there a way to make the validator work when the file uploaded is higher than post_max_size? How is Symfony handling file uploads that are bigger than post_max_size?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T17:46:43+00:00Added an answer on June 5, 2026 at 5:46 pm

    This is an issue about PHP, not Symfony. As you limit POST params size, your submit request does even not “reach” controller.

    As post_max_size limit all POST params, including files, you should define post_max_size higher than upload_max_filesize.

    So now, your question seems to be related to this one : How to gracefully handle files that exceed PHP's `post_max_size`?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a method set up that uses jquery form for a file upload
I'm using PHP 5.3.0 and have encountered something that might be a bug (in
I have set up multiple targets in a single xml file. I expect all
We have set up a SharePoint meeting workspace (using WSS 3.0) for our weekly
I have a very simple file upload PHP script. I am testing with a
I'm using a flash/ajax file upload in php based on this site - http://blog.codeville.net/2008/11/24/jquery-ajax-uploader-plugin-with-progress-bar/
I have a php form that uploads files, and all files work good the
I have a SQL Server 2008 database with a table that contains a FILESTREAM
I have a problem with php file upload, so..when I try to uploads some
I am trying to upload multiple images and I have a jquery plugin set

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.