SitePoint Sponsor |
|
User Tag List
Results 1 to 25 of 33
-
Oct 15, 2003, 10:46 #1
Discussion thread for Use PostgreSQL and PHP on Windows
This is a dedicated thread for discussing the SitePoint article 'Use PostgreSQL and PHP on Windows'
-
Oct 15, 2003, 10:47 #2
- Join Date
- Jan 2003
- Posts
- 5,748
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
After looking at various other tutorials for getting PostgreSQL working under Win98SE I thought "Not another tutorial huh ?"
Anyways, views aside I read on and thinking that this tutorial was a bit more indepth that the others I read, I reinstalled cygwin again [4th time] and continued...
Well, here is what I got once I clicked on the setup.exe file
Explicits have been removed so not to cause offence
Quote:
"Copying skeleton files.
These files are for the user to personalise
their cygwin experience.
These will never be overwritten.
`./.bash_profile' -> `/home/Docter//.bash_profile'
`./.bashrc' -> `/home/Docter//.bashrc'
`./.inputrc' -> `/home/Docter//.inputrc'
$ ipc-daemon2 --install-as-service
$ net user developer groovy /add
The command USER is unknown. For a list of valid commands, type NET HELP at
the command prompt.
For help, type NET /? at the command prompt.
$"
Umm... Doesn't look too good does it ? Maybe someone who follows through with this tutorial and has some thoughts on the matter ?
Ideas and solutions are most welcome folks
Apart from that though, good article btw; more indepth that a lot of other's I've read recently
-
Oct 15, 2003, 12:22 #3
- Join Date
- Mar 2002
- Location
- Svíþjóð
- Posts
- 4,080
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Get pgsql working on Win9x/ME?
Originally Posted by postgresql-7.3.4.README
-
Oct 15, 2003, 12:44 #4
- Join Date
- Jan 2003
- Posts
- 5,748
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Jofa -
All Okay upto this point...
$ postmaster -D /usr/share/postgresql/data
postmaster does not find the database system.
Expected to find it in the PGDATA directory "/usr/share/postgresql/data",
but unable to open file "/usr/share/postgresql/data/global/pg_control": No such
file or directory
(Which I've had PostgreSQL running under that OS for a while - before my machine crashed and I reinstalled Win98SE;
Unable in re-install Win2000Pro as I forgot to format that partition; ie D:
Would need to format C: and repeat again which I'm not prepared to do)
Anyways, Win98SE doesn't have this variable thus I got the above error message;
Any ideas on this though ? The first steps have got me further than what the said article stipulates
Thanks btw.
--EDIT--
$ ipc-daemon2 &
[1] 573193
$ initdb -D /usr/share/postgresql/data
The files belonging to this database system will be owned by user "Docter".
This user must also own the server process.
The database cluster will be initialized with locale C.
initdb: The directory /usr/share/postgresql/data exists but is not empty.
If you want to create a new database system, either remove or empty
the directory /usr/share/postgresql/data or run initdb with
an argument other than /usr/share/postgresql/data.
[1]+ Done ipc-daemon2
$ postmaster -D /usr/share/postgresql/data &
[1] 461553
$ postmaster does not find the database system.
Expected to find it in the PGDATA directory "/usr/share/postgresql/data",
but unable to open file "/usr/share/postgresql/data/global/pg_control": No such
file or directoryLast edited by Dr Livingston; Oct 15, 2003 at 12:59.
-
Oct 15, 2003, 13:14 #5
- Join Date
- Jan 2003
- Posts
- 5,748
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Finally ?
Fixing permissions on existing directory /usr/share/postgresql/data.
creating directory /usr/share/postgresql/data/base... ok
creating directory /usr/share/postgresql/data/global... ok
creating directory /usr/share/postgresql/data/pg_xlog... ok
creating directory /usr/share/postgresql/data/pg_clog... ok
creating template1 database in /usr/share/postgresql/data/base/1...
creating configuration files... ok
initializing pg_shadow... ok
enabling unlimited row size for system tables... ok
initializing pg_depend... ok
creating system views... ok
loading pg_description... ok
creating conversions... ok
setting privileges on built-in objects... ok
vacuuming database template1... ok
copying template1 to template0... ok
Success. You can now start the database server using:
/usr/bin/postmaster -D /usr/share/postgresql/data
or
/usr/bin/pg_ctl -D /usr/share/postgresql/data -l logfile start
[2]+ Exit 1 postmaster -D /usr/share/postgresql/data
$ psql template1
Welcome to psql 7.3.4, the PostgreSQL interactive terminal.
Type: \copyright for distribution terms
\h for help with SQL commands
\? for help on internal slash commands
\g or terminate with semicolon to execute query
\q to quit
template1=#
-
Oct 15, 2003, 13:41 #6
- Join Date
- Mar 2002
- Posts
- 14
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Start your newly-installed Cygwin Bash Shell and complete these steps:
Install ipc-daemon2 as an NT service
As you remember from the Cygwin installation, Cygipc is the interprocess communication daemon that PostgreSQL depends on.
ipc-daemon2 --install-as-service
bash: /etc/profile: Permission denied
bash-2.05b$ ipc-daemon2 --install-as-service
bash: ipc-daemon2: command not found
bash-2.05b$
Is what i get. Anyone care to offer their greatly appreciated wisdom?
-
Oct 15, 2003, 13:55 #7AnonymousSitePoint Community Guest
The PostgreSQL Global Development group has pushed back native windows support until 7.5, due out sometime in 2004. For more information about current windows options, check out: http://techdocs.postgresql.org/guides/Windows
If you would like to help with PostgreSQL win32 development, there is a status page available at:
http://candle.pha.pa.us/main/writings/pgsql/win32.html
-
Oct 15, 2003, 15:40 #8
- Join Date
- Mar 2002
- Location
- Svíþjóð
- Posts
- 4,080
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Originally Posted by Sn2
-
Oct 16, 2003, 07:12 #9AnonymousSitePoint Community Guest
Postgres installs fine on windows without cygwin, why go to the extra trouble?
-
Oct 16, 2003, 07:24 #10
- Join Date
- Jan 2003
- Posts
- 5,748
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Not sure though from what I remember of what documentation I'd read (PeerDirect) you need to be the owner yes ?
In Win2000 for example, this'd be the Administrator, though sorry I'm not sure of Win98SE though;
On my version whenever I now initialise a database I get a message saying that the user *myself* owns the database etc ?
Not sure myself, since I've only just begun to use Postgre myself
Sorry, I'd really like to help since I've had a lot of problems installing this database myself but I don't know enough yet
-
Oct 16, 2003, 08:34 #11
- Join Date
- Mar 2002
- Posts
- 14
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Originally Posted by jofa
-
Oct 16, 2003, 09:20 #12
- Join Date
- Jan 2003
- Posts
- 5,748
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Likewise
Though I have found that by default when using this
PHP Code:$ postmaster -D /usr/share/postgresql/data &
PHP Code:$ /usr/bin/pg_ctl -D /usr/share/postgresql/data -l logfile -o -i start
Postgres installs fine on windows without cygwin
Doesn't matter since continued development has been haltedOn Win98SE you do need cygwin though ?
-
Oct 16, 2003, 11:25 #13
- Join Date
- Mar 2002
- Location
- Svíþjóð
- Posts
- 4,080
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Originally Posted by Anonymous
Installs fine on Windows == can be compiled natively under Windows?
I don't think that's the best option for everyone.
PostgreSQL by dbExperts ← US$235.00
PowerGres by Software Research Associatess ← beta
UltraSQL by PeerDirect ← beta
Not sure what Anonymous means with "installs fine on windows"
-
Oct 16, 2003, 11:58 #14
- Join Date
- Jul 2001
- Location
- Italy
- Posts
- 4,514
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
> Postgres installs fine on windows without cygwin,
> why go to the extra trouble?
I want to be part of the chorus me too,
so more details would be appreciated!
-
Oct 16, 2003, 12:08 #15
- Join Date
- Jan 2003
- Posts
- 5,748
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Originally Posted by jofa
ie PGDATA for example ?
You find these with WinNT and Win2000Pro thoughI'm a bit lost as well as to that statement myself
-
Oct 30, 2003, 10:18 #16
- Join Date
- Nov 2001
- Location
- Atlanta, GA, USA
- Posts
- 5,011
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Anyone tried this: O'Reilly: PostgreSQL on Windows without that cygwin business
Bet that's what "Anonymous" is talking about.
It's on my list of things to try. :-)Using your unpaid time to add free content to SitePoint Pty Ltd's portfolio?
-
Nov 4, 2003, 17:32 #17
- Join Date
- Mar 2002
- Location
- Svíþjóð
- Posts
- 4,080
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Originally Posted by samsm
Originally Posted by jofa
Originally Posted by www.oreillynet.com
Native Windows support in v 7.4? No...
-
Dec 6, 2003, 15:23 #18AnonymousSitePoint Community Guest
PostgreSql is indeed a very powerfull database, but they have to implement a native Windows version. The Windows version is still and still delayed. I moved to Firebird database, but I found PostgreSql very actractive.
-
Jan 15, 2004, 13:13 #19AnonymousSitePoint Community Guest
This is a pretty good tutorial, insofar as it got PostgreSQL up and running under XP for me. However, it took a little research and tweaking to get initdb to run.
First, making the directory /usr/share/postgresql/data in Cygwin was a BAD IDEA. It resulted in all sorts of nasty permissions errors (couldn't create any files). Creating it in Windows took care of that.
Second, initdb was still having permissions issues when setting up pg_shadow (whatever that is). A little research revealed that the following commands take care of this problem:
chown 544 /usr/bin
chmod 755 /usr/bin
chmod +x+r+w /usr/bin/postgres.exe
Hope this helps someone
-
Jan 28, 2004, 04:14 #20AnonymousSitePoint Community Guest
pgAdmin III (http://www.pgadmin.org) does not require any ODBC driver to connect to PostgreSQL. It is a fully multi-platform application available under Win32, GNU/Linux and FreeBSD.
-
Feb 1, 2004, 07:40 #21
- Join Date
- Mar 2002
- Location
- Svíþjóð
- Posts
- 4,080
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Originally Posted by Anonymous
-
Feb 11, 2004, 20:32 #22AnonymousSitePoint Community Guest
From http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&oe=utf-8&selm=8806a44b.0401270751.214995a1%40posting.google.com
You need to install the Cygwin
encrypt/decrypt library. Run the Cygwin setup.exe, in "Selected
Packages" choose
Libs -> "crypt: Encryption / Decryption utility and library", complete
the setup. Now you should have the cygcrypt-0.dll on your cygwin/bin
folder and you should be able to run postgresql.
-
May 24, 2004, 14:14 #23AnonymousSitePoint Community Guest
net start postmaster
gives this error message:
System error 2069 has occurred. The service did not start due to a logon failure. I followed the tutorial step by step, and was able to login under windows as postgres/postgres, yet the postmaster service did/will not start. As a result, pgsql will not start either...
any help? (i've tried to run net start postmaster as both postgres, and normal admin user, as logged in by windows, neither work)
-john
-
May 25, 2004, 05:14 #24AnonymousSitePoint Community Guest
Hey, this is John again...
I fixed that error, my problem was that somehow the user 'postgres' didn't have rights ?, whatever...
but I fixed that, by going into services... right clicked postmaster, properties... Logon tab... and put in the password again... it prompted me that he didn't have rights, should they be given, answer yes...
BUT.. now I have a different problem...
I get this error when I run `net start postmaster` (OR start from the services window):
Could not start the postmaster service on Local Computer. Error 1067: The process terminated unexpectedly
When I do this from command line, I get this:
$ net start postmaster
The postmaster service is starting.
The postmaster service could not be started.
A system error has occurred.
System error 1067 has occurred.
The process terminated unexpectedly.
---
ultimately the same error, but perhaps more clues. I've done the standard 'restarting windows fixes all problems' a few times now, no such luck. Anyone else with any clues?
Thanks
-John
-
May 25, 2004, 07:09 #25AnonymousSitePoint Community Guest
John again,
Got it working! I found the /var/logs/postmaster error log, checked it out, that pg_control didn't exist.
So I figured that if it didn't exist, that was a problem..
tried running `initdb -D /usr/share/postgresql/data` again, told me to clean out the data dir... so I did.. ran it, it worked.. and now
...
PostgreSql works!
-John
hope my mistakes helped someone else
Bookmarks