Windows With Apache
- WinXP sp2
- Apache 2.2.4
- PHP 5.2.4
- Postgres 8.2.5
All software was installed on the same host.
RSCDS was installed to C:/www/rscds using directory method (not VirtualHost)
From the Postgres directory I ran: "createuser -U username -W password -D -R general"
- The various .sql files need to be in the current directory for the database creation scripts. I had to copy all the .sql files in C:\www\rscds\dba to C:\www\rscds\dba\windows
- The create-database.bat file tries to source a "Grants.sql" file which is not in the installation. I remarked out line 41 with no apparent problems.
- I also had to edit line 15 to: set PGDIR="C:\Program Files\PostgreSQL\8.2\bin"
- I used cygwin's pcregrep.exe instead of egrep (seemed to work ok) so I had to modify all instances of egrep to pcregrep in the create-database.bat file
- This script makes a table in the form of prefix-rscds (e.g. cal-rscds). I'm not sure of the significance of this but I had to keep that in mind during the install.
I then changed directory to c:\www\rscds\dba\windows and ran the create-database.bat like so: "create-database.bat [prefix] [username] [password]"
Edit: in my case (PG v8.3, WinXPsp2), i encountered the following:
- i had to create 'role' named 'general' before running the BAT file,
- i had to manually set the %PGDIR% variable to:
set PGDIR="c:\Program Files\PostgreSQL\8.3\bin"
instead of: set PGDIR=%PGLOCALEDIR%\..\..\bin
- i had to remove the '-U' switches, since i got these error messages:
psql: FATAL: password authentication failed for user "-U"
apparently it expected the username right away, without anouncing this argument first
- my (existing) egrep.exe wasn't detected! i had to delete the detector line from the BAT file.
To enable PostgreSQL with PHP 5.3.x
- configured with Apache, adding the following line to httpd.conf to load libpq.dll can save you a lot of time :
LoadFile "C:/Program Files/PostgreSQL/8.4/bin/libpq.dll"
- uncomment PostgreSQL in PHP.ini just remove (;)
I then ran "mkdir C:\etc\rscds" and placed my config file there. In the config file I had to set a password for the connect string (i.e. ...user=general password=generalpw). Whether this was necessary is controlled in the PostgreSQL pg_hba.conf file.
I now have everything apparently working. Preliminary tests look good. Can connect from Sunbird and Lightning, add calendars, events etc.
Hope this helps someone, I'd appreciate any feedback on steps I could or should have done differently.