Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

Themes /

Discuss SilverStripe Themes.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Trying to change a theme

Go to End

14 Posts   2666 Views


Community Member, 11 Posts

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?



Community Member, 11 Posts

12 May 2010 at 9:05pm

Edited: 12/05/2010 9:05pm

Sorry for the duplicate post


Forum Moderator, 5513 Posts

12 May 2010 at 9:14pm

Please post the full error message / backtrace.


Community Member, 11 Posts

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

26    /**
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       }


* 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


Forum Moderator, 5513 Posts

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.


Community Member, 11 Posts

14 May 2010 at 12:11pm

Edited: 14/05/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 [url][/url]

PS. It was easy enough to install. We just couldn't change cache location or change theme.

Go to Top