Error when passing shape file to psotgis through submit button and php

المشرف العام

Administrator
طاقم الإدارة
I have the following issue when I try to pass a shape file to postgis. When I run this part of code through the terminal:

shp2pgsql -s 2100 -d /var/www/dkar/MarCO/Code/python/output/cluster/clusterNodes_.shp | psql -h localhost -p **** -d ****** -U ******* It works perfectly and a new table in postgis is created. But when I try to do the same through a php script which I execute on a submit button then I get an error. I can not say for sure whats the error why I run the whole process through php exec so I just get an error code 2.

Also when I do the process through the terminal, I am asked for entering the db password. I also tried to include the password in the command like:

`... -W pasword` but it didn't make any difference.

The whole thing runs smoothly locally but it doesnt work in the remote server.

Any ideas what I might miss here? Perhaps the path to the shape file should be different in each case?



أكثر...
 
أعلى