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're retiring the forums!

The SilverStripe forums have passed their heyday. They'll stick around, but will be read only. We'd encourage you to get involved in the community via the following channels instead:

Installing SilverStripe /

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

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

Installing silverstripe 2.4.10 on Postgres constantly fails on db connection

Go to End

2 Posts   958 Views


Community Member, 5 Posts

21 February 2013 at 3:12pm


I am trying to install Silverstripe 2.4.10 on Red Hat with Postgres.

So I downloaded v2.4.10, I added a new vHost to my httpd.conf:

<VirtualHost *:80>
    ServerName silverstripe.localhost
    ServerAlias silverstripe.localhost
    ServerAdmin root@silverstripe.localhost
    DocumentRoot /var/www/html/SilverStripe-cms-v2.4.10
    ErrorLog /var/www/html/silverstripe/
    CustomLog /var/www/html/silverstripe/ common
    <Directory "/var/www/html/silverstripe/SilverStripe-cms-v2.4.10">
      Options Indexes FollowSymLinks
      AllowOverride All
      Order allow,deny
      Allow from all

I downloaded the postgres package and unpacked it into /var/www/html/silverstripe/SilverStripe-cms-v2.4.10.

I navigate to the Postgres URL:

It will take me to install.php, I add my Postgres database credentials but Silverstripe constantly tells me it can't connect to the database.

I verified my credentials by creating a small PHP script:

$db = pg_connect("host= port=5432 dbname=SS_mysite user=silverstripe password=");
$result = pg_query($db, "SELECT * FROM test_table_pgtest");

while ($row = pg_fetch_row($result)) {
  echo "Id: $row[0]  Name: $row[1]";
  echo "<br />\n";

The script executes fine, but silverstripe does not accept the same DB credentials.
Error is: I couldn't find a database server on '': PostgreSQL requires a valid username and password to determine if the server exists.

That is really annoying.

The Postgres module gives instructions to run:

Unfortunately also this just results in a 404 error. http://silverstripe.localhost/dev/build simply returns a 404 error.
What else can I do or check to improve on that?

Of course the database does exist and the user does work (see my test script that runs quite well).

Also this dev/build thing does not work at all, it is kind of not clear from the documentation if this is intend to work _before_ you run the installer at all.
Cause if so ... its kind of strange that the postgres module tells users to run that script upfront installation.



Community Member, 5 Posts

22 February 2013 at 2:06pm

I was able to resolve it ... the host does not include the port definition.
Somehow an example showed as host definition, asuming SilverStripe wants the port to be defined in the HOST parameter.
Which is obviously wrong.