Derek Jones - 02 February 2008 04:07 PM
It is presently our intention to only support MySQL 4.1+. We have additional features planned for future versions of CodeIgniter that will also share that requirement. The product lifecycle completely terminates for MySQL 4.0 in December, when it will no longer even receive security updates. Unlike PHP 4’s surprise end of life announcement, this change is neither arbitrary nor unanticipated as there is a clear lifecycle policy that developers, hosts, and server vendors are all aware of.
For 1.6.0, this change is all that is necessary to continue using the MySQL driver with older versions, however that is not likely to be the case with future releases. In the interim while working on servers you cannot control, you may wish to keep a Wiki article up to date on the necessary code changes for quick reference.
We cannot say MySQL 4.0 or PHP 4.x are not important nowadays. There is no problem to install the latest version of PHP and MySQL on our test machines. But when projects are put online, especially on a web hosting server, it is not your call. Many web hosting providers are still using PHP 4.x and MySQL3.23. They think the old version is very stable.
BTW: Besides the “SET NAMES” issue, is there any other conflicts with MySQL3.x and 4.0? If there is not, I suggest to change db_set_charset() like
function db_set_charset($charset, $collation)
{
if (!$charset || !$collation)
{
return TRUE; // SET NAMES requires MySQL 4.1.x or later...
}
return @mysql_query("SET NAMES '".$this->escape_str($charset)."' COLLATE '".$this->escape_str($collation)."'", $this->conn_id);
}
So that users, who are still using an old version MySQL can use CodeIgniter without modifying mysql_driver.php by themselves.