/
php POST max upload size 조정

php POST max upload size 조정

php와 MySQL로 웹 서비스 개발시 POST 할수 있는 파일의 size 를 설정하기 위해 php와 MySQL 에서 설정해야 하는 내용을 정리

php.ini

; Maximum allowed size for uploaded files.
; http://www.php.net/manual/en/ini.core.php#ini.upload-max-filesize
upload_max_filesize = 1024M
 
; Maximum size of POST data that PHP will accept.
; http://www.php.net/manual/en/ini.core.php#ini.post-max-size
post_max_size = 1024M
 
;; 큰 파일 upload시 시간이 오래 걸리므로 아래 설정 변경
; Maximum amount of time each script may spend parsing request data. It's a good
; idea to limit this time on productions servers in order to eliminate unexpectedly
; long running scripts. 
; Default Value: -1 (Unlimited)
; Development Value: 60 (60 seconds)
; Production Value: 60 (60 seconds)
; http://www.php.net/manual/en/info.configuration.php#ini.max-input-time
max_input_time = 300
 
; Maximum execution time of each script, in seconds
; http://www.php.net/manual/en/info.configuration.php#ini.max-execution-time
max_execution_time = 300

If you still having issues with the session expiring whilst uploading, try changing this variable in your php.ini

session.gc_maxlifetime = 86400

 

MySQL

 

 

Related content

nginx 업로드 파일 용량 초과 오류 해결 - HTTP 413 client intended to send too large body
nginx 업로드 파일 용량 초과 오류 해결 - HTTP 413 client intended to send too large body
More like this
RHEL/CentOS, Windows에 PHP apc 설치
RHEL/CentOS, Windows에 PHP apc 설치
More like this
디렉터리 목록 비활성화
디렉터리 목록 비활성화
More like this
RHEL/CentOS 와 Windows 및 Unix 에 php 설치
RHEL/CentOS 와 Windows 및 Unix 에 php 설치
More like this
PHPStorm 에서 신규 소스 파일 생성시 declare(strict_types=1) 자동으로 붙이기
PHPStorm 에서 신규 소스 파일 생성시 declare(strict_types=1) 자동으로 붙이기
More like this
nginx php 연동
nginx php 연동
More like this