Blank screen in Code Igniter – CI – after upgrade – 5.2.6 PHP server [SOLVED]
If you are a Code Igniter developer and you are using PHP 5.2.6 you might be interested in this post. Getting a blank screen can mean a LOT of things. In an particular scenario while running PHP 5.2.6 (on a Windows machine) when installing/upgrading to Code Igniter 2.0.3 you get a blank screen. This happens because the current version of PHP does not support a function and the error is suppressed by @ sign. Supposedly this function was added after PHP 5.2.3 was released, but this error was found on a server running PHP 5.2.6.
In your "system" folder from your CI core files edit this file /database/drivers/msyql/mysql_driver.php, in line 125, by replacing the function "db_set_charset" with the following one.
* Set client character set
* @access public
* @param string
* @param string
* @return resource
function db_set_charset($charset, $collation)
if ( ! isset($use_set_names))
// mysql_set_charset() requires PHP &gt;= 5.2.3 and MySQL &gt;= 5.0.7, use SET NAMES as fallback
$use_set_names = (version_compare(PHP_VERSION, '5.2.3', '&gt;=') &amp;&amp; version_compare(mysql_get_server_info(), '5.0.7', '&gt;=')) ? FALSE : TRUE;
// not supported on some servers (i.e. mediatemple)!
return mysql_set_charset($charset, $this-&gt;conn_id);
return @mysql_query(&quot;SET NAMES '&quot;.$this-&gt;escape_str($charset).&quot;' COLLATE '&quot;.$this-&gt;escape_str($collation).&quot;'&quot;, $this-&gt;conn_id);
This should get you going!
Source: Code Igniter forum