phplib and postgres

From: rcaban(at)ccc-cable(dot)net (roy cabaniss)
To: pgsql-general(at)postgresql(dot)org
Subject: phplib and postgres
Date: 2001-12-27 03:58:56
Message-ID: 3d76261.0112261958.2a3b26bd@posting.google.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Browse pgsql-general by date

  From Date Subject
Next Message Alex Cheung Tin Ka [CD] 2001-12-27 08:49:47 How to timestamp
Previous Message Tom Lane 2001-12-26 19:00:46 Re: Suppress "cache state reset" message?