클라우드이전 후 글 쓰기, 수정 미동작문의
안녕하세요.
클라우드 서버로 이전 후 읽기 및 로그인 등은 잘 이루어집니다.
문제는 쓰기, 수정 동작 등 DB단에 작성하는 부분에서 문제가 일어나고있습니다.
어떤 부분을 점검해 보면 좋을까요?
www 폴더는 755 퍼미션
data 및 data/cache 폴더는 707 퍼미션
이며, db연결에는 문제가 없습니다.
DB접속 user는 test 이며 아래와 같이 설정되어있습니다.
grant all privileges on 데이터베이스명.* to test@'localhost';
config.php G5_DISPLAY_SQL_ERROR는 TRUE로 설정하였으며, 게시판 글 수정시
별도 write_update.php에서 오류를 뿌리고 있지는 않고 멈춰있습니다. (redirect 안됨)
그럼 고수님들의 조언을 부탁드립니다.
답변 6개 / 댓글 5개
https://dev.mysql.com/doc/refman/5.7/en/sql-mode.html#sql-mode-strict
설정 같습니다.
-
For
STRICT_ALL_TABLES, MySQL returns an error and ignores the rest of the rows. However, because the earlier rows have been inserted or updated, the result is a partial update. To avoid this, use single-row statements, which can be aborted without changing the table. -
For
STRICT_TRANS_TABLES, MySQL converts an invalid value to the closest valid value for the column and inserts the adjusted value. If a value is missing, MySQL inserts the implicit default value for the column data type. In either case, MySQL generates a warning rather than an error and continues processing the statement. Implicit defaults are described in Section 11.6, “Data Type Default Values”.
아래 쿼리로 insert / update 관련 권한 확인도 해보시고
USE mysql;
SELECT * FROM db WHERE host = 'localhost' AND user = 'test';
이상이 없으면
lib/common.lib.php 에서
function sql_query 에 있는 부분
@mysql_query(...
@mysqli_query(...
을
mysql_query(...
mysqli_query(...
처럼 임시 수정후 확인이 필요할것 같습니다.
해당 만으로는 파악하기가 어렵고 write_update.php 파일에서 일정 작업을 하는 부분마다 echo 'a';
exit; 를 해서 작동을 하는지 확인을 하시고 안되는 부분을 찾아서 일단 원인을 찾아보셔야 할거 같습니다.
답변에 대한 댓글 4개
답변을 작성하려면 로그인이 필요합니다.