CodeIgniter Forums
Is sqlite support broken? - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: Is sqlite support broken? (/showthread.php?tid=51037)



Is sqlite support broken? - El Forum - 04-18-2012

[eluser]Starovich[/eluser]
I am trying to load up an SQLite database, but am seeing hard blank pages, even with maximum error reporting enabled, as soon as I load the db class I get a blank page back.

Has anyone gotten this kind of setup running? What are your settings?

Here is my database.php
Code:
$db['default']['hostname'] = '';
$db['default']['username'] = '';
$db['default']['password'] = '';
$db['default']['database'] = 'sqlite:/var/www/html/test/db/db.sqlite';
$db['default']['dbdriver'] = 'sqlite';
$db['default']['dbprefix'] = '';
$db['default']['pconnect'] = FALSE;
$db['default']['db_debug'] = TRUE;
$db['default']['cache_on'] = FALSE;
$db['default']['cachedir'] = '';
$db['default']['char_set'] = 'utf8';
$db['default']['dbcollat'] = 'utf8_general_ci';
$db['default']['swap_pre'] = '';
$db['default']['autoinit'] = TRUE;
$db['default']['stricton'] = FALSE;

CodeIgniter 2.1.0


Is sqlite support broken? - El Forum - 04-18-2012

[eluser]Phil Sturgeon[/eluser]
Blank pages normally mean a fatal error is happening and error reporting is disabled. I'd check your PHP logs to see what is going on.


Is sqlite support broken? - El Forum - 04-18-2012

[eluser]InsiteFX[/eluser]
Do a view source of the blank page and see if anything is in it like wierd characters etc.

Which will happen if your saving your files with the BOM!



Is sqlite support broken? - El Forum - 04-18-2012

[eluser]Starovich[/eluser]
[quote author="Phil Sturgeon" date="1334788262"]Blank pages normally mean a fatal error is happening and error reporting is disabled. I'd check your PHP logs to see what is going on.[/quote]

Hi!

Here is my .htaccess for enabling error reporting:
Code:
php_flag display_errors on
php_flag display_startup_errors on
php_value error_reporting 2047

Also I have set error_reporting(E_ALL); in the controller where i attempt to load database.

Apache error log doesn't turn up anything, and access log says the empty requests were server with HTTP. status code 200.

Thanks for your help!


Is sqlite support broken? - El Forum - 04-18-2012

[eluser]CroNiX[/eluser]
Set that in your index.php (in the appropriate ENVIRONMENT section) instead of your htaccess. The values in index.php are overriding your htaccess since it is changing them there and htaccess gets processed before index.php.


Is sqlite support broken? - El Forum - 04-18-2012

[eluser]Starovich[/eluser]
[quote author="CroNiX" date="1334790550"]Set that in your index.php (in the appropriate ENVIRONMENT section) instead of your htaccess. The values in index.php are overriding your htaccess since it is changing them there and htaccess gets processed before index.php.[/quote]

It's already in development mode. Sad
Code:
define('ENVIRONMENT', 'development');



Is sqlite support broken? - El Forum - 04-18-2012

[eluser]CroNiX[/eluser]
Great, but you might want to reread what I wrote.


Is sqlite support broken? - El Forum - 06-22-2012

[eluser]Starovich[/eluser]
Did eventually figure this out by using PDO, check here for solution:
http://ellislab.com/forums/viewthread/219712/