Jump to:

4938 Posts in 16378 Topics by 1490 members

Installing SilverStripe

SilverStripe Forums » Installing SilverStripe » Installing SilverStripe on Postgresql database

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

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

Page: 1 2
Go to End
Author Topic: 4515 Views
  • argh
    Avatar
    Community Member
    4 Posts

    Installing SilverStripe on Postgresql database Link to this post

    Hello all,

    I would like to install Silverstripe on a Postgresql database.

    I have downloaded the unreleased module (http://silverstripe.org/postgresql-module/) but didn't manage to install it (I am lacking documentation).

    Could you help me to start ?

    Thank you in advance.

  • StarCrescent
    Avatar
    Community Member
    4 Posts

    Re: Installing SilverStripe on Postgresql database Link to this post

    Hi,

    I am trying to do the same thing. This is what I figured out sofar.
    Put "PostgreSQLDatabase.php" file into "SilverStripe\sapphire\core\model". This is where "MySQLDatabase.php" is.
    Second, you have to replace the file "config-form.html" in "SilverStripe\" with "http://open.silverstripe.com/raw-attachment/ticket/3362/config-form-pg.html"
    Last, "install.php" has to be replaced as well but I cannot find a replacement file for PostgreSQL. I guess we have to wait a developer to write it cause I do not know any SQL stuff.
    I hope this shed some light.

  • Geoff
    Avatar
    Core Development Team
    8 Posts

    Re: Installing SilverStripe on Postgresql database Link to this post

    Hi,

    To get the Postgres module working, all you need to do is to download it and put the postgres directory in the root of your project (ie, alongside sapphire, cms etc).

    Then you need to edit the _config.php file (or _ss_environment.php file) in your project, and change the 'MySQLDatabase' value to 'PostgreSQLDatabase' and also change the username and password where appropriate.

    That should be all you need to do. Run /dev/build on your project and all the tables should be created.

    One final note though: you need to manually create the database, since the script can't create a non-existent database at the moment. Also, I highly recommend running 8.3.x, since T-Search (when we eventually get it running) needs to be part of the Postgres installation.

    Thanks for giving the Postgres module a try, and let us know if you have any problems or code to contribute.

    Geoff

  • Hamish
    Avatar
    Community Member
    712 Posts

    Re: Installing SilverStripe on Postgresql database Link to this post

    Hey Geoff, I was under the impression that the postgres version was not yet fully funcitonal. At least in my experience, I was unable to add new page types reliably - they simple didn't seem to get built.

    Should we be adding tickets if we find bugs in the postgres module?

  • Geoff
    Avatar
    Core Development Team
    8 Posts

    Re: Installing SilverStripe on Postgresql database Link to this post

    Well it's not 'fully functional', for instance, indexes don't work at all, and we need to figure out how to implement tsearch + all the other neat things that Postgres does.
    However, as far as I know, all the (very) basic functionality does work, although I haven't tried everything.

    If you find a problem, then PLEASE add a ticket under the postgres module. Patches can be added too, or you can email me code (geoff at silverstripe.com) if you prefer.

  • argh
    Avatar
    Community Member
    4 Posts

    Re: Installing SilverStripe on Postgresql database Link to this post

    Hello All,

    Since I am really interested in installing SilverStripe on a Postgresql database, I will share any information, patches,...

    Thank you for your answers.

  • Shiny
    Avatar
    Community Member
    7 Posts

    Re: Installing SilverStripe on Postgresql database Link to this post

    Where do i get a template for mysite/_config.php

    currently i have this:
    <?php

    global $project;
    $project = 'mysite';

    global $database;
    $database = "";

    require_once("conf/ConfigureFromEnv.php");

    PostgreSQLDatabase::set_connection_charset('utf8');

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

    ?>

    but install.php is still asking for MySQL settings, not Postgres

  • Willr
    Avatar
    Forum Moderator
    5497 Posts

    Re: Installing SilverStripe on Postgresql database Link to this post

    As far as I know the installer has not yet been updated to support multiple databases (postgres and mssql support are both still alpha code). You would have to bypass the installer.php (by just deleting that file and setting your configuration in your _ss_environment.php file (or if you do not have one your mysite/_config file)

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