docker-lizmap icon indicating copy to clipboard operation
docker-lizmap copied to clipboard

Editing with spatialite ?

Open luckgentilpiron opened this issue 8 years ago • 9 comments

Hi !

I want to incorporate spatialite layer for editing but it's possible with this docker ?

Thank for all !

luckgentilpiron avatar Apr 24 '17 06:04 luckgentilpiron

I do not use spatialite, I prefer postgresql. The container is not optimized for that. However here is the procedure to set it up: To enter the container:

docker exec -it container_name bash

then:

apt-get install libspatialite-dev
nano /etc/php5/apache2/php.ini 

edit: ";sqlite3.extension_dir =" to "sqlite3.extension_dir = /var/www/sqlite3_ext"

mkdir /var/www/sqlite3_ext
cp ./usr/lib/x86_64-linux-gnu/libspatialite.so /var/www/sqlite3_ext

and create a webpage for test install:

nano /var/www/websig/lizmap/www/sqlite_test.php

Copy the example of this site: http://www.gaia-gis.it/spatialite-2.4.0-4/splite-php.html

close and restart container:

exit
docker restart container_name

test exemple if it's work. For me: http://demo.sig.inra.fr/websig/lizmap/www/sqlite_test.php

Then save the container in image to be able to replay it:

docker commit container_name new_image_name

Now you can launch new containers from this new image.

jancelin avatar Apr 24 '17 09:04 jancelin

This is a temporary solution, I will add it in the next version. tell me if it works on your side

jancelin avatar Apr 24 '17 09:04 jancelin

Thank you !

It's work but when i want to save a modification, i have this message "An error has been raised when saving the form", the same whene i create entity.

luckgentilpiron avatar Apr 24 '17 12:04 luckgentilpiron

try to do a

chown www-data:www-data /your.sqlite

I think apache can not write to the database

jancelin avatar Apr 24 '17 12:04 jancelin

https://docs.3liz.com/fr/publish/advanced_lizmap_config.html?highlight=spatialite

jancelin avatar Apr 24 '17 12:04 jancelin

Indeed apache can't write but now yes, he can !

Really thank you, for the docker and for "the spatialite demonstration"!

luckgentilpiron avatar Apr 24 '17 13:04 luckgentilpiron

de rien....

jancelin avatar Apr 24 '17 13:04 jancelin

Hi since php7 I had to copy mod_spatialite.so to sqlite extension directory. cp ./usr/lib/x86_64-linux-gnu/mod_spatialite.so /var/www/sqlite3_ext

lionelbargeot avatar Dec 08 '17 10:12 lionelbargeot

Quelqu'un a-t-il déjà eu le même problème sous windows et trouvé une solution ?

tzanetti avatar May 09 '19 14:05 tzanetti