1267 Posts in 351 Topics by 486 members
| Go to End | ||
| Author | Topic: | 1972 Views |
-
Re: Trying to change a theme

12 May 2010 at 9:03pm
Yes, you're quite right. Got an informative message.
Line 35 in /sapphire/core/model/MySQLDatabase.php
35 $this->dbConn = mysql_connect($parameters['server'], $parameters['username'], $parameters['password']);
seems to be the problem. Do I edit that file now?
Thanks
-
Re: Trying to change a theme

12 May 2010 at 9:05pm Last edited: 12 May 2010 9:05pm
Sorry for the duplicate post
-
Re: Trying to change a theme

12 May 2010 at 11:40pm
Yes, of course. Here it is:
[Warning] mysql_connect() [function.mysql-connect]: Unknown MySQL server host 'apcdev_silver' (1)
GET /03/Line 35 in /home/useraccount/public_html/cms/03/sapphire/core/model/MySQLDatabase.php
Source26 /**
27 * Connect to a MySQL database.
28 * @param array $parameters An map of parameters, which should include:
29 * - server: The server, eg, localhost
30 * - username: The username to log on with
31 * - password: The password to log on with
32 * - database: The database to connect to
33 */
34 public function __construct($parameters) {
35 $this->dbConn = mysql_connect($parameters['server'], $parameters['username'], $parameters['password']);
36 $this->active = mysql_select_db($parameters['database'], $this->dbConn);
37 $this->database = $parameters['database'];
38 if(!$this->dbConn) {
39 $this->databaseError("Couldn't connect to MySQL database");
40 }
41Trace
* mysql_connect(apcdev_silver,apcdev_silver,banane6)
Line 35 of MySQLDatabase.php
* MySQLDatabase->__construct(Array)
Line 79 of DB.php
* DB::connect(Array)
Line 112 of main.php -
Re: Trying to change a theme

13 May 2010 at 12:13am
Ok so that error means SS cannot connect to your MySQL server. In your install you would of put 'apcdev_silver' as your mysql server / hostname which to me is wrong. Normally this would be a URL or something like 'localhost'. To change it have a look at your mysite/_config file.
-
Re: Trying to change a theme

14 May 2010 at 12:11pm Last edited: 14 May 2010 12:12pm
Thanks Willr, but we're going to uninstall it and start from scratch.
Advice or links to info on two things would help though:
1) How to set the SilverStripe cache directory under /public_html
2) How to change the theme to one of these http://www.theme4.com/free-silverstripe-themes.htmlThanks
PS. It was easy enough to install. We just couldn't change cache location or change theme.
| 1972 Views | ||
| Go to Top |


