[FWTools] calling ogr2ogr from PHP shell_exec with upper-case Postgres field names
Chaitanya kumar CH
chaitanya.ch at gmail.com
Thu May 19 06:53:59 EST 2011
Try the escapeshellcmd php function.
On Thu, May 19, 2011 at 3:10 PM, Kidd, David M <d.kidd at imperial.ac.uk>wrote:
> I am trying to export spatial data from a Postgres/PostGIS table with
> upper-case field names by calling ogr2ogr from PHP shell_exec(). I am
> currently working on a Windows XP machine, but also need to port to LINUX.
> I know I have to escape double qoutes, but have so far have not worked out
> how to do this correctly.
> The following works at the command line but fails when called with PHP
> "C:\FWTools2.4.7\bin\ogr2ogr" -f "ESRI Shapefile" test.shp PG:"
> <connect_str>" -sql "SELECT * FROM gpdd.location_pt WHERE \"LocationID\" =
> I have tried escaping the slashes with one or two preceeding shashes but to
> no avail.
> Any suggestions greatly appreciated. Thanks,
> - Dave
> David M. Kidd
> Research Associate
> Center for Population Biology
> Silwood Park Campus
> Imperial College London
> 0207 594 2470
> FWTools mailing list
> FWTools at lists.maptools.org
Chaitanya kumar CH.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the FWTools