php.ini 설정 변경 > server

본문 바로가기
사이트 내 전체검색

server

php.ini 설정 변경

페이지 정보

작성자 서방님 댓글 0건 조회 828회 작성일 19-03-29 17:07

본문

[root@localhost ~]# vi /etc/php.ini



1. short_open_tag = On

Tells PHP whether the short form (<? ?>) of PHP's open tag should be allowed

Off 일땐 <? 로 시작되는 코드가 작동하지 않으므로 페이지 오류가 발생합니다.



2. memory_limit = 256M

스크립트 마다의 최대 메모리 소비량

크기를 memory_limit > post_max_size > upload_max_filesize 순으로 설정



3. error_reporting = E_ALL & ~E_DEPRECATED & ~E_STRICT

Common Values:

http://php.net/error-reporting



4. display_errors = On

옵션을 off으로 설정하면 php 스크립트 error가 발생하여도 웹상에서는 보이지 않습니다.



5. post_max_size = 100M

PHP 가 받아들이는 일을 할 수 있는 POST 데이터의 최대 사이즈



6. upload_max_filesize = 100M

업로드 할 수 있는 최대 파일 크기

post_max_size보다 작거나 같게 설정합니다. post_max_size보다 크게 주는 건 의미가 없습니다.



7. max_file_uploads = 100

단일 요청을 통해 업로드 할 수있는 최대 파일 수



8. sql.safe_mode = On

SQL 관련 함수를 위한 것으로 안전모드를 사용 할 것인지를 지정



9. allow_url_fopen = Off

allow_url_fopen 비적용



10. PHP 시간대 설정 ( 일본 Asia/Tokyo )

date.timezone = "Asia/Seoul"

http://byseob.blogspot.kr/2009/11/phpini-환경에서-datetimezone-관련-warning.html

https://zetawiki.com/wiki/PHP_시간대_설정



11. expose_php = Off

HTTP 헤더 아파치 버전 숨기기

http://jeonghyun.tistory.com/121

https://zetawiki.com/wiki/아파치_PHP_버전_숨기기



12. session.gc_maxlifetime = 3600

사용되지 않는 것으로 보이는 세션 데이터를 삭제한다.

; 1440 = 60초 x 24분 = 24분

; 3600 = 60초 x 60분 = 1시간

; 86400 = 60초 x 60분 x 24시간 = 1일

http://unabated.tistory.com/entry/세션-설정-phpini



13. disable_functions = system,exec,passthru,proc_open,popen,curl_exec,curl_multi_exec,parse_ini_file,show_source

함수를 비활성화

http://php.net/manual/kr/ini.sect.safe-mode.php



14. variables_order = "EGPCS"

수퍼 전역(super-global) 변수의 형태로 등록할 수 있는 입력을 정의하는데 사용

GPCS는 GET, POST, Cookie, Environment and Built-in variables를 의미

http://couplewith.blog.me/60006529101

http://cafecola.tistory.com/22



15. register_globals = off

php.ini 마지막에 추가 ( vi 에디터에서 $G 를 누릅니다. )

PHP 5.3.0부터 배제되어, PHP 5.4.0부터 제거됩니다.


댓글목록

등록된 댓글이 없습니다.

회원로그인

접속자집계

오늘
24
어제
58
최대
1,347
전체
153,788
Latest Crypto Fear & Greed Index

그누보드5
Copyright © 서방님.kr All rights reserved.