일단 php-fpm 으로 7.2 버전을 사용중이고, 레이아웃은 PC 버전과 모바일 버전의 레이아웃이 나뉘어져 있는 레이아웃을 사용하고 있습니다. (모바일로 접속하면 모바일 레이아웃으로, PC 로 접속하면 PC레이아웃으로 보여주는 형태입니다. Comely 레이아웃입니다.)
PC 버전의 레이아웃으로 들어가면 잘 나오는데 반해 모바일로 접근하게 되면 에러가 나타나게 됩니다.
라이믹스의 디버깅 기능으로 나타난 에러로그를 적어보면
01. Warning: Use of undefined constant N - assumed 'N' (this will throw an Error in a future version of PHP) layouts/comely_layout/layout_m.html:76 classes/template/TemplateHandler.class.php:358 classes/template/TemplateHandler.class.php:156 layouts/comely_layout/layout.html:63 classes/template/TemplateHandler.class.php:358 classes/template/TemplateHandler.class.php:156 classes/display/HTMLDisplayHandler.php:140 classes/display/DisplayHandler.class.php:60 classes/module/ModuleHandler.class.php:1126 index.php:52 02. Warning: Use of undefined constant N - assumed 'N' (this will throw an Error in a future version of PHP) layouts/comely_layout/layout_m.html:90 classes/template/TemplateHandler.class.php:358 classes/template/TemplateHandler.class.php:156 layouts/comely_layout/layout.html:63 classes/template/TemplateHandler.class.php:358 classes/template/TemplateHandler.class.php:156 classes/display/HTMLDisplayHandler.php:140 classes/display/DisplayHandler.class.php:60 classes/module/ModuleHandler.class.php:1126 index.php:52 03. Warning: Use of undefined constant N - assumed 'N' (this will throw an Error in a future version of PHP) layouts/comely_layout/layout_m.html:104 classes/template/TemplateHandler.class.php:358 classes/template/TemplateHandler.class.php:156 layouts/comely_layout/layout.html:63 classes/template/TemplateHandler.class.php:358 classes/template/TemplateHandler.class.php:156 classes/display/HTMLDisplayHandler.php:140 classes/display/DisplayHandler.class.php:60 classes/module/ModuleHandler.class.php:1126 index.php:52 04. Warning: Use of undefined constant Y - assumed 'Y' (this will throw an Error in a future version of PHP) layouts/comely_layout/layout_m.html:104 classes/template/TemplateHandler.class.php:358 classes/template/TemplateHandler.class.php:156 layouts/comely_layout/layout.html:63 classes/template/TemplateHandler.class.php:358 classes/template/TemplateHandler.class.php:156 classes/display/HTMLDisplayHandler.php:140 classes/display/DisplayHandler.class.php:60 classes/module/ModuleHandler.class.php:1126 index.php:52 05. Warning: Use of undefined constant Y - assumed 'Y' (this will throw an Error in a future version of PHP) layouts/comely_layout/layout_m.html:109 classes/template/TemplateHandler.class.php:358 classes/template/TemplateHandler.class.php:156 layouts/comely_layout/layout.html:63 classes/template/TemplateHandler.class.php:358 classes/template/TemplateHandler.class.php:156 classes/display/HTMLDisplayHandler.php:140 classes/display/DisplayHandler.class.php:60 classes/module/ModuleHandler.class.php:1126 index.php:52 06. Warning: Use of undefined constant N - assumed 'N' (this will throw an Error in a future version of PHP) layouts/comely_layout/layout_m.html:104 classes/template/TemplateHandler.class.php:358 classes/template/TemplateHandler.class.php:156 layouts/comely_layout/layout.html:63 classes/template/TemplateHandler.class.php:358 classes/template/TemplateHandler.class.php:156 classes/display/HTMLDisplayHandler.php:140 classes/display/DisplayHandler.class.php:60 classes/module/ModuleHandler.class.php:1126 index.php:52 07. Warning: Use of undefined constant Y - assumed 'Y' (this will throw an Error in a future version of PHP) layouts/comely_layout/layout_m.html:104 classes/template/TemplateHandler.class.php:358 classes/template/TemplateHandler.class.php:156 layouts/comely_layout/layout.html:63 classes/template/TemplateHandler.class.php:358 classes/template/TemplateHandler.class.php:156 classes/display/HTMLDisplayHandler.php:140 classes/display/DisplayHandler.class.php:60 classes/module/ModuleHandler.class.php:1126 index.php:52 08. Warning: Use of undefined constant Y - assumed 'Y' (this will throw an Error in a future version of PHP) layouts/comely_layout/layout_m.html:109 classes/template/TemplateHandler.class.php:358 classes/template/TemplateHandler.class.php:156 layouts/comely_layout/layout.html:63 classes/template/TemplateHandler.class.php:358 classes/template/TemplateHandler.class.php:156 classes/display/HTMLDisplayHandler.php:140 classes/display/DisplayHandler.class.php:60 classes/module/ModuleHandler.class.php:1126 index.php:52 09. Warning: Use of undefined constant N - assumed 'N' (this will throw an Error in a future version of PHP) layouts/comely_layout/layout_m.html:104 classes/template/TemplateHandler.class.php:358 classes/template/TemplateHandler.class.php:156 layouts/comely_layout/layout.html:63 classes/template/TemplateHandler.class.php:358 classes/template/TemplateHandler.class.php:156 classes/display/HTMLDisplayHandler.php:140 classes/display/DisplayHandler.class.php:60 classes/module/ModuleHandler.class.php:1126 index.php:52 10. Warning: Use of undefined constant Y - assumed 'Y' (this will throw an Error in a future version of PHP) layouts/comely_layout/layout_m.html:104 classes/template/TemplateHandler.class.php:358 classes/template/TemplateHandler.class.php:156 layouts/comely_layout/layout.html:63 classes/template/TemplateHandler.class.php:358 classes/template/TemplateHandler.class.php:156 classes/display/HTMLDisplayHandler.php:140 classes/display/DisplayHandler.class.php:60 classes/module/ModuleHandler.class.php:1126 index.php:52 11. Warning: Use of undefined constant Y - assumed 'Y' (this will throw an Error in a future version of PHP) layouts/comely_layout/layout_m.html:109 classes/template/TemplateHandler.class.php:358 classes/template/TemplateHandler.class.php:156 layouts/comely_layout/layout.html:63 classes/template/TemplateHandler.class.php:358 classes/template/TemplateHandler.class.php:156 classes/display/HTMLDisplayHandler.php:140 classes/display/DisplayHandler.class.php:60 classes/module/ModuleHandler.class.php:1126 index.php:52 12. Warning: Use of undefined constant N - assumed 'N' (this will throw an Error in a future version of PHP) layouts/comely_layout/layout_m.html:104 classes/template/TemplateHandler.class.php:358 classes/template/TemplateHandler.class.php:156 layouts/comely_layout/layout.html:63 classes/template/TemplateHandler.class.php:358 classes/template/TemplateHandler.class.php:156 classes/display/HTMLDisplayHandler.php:140 classes/display/DisplayHandler.class.php:60 classes/module/ModuleHandler.class.php:1126 index.php:52 13. Warning: Use of undefined constant Y - assumed 'Y' (this will throw an Error in a future version of PHP) layouts/comely_layout/layout_m.html:104 classes/template/TemplateHandler.class.php:358 classes/template/TemplateHandler.class.php:156 layouts/comely_layout/layout.html:63 classes/template/TemplateHandler.class.php:358 classes/template/TemplateHandler.class.php:156 classes/display/HTMLDisplayHandler.php:140 classes/display/DisplayHandler.class.php:60 classes/module/ModuleHandler.class.php:1126 index.php:52 14. Warning: Use of undefined constant Y - assumed 'Y' (this will throw an Error in a future version of PHP) layouts/comely_layout/layout_m.html:109 classes/template/TemplateHandler.class.php:358 classes/template/TemplateHandler.class.php:156 layouts/comely_layout/layout.html:63 classes/template/TemplateHandler.class.php:358 classes/template/TemplateHandler.class.php:156 classes/display/HTMLDisplayHandler.php:140 classes/display/DisplayHandler.class.php:60 classes/module/ModuleHandler.class.php:1126 index.php:52 15. Warning: Use of undefined constant N - assumed 'N' (this will throw an Error in a future version of PHP) layouts/comely_layout/layout_m.html:104 classes/template/TemplateHandler.class.php:358 classes/template/TemplateHandler.class.php:156 layouts/comely_layout/layout.html:63 classes/template/TemplateHandler.class.php:358 classes/template/TemplateHandler.class.php:156 classes/display/HTMLDisplayHandler.php:140 classes/display/DisplayHandler.class.php:60 classes/module/ModuleHandler.class.php:1126 index.php:52 16. Warning: Use of undefined constant Y - assumed 'Y' (this will throw an Error in a future version of PHP) layouts/comely_layout/layout_m.html:104 classes/template/TemplateHandler.class.php:358 classes/template/TemplateHandler.class.php:156 layouts/comely_layout/layout.html:63 classes/template/TemplateHandler.class.php:358 classes/template/TemplateHandler.class.php:156 classes/display/HTMLDisplayHandler.php:140 classes/display/DisplayHandler.class.php:60 classes/module/ModuleHandler.class.php:1126 index.php:52 17. Warning: Use of undefined constant Y - assumed 'Y' (this will throw an Error in a future version of PHP) layouts/comely_layout/layout_m.html:109 classes/template/TemplateHandler.class.php:358 classes/template/TemplateHandler.class.php:156 layouts/comely_layout/layout.html:63 classes/template/TemplateHandler.class.php:358 classes/template/TemplateHandler.class.php:156 classes/display/HTMLDisplayHandler.php:140 classes/display/DisplayHandler.class.php:60 classes/module/ModuleHandler.class.php:1126 index.php:52 18. Warning: Use of undefined constant N - assumed 'N' (this will throw an Error in a future version of PHP) layouts/comely_layout/layout_m.html:104 classes/template/TemplateHandler.class.php:358 classes/template/TemplateHandler.class.php:156 layouts/comely_layout/layout.html:63 classes/template/TemplateHandler.class.php:358 classes/template/TemplateHandler.class.php:156 classes/display/HTMLDisplayHandler.php:140 classes/display/DisplayHandler.class.php:60 classes/module/ModuleHandler.class.php:1126 index.php:52 19. Warning: Use of undefined constant Y - assumed 'Y' (this will throw an Error in a future version of PHP) layouts/comely_layout/layout_m.html:104 classes/template/TemplateHandler.class.php:358 classes/template/TemplateHandler.class.php:156 layouts/comely_layout/layout.html:63 classes/template/TemplateHandler.class.php:358 classes/template/TemplateHandler.class.php:156 classes/display/HTMLDisplayHandler.php:140 classes/display/DisplayHandler.class.php:60 classes/module/ModuleHandler.class.php:1126 index.php:52 20. Warning: Use of undefined constant Y - assumed 'Y' (this will throw an Error in a future version of PHP) layouts/comely_layout/layout_m.html:109 classes/template/TemplateHandler.class.php:358 classes/template/TemplateHandler.class.php:156 layouts/comely_layout/layout.html:63 classes/template/TemplateHandler.class.php:358 classes/template/TemplateHandler.class.php:156 classes/display/HTMLDisplayHandler.php:140 classes/display/DisplayHandler.class.php:60 classes/module/ModuleHandler.class.php:1126 index.php:52 21. Warning: Use of undefined constant N - assumed 'N' (this will throw an Error in a future version of PHP) layouts/comely_layout/layout_m.html:104 classes/template/TemplateHandler.class.php:358 classes/template/TemplateHandler.class.php:156 layouts/comely_layout/layout.html:63 classes/template/TemplateHandler.class.php:358 classes/template/TemplateHandler.class.php:156 classes/display/HTMLDisplayHandler.php:140 classes/display/DisplayHandler.class.php:60 classes/module/ModuleHandler.class.php:1126 index.php:52 22. Warning: Use of undefined constant Y - assumed 'Y' (this will throw an Error in a future version of PHP) layouts/comely_layout/layout_m.html:104 classes/template/TemplateHandler.class.php:358 classes/template/TemplateHandler.class.php:156 layouts/comely_layout/layout.html:63 classes/template/TemplateHandler.class.php:358 classes/template/TemplateHandler.class.php:156 classes/display/HTMLDisplayHandler.php:140 classes/display/DisplayHandler.class.php:60 classes/module/ModuleHandler.class.php:1126 index.php:52 23. Warning: Use of undefined constant Y - assumed 'Y' (this will throw an Error in a future version of PHP) layouts/comely_layout/layout_m.html:109 classes/template/TemplateHandler.class.php:358 classes/template/TemplateHandler.class.php:156 layouts/comely_layout/layout.html:63 classes/template/TemplateHandler.class.php:358 classes/template/TemplateHandler.class.php:156 classes/display/HTMLDisplayHandler.php:140 classes/display/DisplayHandler.class.php:60 classes/module/ModuleHandler.class.php:1126 index.php:52
내용을 보여주고 있습니다.
그래서 layout_m.html 파일의 문제가 되는 라인들을 살펴보면
별다른 내용이 없습니다.
</span>
<li class="<!--@if($_closed)-->closed<!--@else-->opened<!--@end--><!--@if($val['selected'])--> active<!--@end-->">
과 같은 일반적으로 RXE와 html 에서 사용하는 코드들입니다.
문제가 일어나려면 PC에도 일어나야 할텐데 PC에는 정상적으로 잘 나타는데 반해 모바일은 에러가 나는게 너무 신기합니다.
Warning: Use of undefined constant N - assumed 'N' (this will throw an Error in a future version of PHP)
과
Warning: Use of undefined constant Y - assumed 'Y' (this will throw an Error in a future version of PHP)
의 에러의 의미는 무엇인가요?
템플릿에서 발생하는 오류 위치는 XE 문법을 모두 처리한 후의 결과물 기준이므로, 실제 템플릿 파일에서의 위치와 몇 줄 어긋날 수도 있습니다. 104~109줄이라고 나온다면 대략 90~120줄 사이를 모두 확인해 보세요.
<!--if($logged_info->is_admin == Y)-->
이런 코드가 있다면 그게 범인입니다. Y는 상수가 아니라 문자열이므로 'Y'라고 따옴표로 묶어야 하는데, 아주 오래 전에는 따옴표가 누락되어도 그냥 봐주었기 때문에 아직도 종종 저렇게 쓰는 경우가 있더군요. 다행히 아직은 워닝에 불과하지만, 차기 버전에서는 그냥 에러를 뿜고 뻗어버릴 거라고 에러메시지에서 경고하고 있네요.