티스토리 뷰

IT지식

PHP 활성화 하기

민자르 2017. 1. 16. 18:53
반응형

PHP 활성화 하기

1. php 활성화를 위해 아파치 설정파일을 연다.

sudo nano /etc/apache2/httpd.conf


2. LoadModule php5_module 이란 글로 시작하는 부분을 찾아서 # 을 제거해준다.

3. 아파치를 재시작한다.

4. 테스트 php 파일을 작성해서 테스트 해보자.

index.php

<?php phpinfo(); ?> 


index.php 경우 아래와 같은 경고 문고 뜨면
PHP Warning: phpinfo(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Asia/Seoul' for 'KST/9.0/no DST' instead in /usr/share/doc/squirrelmail-1.4.22/phpinfo.php on line 2

date.timezone = ## 변경 전
date.timezone = Asia/Seoul ## 변경 후

date.timezone = Asia/Seoul ## 변경 후


728x90
반응형
댓글