SitePoint Sponsor

User Tag List

Results 1 to 25 of 33

Hybrid View

  1. #1
    ********* Articles ArticleBot's Avatar
    Join Date
    Apr 2001
    Posts
    1
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    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'

  2. #2
    Sultan of Ping jofa's Avatar
    Join Date
    Mar 2002
    Location
    SvÝ■jˇ­
    Posts
    4,080
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Get pgsql working on Win9x/ME?
    Quote Originally Posted by postgresql-7.3.4.README
    1. Start the cygipc ipc-daemon2:
    $ ipc-daemon2 &
    2. Initialize PostgreSQL:
    $ initdb -D /usr/share/postgresql/data
    3. Start the PostgreSQL postmaster:
    $ postmaster -D /usr/share/postgresql/data &
    4. Connect to PostgreSQL:
    $ psql template1
    I guess it's quite impossible to use the NT services installation procedure on Wintendo95 & Co

  3. #3
    Non-Member
    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
    This part I can understand ? The variable required, ie PGDATA [and it's sister variables] all belong to WinNT/Pro2000

    (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 directory
    Umm.... Still looking
    Last edited by Dr Livingston; Oct 15, 2003 at 12:59.

  4. #4
    Non-Member
    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=#
    I'm good to go yes ?

  5. #5
    SitePoint Member
    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?

  6. #6
    Sultan of Ping jofa's Avatar
    Join Date
    Mar 2002
    Location
    SvÝ■jˇ­
    Posts
    4,080
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Sn2
    ...Permission denied...
    My guess: Insufficient permissions?

  7. #7
    SitePoint Member
    Join Date
    Mar 2002
    Posts
    14
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by jofa
    My guess: Insufficient permissions?
    I'm logged on as an administrator...

  8. #8
    Non-Member
    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

  9. #9
    Non-Member
    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 -/usr/share/postgresql/data 
    This it's self doesn't include networking so you are unable to connect to TCP/IP ? You have to use this instead...

    PHP Code:
    $ /usr/bin/pg_ctl -/usr/share/postgresql/data -l logfile --i start 
    Hope this'll help someone, now if only I knew how to create a user with a password ? ...

    Postgres installs fine on windows without cygwin
    PeerDirect on Win2000Pro which I've had running, there is another project which branches off from PostgreSQL which I can't remember ?

    Doesn't matter since continued development has been halted On Win98SE you do need cygwin though ?

  10. #10
    FreeBSD The Power to Serve silver trophy pippo's Avatar
    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!

    Mr Andrea
    Former Hosting Team Advisor
    Former Advisor of '03

  11. #11
    Non-Member
    Join Date
    Jan 2003
    Posts
    5,748
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by jofa
    UltraSQL by PeerDirect
    I attempted to install this very thing on another machine Win98SE on Monday and no cheese folks; Win98SE does not have the environment variables you need,

    ie PGDATA for example ?

    You find these with WinNT and Win2000Pro though I'm a bit lost as well as to that statement myself

  12. #12
    SitePoint Wizard samsm's Avatar
    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?

  13. #13
    Sultan of Ping jofa's Avatar
    Join Date
    Mar 2002
    Location
    SvÝ■jˇ­
    Posts
    4,080
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by samsm
    Quote Originally Posted by jofa
    UltraSQL by PeerDirect ← beta
    Quote Originally Posted by www.oreillynet.com
    ... They have a beta of a port which seems to be working well for me, and will hold me over until PostgreSQL v. 7.4 which is meant to have native windows support!
    ...seems to be working well...
    Native Windows support in v 7.4? No...


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •