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.

General Questions

General questions about getting started with SilverStripe that don't fit in any of the categories above.

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

Server Error


Reply

6 Posts   1292 Views

Avatar
Hery

12 March 2012 at 4:22am Community Member, 14 Posts

Please help me, whenever I visit my web site appear "Server error

Sorry, there was a problem with handling your request.

Generated with the default template ContentController.ss "

Attached Files
Avatar
novaweb

12 March 2012 at 10:33am Community Member, 115 Posts

Hey Hery,

Need more info...

Has the website ever worked? (have you completed installation process?)

In mysite/_config.php paste this to set your site to dev mode, it may give you more info:

Director::set_environment_type("dev");

Cheers,
Josh

Avatar
Hery

12 March 2012 at 4:03pm Community Member, 14 Posts

Yes, this site has been running about 1 month. initially normal, and I can also update by CMS. I will try your suggestion now, and inform you.

Avatar
Hery

12 March 2012 at 4:22pm Community Member, 14 Posts

Dear Josh

After i pasted to _config.php this line "Director::set_environment_type("dev");"
it now appears:

[Warning] mysql_connect() [function.mysql-connect]: Access denied for user 'u854568002_hc'@'10.2.1.2' (using password: YES)
GET /

Line 57 in /home/u854568002/public_html/sapphire/core/model/MySQLDatabase.php

Source

48     * Connect to a MySQL database.
49     * @param array $parameters An map of parameters, which should include:
50     * - server: The server, eg, localhost
51     * - username: The username to log on with
52     * - password: The password to log on with
53     * - database: The database to connect to
54     * - timezone: (optional) The timezone offset. For example: +12:00, "Pacific/Auckland", or "SYSTEM"
55     */
56    public function __construct($parameters) {
57       $this->dbConn = mysql_connect($parameters['server'], $parameters['username'], $parameters['password'], true);
58
59       if(self::$connection_charset) {
60          $this->query("SET CHARACTER SET '" . self::$connection_charset . "'");
61          $this->query("SET NAMES '" . self::$connection_charset . "'");
62       }
63

Trace

mysql_connect(<filtered>,<filtered>,<filtered>,<filtered>)
Line 57 of MySQLDatabase.php
MySQLDatabase->__construct(Array)
Line 97 of DB.php
DB::connect(<filtered>)
Line 121 of main.php

then what should I do?

thank
hery

Avatar
swaiba

12 March 2012 at 9:46pm Forum Moderator, 1796 Posts

Seriously...

mysql_connect() [function.mysql-connect]: Access denied for user 'u854568002_hc'@'10.2.1.2' (using password: YES)

...you don't know what this might mean? And no, I don't know you correct database credentials...

Avatar
Hery

12 March 2012 at 10:09pm Community Member, 14 Posts

I know, but why this had happened after 1 month. But this issue is resolved, the database error, I can not login with my password. then I delete it and create a new database and than i import my data , now it is running normally.
Thanks for the help.

Hery Cahyadi