phplib and postgres - Mailing list pgsql-general

From rcaban@ccc-cable.net (roy cabaniss)
Subject phplib and postgres
Date
Msg-id 3d76261.0112261958.2a3b26bd@posting.google.com
Whole thread Raw
List pgsql-general
I am new to phplib (rather obviously) but not php. I have kernel
2.4.10, postgres 7.0.3 (I tried 7.1.3 but phpPgAdmin did not work with
it and I LIKE that tool), apache, php4. I went to start using phplib
(I tried what follows both with the phplib that came with my distro
and one from sourceforge.) When I get to create_database.pgsql the
following message comes up.

./create_database.pgsql: //: is a directory
./create_database.pgsql: //: is a directory
./create_database.pgsql: //: is a directory
./create_database.pgsql: line 5: syntax error near unexpected token
`('
./create_database.pgsql: line 5: `CREATE TABLE active_sessions

any idea what is happening other than phplib does not like me at the
moment.

Things I have tried:
1. I have tried it logged in as root (no surprise that it did not
work)
2. as postgres and another postgres admin user (still no change).
3. phplib from my distro
4. phplib from sourceforge


Here is what looks to be the relevent code from the create database
part of phplib.

// creates basic database layout
// reincarnation of create_database.pgsql
// $Id: create_database.pgsql,v 1.1.1.1 2000/04/17 16:40:17 kk Exp $

CREATE TABLE active_sessions (
  sid varchar(32) DEFAULT '',
  name varchar(32) DEFAULT '',
  val text,
  changed varchar(14) DEFAULT '' NOT NULL,
  PRIMARY KEY (sid,name)
);


Since phplib is looking for some rather specific things in the
postgres database I don't think I want to just create the tables from
scratch.

                     thanks

                     roy cabaniss

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: Suppress "cache state reset" message?
Next
From: "Alex Cheung Tin Ka [CD]"
Date:
Subject: How to timestamp