WEB언어/PHP
IIS + PHP에서 알수 없는 500번 오류
saltdoll
2019. 10. 5. 07:54
반응형
IIS + PHP 환경에서 작업을 하다보면, 생각지도 못하는 오류가 발생할 때가 있습니다.
test.com is currently unable to handle this request. HTTP ERROR 500
IIS의 logs에도 나오지 않고, 심지어 display_errors에서 나오지 않는 오류 입니다.
//Error display
error_reporting(E_ALL);
ini_set('display_errors', 'On');
이렇게 해도 나오지 않는 오류 메시지,
원인은 "<?"을 인식하지 못하기게 생기는 원인이었습니다.
"<?php"로 해주지 않으면 오류가 나는 군요.
만약, "<?"로 사용하고 싶으시면,
php.ini의 short_open_tag = On 으로 수정하고, IIS를 restart해주면 됩니다. (C:\Program Files\PHP\v7.2)
;short_open_tag = Off
short_open_tag = On
short_open_tag = Off를 보안적인 사항에서, 추천합니다.
(참고: https://codeday.me/ko/qa/20190915/1460139.html )
반응형