Undefined variable: g4 오류가 생겨요

Undefined variable: g4 오류가 생겨요

QA

Undefined variable: g4 오류가 생겨요

답변 4

본문

안녕하세요

 

그누보드4로 사이트 운영중인데 IP 변경 문제로 인해서

 

IP 변경후에 (다른 작업은 전혀 하지 않았습니다, 리부팅,  apache, mysql 재시작만)

 

접속을 하면 Undefined variable: g4 오류가 발생합니다.

 

g4 변수가 인식을 못하니 경로 찾는것도 문제가 생기네요

 

오류 메시지

 

[Fri Mar 11 11:31:37 2016] [error] [client ] PHP Notice:  Undefined variable: g4 in /home/xxx/html/index.php on line 3
[Fri Mar 11 11:31:37 2016] [error] [client ] PHP Warning:  include_once(/lib/latest.lib.php): failed to open stream: No such file or directory in /home/xxx/html/index.php on line 3
[Fri Mar 11 11:31:37 2016] [error] [client ] PHP Warning:  include_once(): Failed opening '/lib/latest.lib.php' for inclusion (include_path='.:/usr/share/pear:/usr/share/php') in /home/xxx/html/index.php on line 3
[Fri Mar 11 11:31:37 2016] [error] [client ] PHP Notice:  Undefined index: board_table in /home/xxx/html/index.php on line 11
[Fri Mar 11 11:31:37 2016] [error] [client ] PHP Fatal error:  Call to undefined function sql_query() in /home/xxx/html/index.php on line 13

 

참고로 첫번째 index.php 3라인은 include_once("$g4[path]/lib/latest.lib.php"); 입니다.

 

익스플로러11로 접속을 하면 500 오류

크롬으로 접속하면 select bo_table, bo_subject from order by gr_id, bo_table

화면에 위 쿼리만 나오네요

g4 변수가 인식이 안되니 from 다음에 테이블명이 와야 되는데 못오는거 같습니다.

 

동작을 잘 하던것이 IP만 바꾸고 서버 재부팅후 서비스들만 다시 시작했는데

 

안되니깐 정말 답답합니다.

 

혹시 이런 증상 겪어 보신분 계시면 조언 부탁드립니다.

 

감사합니다. 좋은 하루 되세요~  

이 질문에 댓글 쓰기 :

답변 4

ip 변경때문에 그런다구요?

혹시 php 버젼이 다른것이 아닌가 싶은데요?????? 

url이 어떻게 되나요

 

주석처리를 하면 다른 오류가 나는데 어차피 위에 썼드시 g4가 undefined 되어서 오류가 계속 되네요

$sql = " select bo_table, bo_subject from $g4[board_table] order by gr_id, bo_table ";

3라인 주석후에 위에 쿼리문에서 오류가 나는데 table명이 $g4[board_table] 로 되어 있어

오류가 나게 됩니다. ( 오류 : Undefined index: board_table in )

$sql = " select bo_table, bo_subject from $g4[board_table] order by gr_id, bo_table ";  

이구문에서  

$sql = " select bo_table, bo_subject from ".$g4['board_table']." order by gr_id, bo_table ";  

이렇게 바꿔보세요 오류가 똑같이 나는지 안나는지 

common.php 파일에서 에러리포팅 변경해보세요

단순 경고니까  

error_reporting(E_ALL);

===>

error_reporting(E_ALL ^ E_NOTICE);

이렇게요 

답변을 작성하시기 전에 로그인 해주세요.
QA 내용 검색
질문등록
전체 1
© SIRSOFT
현재 페이지 제일 처음으로