Piwigo / piwigo-openstreetmap

OpenStreetMap integration for Piwigo
http://piwigo.org/ext/extension_view.php?eid=701
GNU General Public License v3.0
35 stars 35 forks source link

Activation Error #228

Open weswitt opened 1 year ago

weswitt commented 1 year ago

i'm running piwigo version 13.4.0 and current version of openstreetmap plugin.

when activating the plugin i get an error that says "an error occurred". the plugin displays a map as expected but changing the plugin settings have NO effect. for example, changing the "map height" has no effect. so it seems that there is in fact some kind of error preventing the plugin from working properly.

Seneliux commented 4 months ago

Same issue. Fresh install of the Piwigo 14.2.0 PHP: 8.2.10 MySQL: 10.11.6

nginx logs shows this error:

024/02/10 09:52:05 [error] 28916#28916: *33 FastCGI sent in stderr: "PHP message: PHP Warning: file_put_contents(./osmmap.php): Failed to open stream: Permission denied in /www/piwigo/plugins/piwigo-openstreetmap/maintain.class.php on line 161; PHP message: PHP Warning: Undefined variable $_error_reporting in /www/piwigo/plugins/piwigo-openstreetmap/maintain.class.php on line 162; PHP message: PHP Warning: Undefined variable $PHPWG_ROOT_PATH in www/piwigo/plugins/piwigo-openstreetmap/maintain.class.php on line 163; PHP message: PHP Fatal error: Uncaught --> Smarty: unable to write file osmmap.php <-- thrown in /www/piwigo/plugins/piwigo-openstreetmap/maintain.class.php on line 163" while reading response header from upstream, client: 192.168.123.9, server: piwigo.org, request: "GET /piwigo/ws.php?method=pwg.plugins.performAction&action=activate&plugin=piwigo-openstreetmap&pwg_token=SECRETd&format=json HTTP/2.0", upstream: "fastcgi://unix:/run/php/php-fpm.sock:", host: "piwigo.org", referrer: "https://DOMAIN/piwigo/admin.php?page=plugins&tab=installed"

Permissions error and some varianles is undefined. Can not activate the plugin.

Seneliux commented 4 months ago

Solution: change the owner to "www user" of the piwigo folder. Enough not recursively. Ubuntu nginx user is www-data: chown www-data:www-data piwigo