Illuminate \ Http \ Exceptions \ PostTooLargeException

后端 未结 4 859
眼角桃花
眼角桃花 2021-02-14 15:24

I already configured php.ini file (post_max_size=10240M), but it\'s still throwing PostTooLargeException. How to increase upload and download limit in Laravel 5.5?

4条回答
  •  终归单人心
    2021-02-14 15:53

    First, check your php version

    php --version 
    
    
    PHP 7.2.7-1+ubuntu16.04.1+deb.sury.org+1 (cli) (built: Jun 22 2018 08:44:50) ( NTS )
    Copyright (c) 1997-2018 The PHP Group
    Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies
        with Zend OPcache v7.2.7-1+ubuntu16.04.1+deb.sury.org+1, Copyright (c) 1999-2018, by Zend Technologies
    

    if your php version is 7.2

    open this file /etc/php/7.2/fpm/php.ini

    Update these 2 fields to something that big enough. Ex. 1024M or 2048M

    post_max_size = 1024M                                                                                                            
    upload_max_filesize = 1024M  
    

    Restart the php

    service php7.2-fpm restart
    

    Done ✅

提交回复
热议问题