서버 이전 작업 중 글쓰기 오류 채택완료
안녕하세요. 현재 홈페이지 서버 이전 작업 중입니다.
ftp와 db 이전 모두 완료했으나, 글쓰기에서 오류가 생겨 문의드립니다.
이전하기 전의 원래 서버에서는 최상위 폴더명이 g5로 되어있었고,
이전하는 서버의 최상위 폴더명은 www입니다.
현재 발생하는 에러는 다음과 같습니다.
Warning: Use of undefined constant G5_THEME_PATH - assumed 'G5_THEME_PATH' (this will throw an Error in a future version of PHP) in /서버이름/www/common.php on line 494
>> if(is_file(G5_THEME_PATH.'/theme.config.php'))
Notice: Undefined index: device in /서버이름/www/common.php on line 546
>> if ($_REQUEST['device']=='pc')
Notice: Undefined index: device in /서버이름/www/common.php on line 548
>> else if ($_REQUEST['device']=='mobile')
Warning: include_once(/서버이름/www/plugin/editor/SmartEditor/editor.lib.php): failed to open stream: No such file or directory in /서버이름/www/bbs/write.php on line 3
>> bbs/write.php >> include_once(G5_EDITOR_LIB);
Warning: include_once(): Failed opening '/서버이름/www/plugin/editor/SmartEditor/editor.lib.php' for inclusion (include_path='.:/usr/local/php73/lib/php') in /서버이름/www/bbs/write.php on line 3
Notice: Undefined index: wr_id in /서버이름/www/bbs/write.php on line 354 Fatal error: Uncaught Error: Call to undefined function editor_html() in /서버이름/www/bbs/write.php:405 Stack trace: #0 {main} thrown in /서버이름/www/bbs/write.php on line 405
354 >> set_session('ss_wr_id', $_REQUEST['wr_id']);
405 >> $editor_html = editor_html('wr_content', $content, $is_dhtml_editor);
어떻게 수정해야 오류가 사라지는지 아는 분 계신가요?
답변 2개
답변에 대한 댓글 7개
info.php 파일을 만들어서 해당 phpinfo();를 적용해 주시고 확인하시면 됩니다.
이렇게 나오는데, 뭐가 문제인 걸까요 ..?
494 > if(is_file(G5_THEME_PATH.'/theme.config.php'))
546 > if ($_REQUEST['device']=='pc')
548 > else if ($_REQUEST['device']=='mobile')
입니다.
이게 버전의 환경이 문제일수도 있고
php.ini에서 기본 에러출력되게 선언되어 있어서 그럴듯 한데
ini_set('display_errors', '0'); 라는걸 상단에 선언해서 오류를 안보이게 처리하셔도 될겁니다.
plugin>editor 폴더 안의 파일이 문제였습니다. 기존 폴더의 파일로 교체하니 정상적으로 작동했습니다.
댓글을 작성하려면 로그인이 필요합니다.
답변을 작성하려면 로그인이 필요합니다.
로그인
define('G5_VERSION', '그누보드5');
// 이 상수가 정의되지 않으면 각각의 개별 페이지는 별도로 실행될 수 없음
define('_GNUBOARD_', true);
if (PHP_VERSION >= '5.1.0') {
이렇게 표시되어 있는데, 5.1.0 버전 다운로드 해봐도 g5 폴더로 정의되어 있지 않습니다. 해결 방법이 있을까요?