[postgis-users] pgsql2shp/shp2pgsql and php

Stefan Donath DonathStefan at gmx.de
Thu Apr 1 07:50:37 PST 2004


thanks david!

i tried this:

<?php
$ret = shell_exec ("pgsql2shp -f <filename> -u <user> -g <geom_column> -h
<host> <dbname> <tablename> 2>&1");
echo $ret;
?>

and received the error message: could not create dbf file

when running pgsql2shp from command line everything works fine but not from
within the php-script! i also tried the .sh-thing but the same result! any
ideas???

stefan





you should use from php
shell_exec("shp2pgsql ...");
or 
shell_exec(pgsql2shp ..."),
or writing a shell (foo.sh) from php-script with in
foo.sh:
shp2pgsql ....
pgsql2shp ...
and do shell_exec(foo.sh)
I think this method could be improved :)

-- 
+++ NEU bei GMX und erstmalig in Deutschland: TÜV-geprüfter Virenschutz +++
100% Virenerkennung nach Wildlist. Infos: http://www.gmx.net/virenschutz




More information about the postgis-users mailing list