4571 Posts in 1384 Topics by 1376 members
Installing SilverStripe
SilverStripe Forums » Installing SilverStripe » Installing silverstripe 2.4.10 on Postgres constantly fails on db connection
Getting SilverStripe up and running on your computer and on your web server.
Moderators: martimiz, Howard, Sean, Ryan M., biapar, Willr, Ingo, swaiba, simon_w
|
Page:
1
|
Go to End | |
| Author | Topic: | 220 Views |
-
Installing silverstripe 2.4.10 on Postgres constantly fails on db connection

21 February 2013 at 3:12pm
Hi,
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/silverstripe.com-error_log
CustomLog /var/www/html/silverstripe/silverstripe.com-access_log common
<Directory "/var/www/html/silverstripe/SilverStripe-cms-v2.4.10">
Options Indexes FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>
</VirtualHost>I downloaded the postgres package and unpacked it into /var/www/html/silverstripe/SilverStripe-cms-v2.4.10.
I navigate to the Postgres URL:
http://silverstripe.localhost/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:
<?php
$db = pg_connect("host=127.0.0.1 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 '127.0.0.1:5432': PostgreSQL requires a valid username and password to determine if the server exists.That is really annoying.
The Postgres module gives instructions to run:
dev/buildUnfortunately 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.Thanks
Sebastian -
Re: Installing silverstripe 2.4.10 on Postgres constantly fails on db connection

22 February 2013 at 2:06pm
I was able to resolve it ... the host does not include the port definition.
Somehow an example showed 127.0.0.1:5432 as host definition, asuming SilverStripe wants the port to be defined in the HOST parameter.
Which is obviously wrong.Thanks!
Sebastian
| 220 Views | ||
|
Page:
1
|
Go to Top |

