[postgis-users] pgsql2shp/shp2pgsql and php
David TECHER
davidtecher at yahoo.fr
Fri Apr 2 01:04:08 PST 2004
I think that you must see how is the owner of the
directory of your repertory
see your httpd.conf of apache
and find the line
User nameoftheuser
for example if the nameoftheuser is foo, you will have
User foo
then foo must also be an user of postgresql in order
to use 'pgsql2shp ... -u foo'. he must have right to
use databases of postgresql
so use the command
createuser foo
and say 'y' to 2 questions that createuser ask you
--- Stefan Donath <DonathStefan at gmx.de> a écrit : >
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
>
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
>
http://postgis.refractions.net/mailman/listinfo/postgis-users
Yahoo! Mail : votre e-mail personnel et gratuit qui vous suit partout !
Créez votre Yahoo! Mail sur http://fr.benefits.yahoo.com/
Dialoguez en direct avec vos amis grâce à Yahoo! Messenger !Téléchargez Yahoo! Messenger sur http://fr.messenger.yahoo.com
More information about the postgis-users
mailing list