piwigo-openstreetmap
piwigo-openstreetmap copied to clipboard
No access to Piwigo with 14.b
Environment: Piwigo 14.2.0 (Docker container linuxserver.io) Raspberry Pi arm64 PHP: 8.3.3 MySQL: 11.2.2-MariaDB-1:11.2.2+maria~ubu2204 Last working version of piwigo-openstreetmap: 13.c
Installing 14.b throws an error without description in the GUI. The extension is then listed as updated but deactivated. Activating the extension lead to the following error and no access to Piwigo.
Warning: file_put_contents(./osmmap.php): Failed to open stream: Permission denied in /config/www/plugins/piwigo-openstreetmap/maintain.class.php on line 162
Warning: Undefined variable $_error_reporting in /config/www/plugins/piwigo-openstreetmap/maintain.class.php on line 163
Warning: Undefined variable $PHPWG_ROOT_PATH in /config/www/plugins/piwigo-openstreetmap/maintain.class.php on line 164
Fatal error: Uncaught --> Smarty: unable to write file osmmap.php <-- thrown in /config/www/plugins/piwigo-openstreetmap/maintain.class.php on line 164
Hi, My 2cts when I read "Permission denied " what about the rights on directories and files?
They are the same as every other folder in the plugin directory. Version 13.c is working without any problems.
Environment: Piwigo 14.2.0, running in docker [image lscr.io/linuxserver/piwigo] Operating system: Linux PHP: 8.3.3 MySQL: 11.2.3-MariaDB-1:11.2.3+maria~ubu2204 [2024-02-20 12:01:59] Graphics Library: ImageMagick 7.1.1-26
Exactly the same error messages when updating to 14.b. No access to Piwigo. Works fine when reverting to 14.a
Updating previous comment: The update to version 14.a allowed Piwigo to function, but not this plugin. I reverted to 13.c to get the plugin working properlyas well.
Same thing here: 14.b breaks Piwigo and 14.a does not function. I also had to switch back to 13.c.
Environment: Piwigo 14.2.0 Operating system: Linux (Debian testing) PHP: 8.2.12 MySQL: mariadb Ver 15.1 Distrib 10.11.6-MariaDB, for debian-linux-gnu (x86_64) using EditLine wrapper Graphics Library: ImageMagick 6.9.12-98 Q16 x86_64 18038
I noticed the openstreetmap wasn't appearing after the 14.3.0 update a few days ago. So I re-enabled the plugin and was presented with this same Smarty error.
Fatal error: Uncaught --> Smarty: unable to write file osmmap.php <-- thrown in /config/www/plugins/piwigo-openstreetmap/maintain.class.php on line 164
Which I have seen before and I resolved by manually creating the /app/www/public/osmmap.php
by hand with a copy & paste of what maintain.class.php was trying to do but that no longer works.
Environment: Piwigo 14.3.0 Environment: LinuxServer.io Docker-Piwigo
Indeed sounds related to folder/file permissions. So where is it trying to write to? So in my case it was /app/www/public
which was set to root:root
. Which I believe is how LinuxServer wants it to be as I symlinks to the /config
folder which stores the user defined configs, templates, plugins etc.
I'm guessing the plugin should take that into consideration to be able to define the path to a different location that has the correct permissions. I did a global chown on my /public
to my web user and now everything is working again but now I'm worried I screwed up my security permissions.
define('PHPWG_ROOT_PATH','./');
The work around would be to comment out the block of code that writes out osmap.php and just create it by hand and remember to do this for every upgrade. Kinda sucks.
This issue seems to be resolved in version 14.c, which was released on March 29. I just installed it and can now use the plugin without getting the error.
Now on Piwigo 14.3.0. Tried 14.c but got the Smarty errors in the post above by raupie https://github.com/Piwigo/piwigo-openstreetmap/issues/246#issuecomment-1986853476
Don't realy want to mess around with file permissions when everything else (and all the other plugins) are working nicely, so it's back to 13.c
Closed because they problem disappeared with version 14.d Thank you!