codeigniter 2.1.3 and sqlite 3 doesn't work |
[eluser]Unknown[/eluser]
Hi , I'm trying to work with sqlite , I follow the instruction in the following blog http://khromov.wordpress.com/2012/06/22/...databases/ but when I request any page I get : Quote:Fatal error: Uncaught exception 'PDOException' with message 'could not find driver' in /var/www/eit/system/database/drivers/pdo/pdo_driver.php:114 Stack trace: #0 /var/www/eit/system/database/drivers/pdo/pdo_driver.php(114): PDO->__construct('sqlite:/applica...', '', '', Array) #1 /var/www/eit/system/database/DB_driver.php(115): CI_DB_pdo_driver->db_pconnect() #2 /var/www/eit/system/database/DB.php(148): CI_DB_driver->initialize() #3 /var/www/eit/system/core/Loader.php(346): DB('', NULL) #4 /var/www/eit/system/core/Loader.php(1171): CI_Loader->database() #5 /var/www/eit/system/core/Loader.php(152): CI_Loader->_ci_autoloader() #6 /var/www/eit/system/core/Controller.php(51): CI_Loader->initialize() #7 /var/www/eit/application/controllers/main.php(13): CI_Controller->__construct() #8 /var/www/eit/system/core/CodeIgniter.php(308): Main->__construct() #9 /var/www/eit/index.php(202): require_once('/var/www/eit/sy...') #10 {main} thrown in /var/www/eit/system/database/drivers/pdo/pdo_driver.php on line 114 my databas.php file : Code: $active_group = 'default'; my sqlite db located in : application/db/eit.sqlite. please help
[eluser]TheFuzzy0ne[/eluser]
Are you sure you have the SQLite PDO driver installed?
[eluser]Unknown[/eluser]
I'ts wasn't I installed it and now it's working , thanks for reply ..
[eluser]marega[/eluser]
I am having the same issue. How do I install the SQLite PDO driver?
[eluser]TheFuzzy0ne[/eluser]
It should be a PHP extension that needs to be enabled. What server environment are you running?
[eluser]marega[/eluser]
Oh, i see. I am using xampp 2.5. The thing is. Ive managed to get SqLite working just fine running TinyMVC: https://github.com/eimg/tinymvc So, the server environment seem to be able to handle Sqlite. Its very confusing. Any leads is much appreciated.
[eluser]TheFuzzy0ne[/eluser]
Hmm... Please post your ./application/config/database.php file (remove any sensitive information first).
[eluser]marega[/eluser]
Code: <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
[eluser]TheFuzzy0ne[/eluser]
OK, I think the next sensible step to take would be to create a controller that calls phpinfo(). Does that mention anything about SQLite?
[eluser]Unknown[/eluser]
Hi there, I'm new here and was just investigating, if CI is something for me. I'm not even a PHP-developer, therefore I need something easy ;-) Since I work mostly with SQLite-databases, I first tried to get CI to work with pretty vanilla SQLite... But it has it's problems. I'm sporting the same error as above: I can query the database (mostly) fine, but as soon as I try to create tables or make some database management I get this exception: Fatal error: Call to a member function execute() on a non-object in /Users/andy/Sites/admin-pro/system/database/drivers/pdo/pdo_driver.php on line 193 A quick look at CI's pdo_driver shows, that it's not really like I imagined, a pdo driver would be For instance, it calls 'Show Columns' on an internal function. But this SQL-statement is MySQL only. Code: function _list_columns($table = '') Code: function _list_columns($table = '') Using a external database-management tool is not an option for me, since I need to create tables and fields from within my UI. Cheers andy |
Welcome Guest, Not a member yet? Register Sign In |