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.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

Installing SilverStripe /

Getting SilverStripe up and running on your computer and on your web server.

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

installation problem : sapphire/core/model/Database.php on line 431


Go to End


2849 Views

Avatar
sgesub

Community Member, 1 Post

18 December 2008 at 2:24pm

Hey everyone,

Tried install, but always run into this error. Here's what I did.

1) download the 2.2.3 tar, uploaded to hosting (a virtual slice), untar to /public_html/[my site name]/public_html/sgdcsite4/silverstripe-v2.2.3

2) created MySql database

3) launched install.php, provided MySql connection (db name, user, pw, localhost), checked and the connection is working. Proceeded with installation.

The install quit very quickly. Below is the msg:

================

Installing SilverStripe...

I am now running through the installation steps (this should take about 30 seconds)

If you receive a fatal error, refresh this page to continue the installation
# Creating 'mysite/_config.php'...
# Creating /home/[my site name]/public_html/sgdcsite4/silverstripe-v2.2.3/mysite/_config.php
# Creating '.htaccess' file...
# Creating /home/[my site name]/public_html/sgdcsite4/silverstripe-v2.2.3/.htaccess
# Building database schema...

Fatal error: DATABASE ERROR: Couldn't connect to MySQL database in /home/[my site name]/public_html/sgdcsite4/silverstripe-v2.2.3/sapphire/core/model/Database.php on line 431

================

I checked /mysite/_config.php, database connection is the right one.

==================

<?php

global $project;
$project = 'mysite';

global $databaseConfig;
$databaseConfig = array(
"type" => "MySQLDatabase",
"server" => "localhost",
"username" => "[right user name]",
"password" => "[right pw]",
"database" => "[right db name]",
);

// Sites running on the following servers will be
// run in development mode. See
// http://doc.silverstripe.com/doku.php?id=devmode
// for a description of what dev mode does.
Director::set_dev_servers(array(
'localhost',
'127.0.0.1',
));

// This line set's the current theme. More themes can be
// downloaded from http://www.silverstripe.com/cms-themes-and-skin
SSViewer::set_theme('blackcandy');

?>

==================

DOES ANYONE have any pointers for me?

Thanks!
-=G=-