서버 이전 작업 중 글쓰기 오류

서버 이전 작업 중 글쓰기 오류

QA

서버 이전 작업 중 글쓰기 오류

본문

 

 

안녕하세요. 현재 홈페이지 서버 이전 작업 중입니다.

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

php버전이 바뀌면서 발생되는 오류처럼 보여집니다.

 

패스나 변수에 대해 할당이 되지 않아 발생되는 오류로 보입니다.

config.php 파일 상단에



define('G5_VERSION', '그누보드5');

// 이 상수가 정의되지 않으면 각각의 개별 페이지는 별도로 실행될 수 없음
define('_GNUBOARD_', true);

if (PHP_VERSION >= '5.1.0') {



이렇게 표시되어 있는데, 5.1.0 버전 다운로드 해봐도 g5 폴더로 정의되어 있지 않습니다. 해결 방법이 있을까요?

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 Notice: Undefined index: device in /서버이름/www/common.php on line 546 Notice: Undefined index: device in /서버이름/www/common.php on line 548


이렇게 나오는데, 뭐가 문제인 걸까요 ..?


494 > if(is_file(G5_THEME_PATH.'/theme.config.php'))

546 >    if ($_REQUEST['device']=='pc')

548 >    else if ($_REQUEST['device']=='mobile')


입니다.

G5_THEME_PATH 변수 device라는 선언이 존재가 확인되지 않아 발생되는 오류인듯 한데
이게 버전의 환경이 문제일수도 있고
php.ini에서 기본 에러출력되게 선언되어 있어서 그럴듯 한데
ini_set('display_errors', '0'); 라는걸 상단에 선언해서 오류를 안보이게 처리하셔도 될겁니다.

plugin>editor 폴더 안의 파일이 문제였습니다. 기존 폴더의 파일로 교체하니 정상적으로 작동했습니다.

 

정말 고맙습니다.

한참 찾다가 해결했습니다.

답변을 작성하시기 전에 로그인 해주세요.
전체 123,129 | RSS
QA 내용 검색

회원로그인

(주)에스아이알소프트 / 대표:홍석명 / (06211) 서울특별시 강남구 역삼동 707-34 한신인터밸리24 서관 1404호 / E-Mail: admin@sir.kr
사업자등록번호: 217-81-36347 / 통신판매업신고번호:2014-서울강남-02098호 / 개인정보보호책임자:김민섭(minsup@sir.kr)
© SIRSOFT