mysql connection driver to dockerize the cakephp 1.3 application

88 Views Asked by At

.env file

export MYSQL_URL='mysql'
export MYSQL_USERNAME='root'
export MYSQL_PASSWORD=''

database.php file

class DATABASE_CONFIG {

public function __construct(){  
 $this->default['host'] = getenv('MYSQL_URL');  
 $this->default['login'] = getenv('MYSQL_USERNAME');  
 $this->default['password'] = getenv('MYSQL_PASSWORD');
}

var $default = array(
 'driver' => 'Cake\Database\Driver\Mysql',  // incompatible driver for cakephp 1.3
 'persistent' => false,
 'host' => '',
 'login' => '',
 'password' => '',
 'database' => 'RP',
 'prefix' => '',
 //'encoding' => 'utf8',
);
}

Unable to import DataSource class due to incompatible driver for the cake version used

enter image description here

please suggest a compatible mysql connection driver for cakephp 1.3 on docker

1

There are 1 best solutions below

2
Greg Schmidt On

CakePHP 1.3 didn't use namespaces. I think you just want 'driver' => 'mysql'.