[postgis-users] Problems with PHP and PostgreSQL/PostGIS

Steffen Macke sdteffen at gmail.com
Fri Apr 13 05:21:23 PDT 2007


Hi Gerald,

> Warning: pg_query() [function.pg-query]: Query failed: ERROR: relation
> "fahrtenbuchtabelle" does not exist in

This error message is pretty clear: You first have to create the table
fahrtenbuchtabelle
or grant access for the user in question.

> And there is my table in postgresql/postgis:
>
> CREATE TABLE "FahrtenbuchTabelle"
> (
>   "FID" numeric NOT NULL,
>   "Date_Start_Fahrt" date NOT NULL,
>   "Date_Insert" date NOT NULL,
>   "Strecke" geometry,
>   CONSTRAINT "FahrtID" PRIMARY KEY ("FID"),
>   CONSTRAINT "enforce_dims_Strecke" CHECK (ndims("Strecke") = 2),
>   CONSTRAINT "enforce_geotype_Strecke" CHECK (geometrytype("Strecke") =
> 'LINESTRING'::text OR "Strecke" IS NULL),
>   CONSTRAINT "enforce_srid_Strecke" CHECK (srid("Strecke") = 4326)
> )
> WITHOUT OIDS;
> ALTER TABLE "FahrtenbuchTabelle" OWNER TO postgres;

This looks like you have copied it from pgAdmin. So I guess the table
does exist somewhere.
I suggest that you double-check that your PHP code connects to the
same database/server
as pgAdmin. In case you are using different user names, make sure that
the user in PHP
has select/insert rights for the table fahrtenbuchtabelle.

Regards,

Steffen



More information about the postgis-users mailing list