php 8.1 버전대 sir 함수 에러 문의 채택완료
안녕하세요.
아래처럼 에러가 발생해서 홈페이지가 일부만 보이는 현상이 있습니다.
thrown in /home/yplab/www/lib/uri.lib.php on line 196" while reading response header from upstream, client: 183.103.74.109, server: test2ab.org, request: "GET / HTTP/1.1", upstream: "fastcgi://unix:/run/php/php8.1-fpm.sock:", host: "test2ab.org", referrer: "http://test2ab.org/" 2022/02/19 10:38:51 [error] 90663#90663: *62 FastCGI sent in stderr: "PHP message: PHP Warning: Constant _INDEX_ already defined in /home/yplab/www/theme/ypl/index.php on line 2PHP message: PHP Fatal error: Uncaught Error: Undefined constant "G5_SEO_TITEL_WORD_CUT" in /home/yplab/www/lib/uri.lib.php:196 Stack trace: #0 /home/yplab/www/lib/uri.lib.php(286): generate_seo_title() #1 /home/yplab/www/lib/common.lib.php(381): seo_title_update() #2 /home/yplab/www/lib/latest.lib.php(71): get_list() #3 /home/yplab/www/theme/ypl/mobile/index.php(12): latest() #4 /home/yplab/www/theme/ypl/index.php(6): include_once('...') #5 /home/yplab/www/index.php(8): require_once('...') #6 {main} thrown in /home/yplab/www/lib/uri.lib.php on line 196" while reading response header from upstream, client: 183.103.74.109, server: test2ab.org, request: "GET / HTTP/1.1", upstream: "fastcgi://unix:/run/php/php8.1-fpm.sock:", host: "test2ab.org", referrer: "http://test2ab.org/"
어떻게 하면 좋을까요?
답변 5개
bihon님 답변에서
G5_SEO_TITEL_WORD_CUT <--이것이 title 철자가 잘못 되었으나
config.php에서 define('G5_SEO_TITEL_WORD_CUT', 8); 이와같이 동일하게 철자가 되어있으므로 오류가 아닙니다
질문자의 config.php가 예전 것이어서 나타난 에러 같은데 예전 그누에서 버젼을 업그레이드한 것인가요?
하여튼 config.php를 버젼에 맞는 것으로 교체해보세요
-----------------------
Constant _INDEX_ already defined in /home/yplab/www/theme/ypl/index.php on line 2
<--- 이 에러는 _INDEX_을 두번 defined했다는 것이니 아래 코드 찾아서 하나는 삭제
define('_INDEX_', true);
답변에 대한 댓글 2개
uri.lib.php에서도 G5_SEO_TITEL_WORD_CUT 이렇게 되어있어서 정상설치한 것이면 에러가 나지않는다는 것입니다 (버젼 5.4.29 참고)
따라서 config.php와 uri.lib.php가 서로 다른 버젼 같다는 갓입니다
댓글을 작성하려면 로그인이 필요합니다.
댓글을 작성하려면 로그인이 필요합니다.
Stack trace: #0 /home/yplab/www/lib/uri.lib.php(286): generate_seo_title() #1 /home/yplab/www/lib/common.lib.php(381): seo_title_update() #2 /home/yplab/www/lib/latest.lib.php(71): get_list() #3 /home/yplab/www/theme/ypl/mobile/index.php(12): latest() #4 /home/yplab/www/theme/ypl/index.php(6): include_once('...') #5 /home/yplab/www/index.php(8): require_once('...')
이런 메시지들로 인해 홈페이지가 정상적으로 안 나타나는것 같네요.
답변에 대한 댓글 1개
> 이해되지 않아요.
아무튼, 웹 서버의 에러 로그를 보면 좀 더 정확한 오류 원인이 나올 겁니다.
5.4 마지막 버전에서 data 디렉터리(외래어 표기) 남겨놓고,
5.5.1 버전으로 접속해보니 위와 관련한 "미정의 배열 키" 오류가 뜨던데
어떤 버전/환경에서 발생한 문제인가요?
원격으로 보면 편한데, 조금 답답하게 진행되는군요. 하아.
잘 해결되길 바랍니다!
댓글을 작성하려면 로그인이 필요합니다.
답변에 대한 댓글 1개
댓글을 작성하려면 로그인이 필요합니다.
개발자의 실수군요. 아래처럼 철자 변경하면 됩니다.
G5_SEO_TITEL_WORD_CUT
→
G5_SEO_TITLE_WORD_CUT
답변에 대한 댓글 1개
댓글을 작성하려면 로그인이 필요합니다.
답변을 작성하려면 로그인이 필요합니다.
로그인
zip tar.gz path 모두 받아서 config.php 파일 확인,
G5_SEO_TITLE_WORD_CUT 으로 잘 지정되어 있네요.
동일하게 오타였으면 오류가 뜨지 않았겠죠.