2026, 새로운 도약을 시작합니다.

그누보드 설치2에서 오류 메시지 질문 ㅠ 채택완료

그누보드4 설치중입니다

오류 메시지 해결방안좀 부탁드립니다 ㅠㅠ
인스톨시 밑에 같은 메시지가 뜨는데

Warning: Use of undefined constant mysql_host - assumed 'mysql_host' (this will throw an Error in a future version of PHP) in /home/boomfile/html/install/install_db.php on line 25

Warning: Use of undefined constant mysql_user - assumed 'mysql_user' (this will throw an Error in a future version of PHP) in /home/boomfile/html/install/install_db.php on line 26

Warning: Use of undefined constant mysql_pass - assumed 'mysql_pass' (this will throw an Error in a future version of PHP) in /home/boomfile/html/install/install_db.php on line 27

Warning: Use of undefined constant mysql_db - assumed 'mysql_db' (this will throw an Error in a future version of PHP) in /home/boomfile/html/install/install_db.php on line 28

Warning: Use of undefined constant admin_id - assumed 'admin_id' (this will throw an Error in a future version of PHP) in /home/boomfile/html/install/install_db.php on line 29

Warning: Use of undefined constant admin_pass - assumed 'admin_pass' (this will throw an Error in a future version of PHP) in /home/boomfile/html/install/install_db.php on line 30

Warning: Use of undefined constant admin_name - assumed 'admin_name' (this will throw an Error in a future version of PHP) in /home/boomfile/html/install/install_db.php on line 31

Warning: Use of undefined constant admin_email - assumed 'admin_email' (this will throw an Error in a future version of PHP) in /home/boomfile/html/install/install_db.php on line 32

Warning: Use of undefined constant charset - assumed 'charset' (this will throw an Error in a future version of PHP) in /home/boomfile/html/install/install_db.php on line 34

Fatal error: Uncaught Error: Call to undefined function mysql_query() in /home/boomfile/html/install/install_db.php:34 Stack trace: #0 {main} thrown in /home/boomfile/html/install/install_db.php on line 34

인스톨 디비 php 파일을 보면

$mysql_host  = $_POST[mysql_host];
$mysql_user  = $_POST[mysql_user];
$mysql_pass  = $_POST[mysql_pass];
$mysql_db    = $_POST[mysql_db];
$admin_id    = $_POST[admin_id];
$admin_pass  = $_POST[admin_pass];
$admin_name  = $_POST[admin_name];
$admin_email = $_POST[admin_email];

if (strtolower($g4[charset]) == 'utf-8') @mysql_query("set names utf8");

이렇게 되어 있는데 어떻게 수정을 해줘야 되는건가요?

답변 2개

채택된 답변
+20 포인트

$mysql_host  = $_POST['mysql_host'];
$mysql_user  = $_POST['mysql_user'];
$mysql_pass  = $_POST['mysql_pass'];
$mysql_db    = $_POST['mysql_db'];
$admin_id    = $_POST['admin_id'];
$admin_pass  = $_POST['admin_pass'];
$admin_name  = $_POST['admin_name'];
$admin_email = $_POST['admin_email'];

로그인 후 평가할 수 있습니다

답변에 대한 댓글 4개

똑같이 해줬는데

Warning: Use of undefined constant charset - assumed 'charset' (this will throw an Error in a future version of PHP) in /home/boomfile/html/install/install_db.php on line 34

Fatal error: Uncaught Error: Call to undefined function mysql_query() in /home/boomfile/html/install/install_db.php:34 Stack trace: #0 {main} thrown in /home/boomfile/html/install/install_db.php on line 34

이 메시지는 뭔가요? ㅠㅠ
Policia님 말 처럼 이 부분 뿐만 아니라 설치에 필요한 파일 소스를 보면서 모두다 수정을 해줘야 할것 같습니다.
ex)단독 서버이면 php.ini에서 "display_errors = off"이렇게 수정하면 그대로 사용 할수도 있다고 합니다.
if (strtolower($g4['charset']) == 'utf-8') @mysql_query("set names utf8"); -->눈에 보이네요
안되네욤 ㅠㅠ

댓글을 작성하려면 로그인이 필요합니다.

해당오류는 php버전올라가면서 배열안에있는 문자열을 ''으로 감싸줘야합니다

아니면 상수나 숫자로 인식을해버리니깐요

흠.. 그누4면 옛버전이라 이런곳이 많을껀데.. 그누5로 진행하시는게 좋을것같아요

저런곳이 한두군대가 아닐것같아서 배열에 [mysql_host]이런식으로 되어있는 것들은 모두다 ['mysql_host']이런방식으로 바꿔주셔야합니다

로그인 후 평가할 수 있습니다

답변에 대한 댓글 6개

똑같이 해줬는데

Warning: Use of undefined constant charset - assumed 'charset' (this will throw an Error in a future version of PHP) in /home/boomfile/html/install/install_db.php on line 34

Fatal error: Uncaught Error: Call to undefined function mysql_query() in /home/boomfile/html/install/install_db.php:34 Stack trace: #0 {main} thrown in /home/boomfile/html/install/install_db.php on line 34

이 메시지는 뭔가요? ㅠㅠ
앞서 말씀드린것처럼 저렇게 되어있는부분을 모두 찾아 모두 바꿔주셔야합니다
아는분이 전체 파일을 주셔서 ftp에만 업로드 하라고 하셨는데 그게 그누4인가봐요 ㅠㅠ
이걸 그누5로 바꿀수가 있는건가요?
여기에 그누5 최신버전이있으니 .. 무엇을 진행할려고하시는지는 잘모르겠습디만 순정설치라면 차라리 그누5최신버전을 추천드립니다
아는분이 주신 파일에 그누보드4+테마파일(게시판,소스코드 등등)이 다 들어 있어서 이걸 그누보드5를 설치하고 어떻게 옮겨야 하는지 모르겠어서요 ㅠㅠ
먼가 커스텀된거라면... 쓰셔야죠 뭐... 받은분한테 설치를요청하시거나...
그누4로 제작된거면 어쩔수없죠

댓글을 작성하려면 로그인이 필요합니다.

답변을 작성하려면 로그인이 필요합니다.

로그인
🐛 버그신고