정말 미치겠습니다. 좀 도와주세요!!
이것 땜에 며칠째 헤메고 있습니다.
php3에서는 잘 돌아가던 디비 커넥트 소스가 왜 php4를 설치 하고 나서
테스트 하니까 안되는 지 모르겠군요..
php4는 에러없이 잘 설치 했고 phpinfo();페이지를 봐도 mysql부분은 이상이 없는 것
같은데...
도대체 어디가 문제 인가요??
다음과 같은 에러 메시지가 나타납니다. 지금 localhost에서 테스트하고 있습니다.
Warning: Supplied argument is not a valid MySQL-Link resource in dbconn.inc on line 4
ERROR CODE 0 :
정말로 php3에서는 잘 돌아갔습니다.
참고로 소스를 보여드릴께요..
<?
$dbconn = mysql_connect("localhost","성용자 이름","비밀번호") || die("데이터베이스 연결에
실패하였습니다.");
$status = mysql_select_db("GUESTBOOK",$dbconn);
if (!$status) {
error("DB_ERROR");
exit;
}
?>
그리고 혹시 모르니php.ini의 mysql 설정 부분을 복사 해둘께요.
[MySQL]
mysql.allow_persistent=On
mysql.max_persistent=-1
mysql.max_links = -1
mysql.default_port =
; mysql_connect() will use the $MYSQL_TCP_PORT, or the mysql-tcp
; entry in /etc/services, or the compile-time defined MYSQL_PORT
; (in that order). Win32 will only look at MYSQL_PORT.
mysql.default_socket =
; MySQL defaults
mysql.default_host =
mysql.default_user =
mysql.default_password =
; Note that this is generally a *bad* idea to store passwords
이상입니다. 제발 좀 알려주세요!! ; in this file. *Any* user with PHP access can run
; 'echo cfg_get_var("mysql.default_password")' and reveal that
; password! And of course, any users with read access to this
; file will be able to reveal the password as well.
|