Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

This question already has an answer here:

I want to develop a webportal that will show the QGIS generated images on dynamic website. For this reason I need to run gdal_translate command inside php page. but I don't know is it possible or not. If possible than please let me know how to do this and if not possible than please give any alternative solution in this regard.

share|improve this question

marked as duplicate by Aragon, PolyGeo, MappaGnosis, Get Spatial, Mapperz Sep 30 '13 at 13:35

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

Enamul, QGIS offers a WMS server component, which has an optional QGIS GeoExt web client interface (demos here), or you can utilize the QGIS WMS output as a layer in an OpenLayers map.

Also, there is a nice plugin to integrate QGIS Server with a PHP server: lizmap. lizmap is available via the plugin installer, but you will have to manually add the new QGIS repository to installer if using QGIS version < 1.8.0.

share|improve this answer
Dakcarto,thanks for your answer but if you can give more detail solution as I am new to qgis and gdal if possible any examples than it will be more helpful for me. – Enamul Haque May 27 '12 at 5:08
QGIS Server – A WMS Server for the masses « Linfiniti Geo Blog - Also, you might want to look into the QGIS Cloud plugin, which could be embedded in your web portal within an iframe. – dakcarto May 27 '12 at 9:10

Use exec. But if you are on shared hosting this is probably disabled.

share|improve this answer
johanvdw,it looks good, can you give a sample code which is executing gdal command with exec – Enamul Haque May 27 '12 at 7:15
@EnamulHaque take a look at… – Rodrigo Apr 28 at 19:37

Open the folder which is containing "gdal_translate", just copy that file and paste in the same folder. And then rename that copied file with "gdaltranslate" (just remove ' _ ' ). Use the renamed file (i.e., gdaltranslate ) in your php code ... and that works :) njy

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.