채택완료

비밀번호 틀렸을 때 차단 소스 에러 한번 봐주세요!

2020-06-06 (토) 20:04:34 2,464

http://amina.co.kr/bbs/board.php?bo_table=skin_member&wr_id=10738

여기보고 잘 적용했는데요.

500 에러가 떠서 NGINX 로그 살펴보니 

2020/06/06 19:48:28 [error] 11857#11857: *24903 FastCGI sent in stderr: "PHP message: PHP Warning:  Use of undefined constant mb_id - assumed 'mb_id' (this will throw an Error in a future version of PHP) in /bbs/ar_hack_history.php on line 4
PHP message: PHP Fatal error:  Uncaught Error: Call to undefined function mysql_escape_string() in /bbs/ar_hack_history.php:10
Stack trace:
#0 {main}
  thrown in /bbs/ar_hack_history.php on line 10" while reading response header from upstream, client: 192.168.1.1, server: www.wsgvet.com, request: "GET /bbs/ar_hack_history.php HTTP/2.0", upstream: "fastcgi://unix:/var/run/php/php7.4-fpm.sock:", host: "www.wsgvet.com"

이렇게 에러가 뜨네요 ㅠㅠ

실제 해당 파일의 4번째줄과 10번째 줄은

<?php
include_once('./_common.php');

if (!$member[mb_id]) 
    alert_close("회원만 조회하실 수 있습니다.");


$list = array();

$sql_common = " from {$g5['point_table']} where mb_id = '".mysql_escape_string($member['mb_id'])."' and po_rel_table='@login_check'";

이렇게 되어있어요!

아마 mb_id 쪽이 문제인거 같은데... 해결 방법이 있을까요?

답변 2개 / 댓글 1개

채택된 답변
+20 포인트
Copy
<?php
include_once('./_common.php');

if (!$member['mb_id']) 
    alert_close("회원만 조회하실 수 있습니다.");


$list = array();

$sql_common = " from {$g5['point_table']} where mb_id = '".sql_escape_string($member['mb_id'])."' and po_rel_table='@login_check'";

답변에 대한 댓글 1개

감사합니다. 이제 에러는 안뜨는데.. 관리자로 로그인 후 눌러봐도 회원만 조회하실 수 있습니다. 라고 뜨네요 ㅠㅠ

음.. 이게 보다보니 DB에도 입력이 안되네요...

아마 너무 옛날 코드라서 최신 DB 규격에도 안맞나봐요. 흑흑

그냥 채택하고 포기합니다...

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