I am facing problem while connecting cake php version-2.0.0-dev application on server. When I connect with localhost database, it works fine on server, but if I try to connect it with the database of the different server which is being hosted by another host, it gives following error:
Fatal error: Call to a member function getAttribute() on a non-object in
/home/dev.ukssmain/public_html/stock_system_ukrs/cake/libs/model/datasources/dbo/dbo_mysql.php
on line 259**
My configuration in database.php file is like
public $default = array(
'driver' => 'mysql',
'connect' => 'mysql_connect',
'host' => 'test.com',
'port' => '3306',
'login' => 'test',
'password' => 'test',
'database' => 'test',
'prefix' => ''
);
Can anybody help me to get through this.
Firstly, you should update to 2.0.6 (latest stable 2.0.x), or 2.2.2 which is the latest stable. You can find them here.
2.0.0-dev is unstable and outdated, you should use a stable version instead. I don’t know why you’d want to run a production site with a -dev version, you’re asking for problems.
Database configuration info can be found here.