I'm having trouble with a CakePHP website. I've dropped my app directory into a staging folder so it's a duplicate of the live site. So the structure looks like this:
app
config
...
webroot
cake
config
...
tests
docs
staging
app
config
...
webroot
vendors
vendors
I've set the CAKE_CORE_INCLUDE_PATH
constant in /staging/app/webroot/index.php to the root directory where my cake folder is, and set my database settings in /staging/app/config/database.php.
Now, although the site at http://domain.com/staging/ seems to be working, I'm getting the following errors at the top of my page:
Warning (2): mysql_connect() [function.mysql-connect]: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) [CORE/cake/libs/model/datasources/dbo/dbo_mysql.php, line 117]
Warning (2): mysql_select_db(): supplied argument is not a valid MySQL-Link resource [CORE/cake/libs/model/datasources/dbo/dbo_mysql.php, line 122]
Warning (2): mysql_get_server_info(): supplied argument is not a valid MySQL-Link resource [CORE/cake/libs/model/datasources/dbo/dbo_mysql.php, line 130]
Warning (2): mysql_real_escape_string() expects parameter 2 to be resource, boolean given [CORE/cake/libs/model/datasources/dbo/dbo_mysql.php, line 247]
Warning (2): mysql_query(): supplied argument is not a valid MySQL-Link resource [CORE/cake/libs/model/datasources/dbo/dbo_mysql.php, line 152]
Warning (2): mysql_errno(): supplied argument is not a valid MySQL-Link resource [CORE/cake/libs/model/datasources/dbo/dbo_mysql.php, line 329]
Warning (2): session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /users/ia/www.cantifix.co.uk/cake/basics.php:111) [CORE/cake/libs/session.php, line 535]
Warning (2): Cannot modify header information - headers already sent by (output started at /users/ia/www.cantifix.co.uk/cake/basics.php:111) [CORE/cake/libs/session.php, line 536]
What's going on? My database connection settings seem to be correct as like aforementioned, the site works as it should (except for these error messages).
If any one has any tips or pointers for multiple apps using a single cake library, I'd be most grateful.