lundi 20 juillet 2015

Code Igniter 3 database error from apache to nginx

I'm working on a Code Igniter project which I'm testing with Apache, PHP & Sqlite (included with PHP). I use this dbcon code as CI3 config file for the database:

$active_group = 'default';
$query_builder = TRUE;

$db['default'] = array(
    'dsn'   => 'sqlite:'.APPPATH.'database/database.db',
    'hostname' => '',
    'username' => '',
    'password' => '',
    'database' => '',
    'dbdriver' => 'pdo',
    'dbprefix' => '',
    'pconnect' => FALSE,
    'db_debug' => TRUE,
    'cache_on' => FALSE,
    'cachedir' => '',
    'char_set' => 'utf8',
    'dbcollat' => 'utf8_general_ci',
    'swap_pre' => '',
    'encrypt' => FALSE,
    'compress' => FALSE,
    'stricton' => FALSE,
    'failover' => array(),
    'save_queries' => TRUE
);

So this works flawless on my apache test server but the exact same code on my LEMP stack gives me this error:

    A Database Error Occurred

could not find driver

Filename: core/CodeIgniter.php

Line Number: 500

I chmodded all the CI3 code igniter database files with diffirent file permitions (744, 777) and made an 1:1 copy of all the files including the database file from the apache server to the nginx server.

Any tips / suggestions what I'm doing wrong at this point? :(

Aucun commentaire:

Enregistrer un commentaire