티스토리 뷰

진행중인 프로젝트에서 썸네일 기능이 고장나 있는 걸 발견했다.

error_log() 를 이용해 디버깅했다.

썸네일 생성 코드인 thumb() 안에 있는 $this->resize()에서 오류가 발생하고 있었고, $this->image_lib->error_reporting(E_ALL); 를 호출해서 오류 로그를 확인했다.

The GD image library is required for this feature.
Your server does not support the GD function required to process this type of image.
JPG images are not supported.

라이브러리를 정상적으로 불러오지 못했거나, 라이브러리가 지원하지 않는 기능을 사용한 것이다.

검색결과 전자에 해당했고, 윈도우 서버였기 때문에 php.ini 파일에서 ;extension=php_gd2.dll 코드의 주석을 해제했더니 해결되었다. 리눅스 서버일 경우 gd.so 라이브러리를 참조해야 할 것이다.

댓글
공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday