Menu

#1106 Setup fails to create db in win32

1.3
closed-fixed
nobody
None
5
2014-08-24
2014-04-09
No

Due to the setup.pl refactoring I don't see a major reason to fix this for 1.3, other than to file bugs with upstream tools. Workaround is to manually create the databases (which works ok on Windows with Notepad++ or similarly powerful editors).

The basic problem is that environment variables set by LedgerSMB apparently do not control the libpq connections on Win32 platforms. This means that since we frequently require these to work on *nix for a consistent API, on Windows, we get an internal server error. It is not clear yet whether this is a Postgres issue, a Strawberry Perl issue, or somewhere else. The bug is not in our framework as far as I can tell, but if we want to support Windows we have to do something about it.

Proposed resolution:
1. Document manual db creation (1.3 and 1.4)
2. Provide a .bat to load db modules (1.3/1.4)
3. Edit the setup.pl to always attach credentials to the DBI->connect call rather than relying on environment variables. PSQL calls would use the -U flag to pass the username.
4. Document how to set up a .pgpass file on Windows suitable, and how to use Apache to password protect the setup.pl with a secondary password, to separate this issue out.

Discussion

  • Chris Travers

    Chris Travers - 2014-08-24
     
  • Chris Travers

    Chris Travers - 2014-08-24
    • status: open --> closed-fixed