title: Accessing an Amazon RDS MySQL database from CodeIgniter leads a blank display
body: <p>This is related to <a href="https://stackoverflow.com/questions/29869442/codeigniter-1-72-and-php-5-3-29-compatible">this previous question</a>. I'm making it a new question because at this point I believe it's a database access issue.</p>
  
  <p>Essentially, I've switched the database from a MySql sever to an Amazon RDS MySql server, due to server migration.  To summarize, I'm attempting to migrate a PHP site based on CodeIgniter (version 1.7.2) to a new server which has AmazonLinux as the OS. The previous server was Ubuntu, running PHP 5.3.3-1ubuntu9.5 on Apache2. The PHP version on the new AmazonLinux server is 5.3.29, running on httpd.</p>
  
  <p>The problem is, when I try to access the URL in the new server, I get a blank display. The code is stopping in system/core/CodeIgniter.php at this line:</p>
  
  <pre><code>$CI = new $class();
  </code></pre>
  
  <p>The last line of the application log is this: </p>
  
  <pre><code>DEBUG - 2015-04-25 17:17:58 --&gt; Database Driver Class Initialized
  </code></pre>
  
  <p>So, it's happening around the database. I've also read that you get a blank display if it's a database issue due to an "@" being used for database-related messages. </p>
  
  <p>These are the settings in database.php: </p>
  
  <pre><code>$active_group = "default";
  $active_record = TRUE;
  $db['default']['hostname'] = "xxxxx.xxxxxxxx.us-east-1.rds.amazonaws.com";
  $db['default']['username'] = "xxxxx";
  $db['default']['password'] = "xxxxx";
  $db['default']['database'] = "xxxxx";
  $db['default']['dbdriver'] = "mysql";
  $db['default']['port'] = 3306;
  $db['default']['dbprefix'] = "";
  $db['default']['pconnect'] = TRUE;
  $db['default']['db_debug'] = "TRUE";
  // $db['default']['cache_on'] = FALSE;
  $db['default']['cache_on'] = FALSE;
  $db['default']['cachedir'] = "/opt/xxxxx/cachedb/";
  $db['default']['char_set'] = "utf8";
  $db['default']['dbcollat'] = "utf8_general_ci";
  </code></pre>
  
  <p>I also tried it without the port specified (as it's set up on the current production site) as well as with the port specified at the end of the url: </p>
  
  <pre><code>$db['default']['hostname'] = "xxxxx.xxxxxxxx.us-east-1.rds.amazonaws.com:3306";
  </code></pre>
  
  <p>But I'm still getting the blank display. </p>
  
  <p>We have a Java/Tomcat application running on the same server that is able to access the RDS database, using the same url, name and password, so it doesn't appear to be an issue of security groups.</p>
  
  <p>Any thoughts on what the problem might be?  and if so how to solve? </p>
  
  <p>Edit 1: I've tracked down the problem - not surprisingly, it's the database driver. It fails when calling this function: 
  system/database/drivers/mysqli/mysqli_driver.php:  function db_pconnect()</p>
  
  <p>The question is, can I just copy in a more recent driver into this older version of CodeIgnitor and it will miraculously work? I'll try that experiment tomorrow. Otherwise, we might be looking at an upgrade. Grim, but it should theoretically work, since it will have an up-to-date driver. Right? </p>