Codeigniter를 서버에 올렸을 때 Headers and client library minor version mismatch. Headers:00000 Library:00000 오류가 발생하는 경우가 있다. 이 오류는 코드이그나이터 데이터베이스 드라이버 파일의 MySQLi 연결 시 헤더와 클라이언트 라이브러리의 버전이 일치하지 않아서 생기는 문제인데 해결법은 아래와 같다.

{www root}/system/database/drivers/mysqli/mysqli_driver.php 파일의 203번줄에 있는

if ($this->_mysqli->real_connect($hostname, $this->username, $this->password, $this->database, $port, $socket, $client_flags))

이 코드를 아래와 같이 수정하면 해결된다.

if (@$this->_mysqli->real_connect($hostname, $this->username, $this->password, $this->database, $port, $socket, $client_flags))

DB통신은 가능하지만 에러메시지에 막혀있던 상태를 PHP의 error control operator인 @ prefix를 붙여서 표현상에서 발생하는 에러를 무시해주는 것으로 해결하는 방식.


WRITTEN BY
artfrige
베이스 연주는 건강에 좋습니다
,