Pagodabox - Laravel4 setting different database provider

227 Views Asked by At

I'm using pagodabox for hosting my laravel 4 application and I'm using my database from different hosting website everything is working great as long as I'm working locally

Once I switch to the live app I'm getting this error for example when I'm trying to log in

QLSTATE[42S02]: Base table or view not found: 1146 Table 'claire.bradoseusers' doesn't exist (SQL: select * from bradoseusers where Email = ? limit 1)

claire is the default database that comes with pagodabox apparently it didn't recognize my database that configured in config/database.php

'mysql' => array(
        'driver'    => 'mysql',
        'host'      => isset($_SERVER['DB1_HOST']) ? $_SERVER['DB1_HOST'] : 'ee2fb886-ff12-48f4-979c-a24e00dfa38c.mysql.sequelizer.com',
        'database'  => isset($_SERVER['DB1_NAME']) ? $_SERVER['DB1_NAME'] : 'dbee2fb886ff1248f4979ca24e00dfa38c',
        'username'  => isset($_SERVER['DB1_USER']) ? $_SERVER['DB1_USER'] : 'username',
        'password'  => isset($_SERVER['DB1_PASS']) ? $_SERVER['DB1_PASS'] : 'password',
        'charset'   => 'utf8',
        'collation' => 'utf8_unicode_ci',
        'prefix'    => '',
    ),

is there any extra configuration needed to solve this ?

1

There are 1 best solutions below

1
Dirk de Man On

Laravel uses PDO. Did you configure your .box file for this?

Add:

php_extensions: [pdo_mysql]

More info here