Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Editing with spatialite ? #28

Open
luckgentilpiron opened this issue Apr 24, 2017 · 9 comments
Open

Editing with spatialite ? #28

luckgentilpiron opened this issue Apr 24, 2017 · 9 comments

Comments

@luckgentilpiron
Copy link

Hi !

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

Thank for all !

@jancelin
Copy link
Owner

jancelin commented Apr 24, 2017

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
Copy link
Owner

jancelin commented Apr 24, 2017

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

@luckgentilpiron
Copy link
Author

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.

@jancelin
Copy link
Owner

try to do a

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

I think apache can not write to the database

@jancelin
Copy link
Owner

@luckgentilpiron
Copy link
Author

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

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

@jancelin
Copy link
Owner

de rien....

@lionelbargeot
Copy link

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

@tzanetti
Copy link

tzanetti commented May 9, 2019

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants