Jump to:

1369 Posts in 487 Topics by 520 members

Themes

SilverStripe Forums » Themes » Trying to change a theme

Discuss SilverStripe Themes.

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

Page: 1 2
Go to End
Author Topic: 2427 Views
  • Semazen
    Avatar
    Community Member
    11 Posts

    Re: Trying to change a theme Link to this post

    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

  • Semazen
    Avatar
    Community Member
    11 Posts

    Re: Trying to change a theme Link to this post

    Sorry for the duplicate post

  • Willr
    Avatar
    Forum Moderator
    5489 Posts

    Re: Trying to change a theme Link to this post

    Please post the full error message / backtrace.

  • Semazen
    Avatar
    Community Member
    11 Posts

    Re: Trying to change a theme Link to this post

    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
    Source

    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       }
    41

    Trace

    * 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

  • Willr
    Avatar
    Forum Moderator
    5489 Posts

    Re: Trying to change a theme Link to this post

    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.

  • Semazen
    Avatar
    Community Member
    11 Posts

    Re: Trying to change a theme Link to this post

    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.html

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

    2427 Views
Page: 1 2
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.