[postgis-users] PostGIS PHP setup on Windows 7

Paragon Corporation lr at pcorp.us
Thu Aug 5 14:40:23 PDT 2010


Are you sure you are suing PostGIS?  PostGIS geometry type is just geometry.
 
I believe ESRI PostgreSQL SDE calls their datatype sde.st_geometry which
seems closer to what you are trying to do there.
 
So your query for PostGIS should be just
 
CREATE TABLE polygon_test (p1 geometry);
 
We use PostGIS in PHP and we don't use any additional dlls aside from the
postgresql one.
 
Leo and Regina,
http://www.postgis.us

  _____  

From: postgis-users-bounces at postgis.refractions.net
[mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of Jim
Smith
Sent: Thursday, August 05, 2010 12:36 PM
To: postgis-users at postgis.refractions.net
Subject: [postgis-users] PostGIS PHP setup on Windows 7


I'm not configuring PHP to work with PostGIS. So, when I try in PHP: 

require_once 'postgresqlConnect.php';  //make a connection to the database
pg_query("CREATE TABLE polygon_test (p1 st_geometry)");

I get:

Warning: pg_query() [function.pg-query
<http://localhost/processDatabase/function.pg-query> ]: Query failed: ERROR:
type "st_geometry" does not exist LINE 1: CREATE TABLE polygon_test (p1
st_geometry) ^ inC:\Program Files\Apache Software
Foundation\Apache2.2\htdocs\processDatabase\fillPostgresTable.php on line 51


I can use PgAdminIII and use st_geometry. With PHP I've added the PostgreSQL
bits so I can access the database.


What I'm missing  is the bits I've got to add to php.ini extensions. There
are probably some PostGIS dlls that I'm missing as well to make PHP happy.


If someone could point me in the right direction for getting PHP to work
with PostGIS, I'd appreciate it.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20100805/cf7099c8/attachment.html>


More information about the postgis-users mailing list