[postgis-users] PostGIS PHP setup on Windows 7

Jim Smith jimcsmith at gmail.com
Thu Aug 5 09:36:23 PDT 2010


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) ^ in*C:\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/6fd34c7b/attachment.html>


More information about the postgis-users mailing list