Hi! I am using CakePHP 1.3.1 (stable) and I have an error with the database connection. I develop a page with cake in a dev server and all works fine but when I tried to run this site in our staging server I found this weird error:
mysql_query(): 134 is not a valid MySQL-Link resource [CORE/cake/libs/ model/datasources/dbo/dbo_mysql.php, line 600] mysql_query - [internal], line ?? DboMysql::_execute() - CORE/cake/libs/model/datasources/dbo/ dbo_mysql.php, line 600 DboMysql::listSources() - CORE/cake/libs/model/datasources/dbo/ dbo_mysql.php, line 613 Model::setSource() - CORE/cake/libs/model/model.php, line 768 Model::__construct() - CORE/cake/libs/model/model.php, line 474 User::__construct() - APP/models/user.php, line 8 ClassRegistry::init() - CORE/cake/libs/class_registry.php, line 141 Controller::loadModel() - CORE/cake/libs/controller/controller.php, line 641 Controller::constructClasses() - CORE/cake/libs/controller/ controller.php, line 497 Dispatcher::_invoke() - CORE/cake/dispatcher.php, line 186 Dispatcher::dispatch() - CORE/cake/dispatcher.php, line 171 require - APP/webroot/index.php, line 83 [main] - CORE/index.php, line 55 The weird thing is that there is not problem with the connection to the database in a first place, but when it try to use the connection in the _execute method it doesn't work. If I use the $this->connection variable inside the connect method in the dbo_mysql.php file after mysql_connect and mysql_select_db calls I can connect to the database and make queries without problem, but in the _execute method this doesn't work. Thanks, Mauro. Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
