I encouter a problem since this morning, after I migrated my website from my local machine to the server.
To replace the context, I developed a website with the framework CodeIgniter, and everything before the migration was working fine.
After a long research, it seems that when i put this :
$autoload['libraries'] = array('database');
I have a blank page on my website, without any php/ci errors in the logs.
And if I let this :
$autoload['libraries'] = array();
The website is working correctly (well, I can't log in but I don't have a blank page).
I added the mysql.so in the php.ini file, but it didn't help me neither.
Does someone already encountered this problem ? How can you solved it please ?
Thanks !
B
in application/config/database.php check that
$db['default']['dbdriver'] = 'mysql';
is set to
$db['default']['dbdriver'] = 'mysqli';
I had a similar problem with blank pages seemingly associated with loading the database, be it via autoload or calling $this->load->database();
in the model constructor. I ended up having to modify my 'php.ini' file by commenting out extension=php_pdo_mysql.dll
and uncommenting extension=php_mysql.dll
(i.e. turning PDO back off). I am running Windows 8.1, Apache 2.2, and PHP 5.3.27.
This answer is similar to another, but I couldn't add a comment for clarification since I just signed up. It took me a couple of hours and a lot of Googling to resolve, so hopefully this helps somebody.
Are you sure your db connection credentials are correct? If you switchd servers this seems like it might be the issue.
Additionally, CodeIgniter sets error_reporting(0) for production environments --- hence the blank page. Check your logs dir (is it writeable by the webserver process..?) for any other info.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With