You have to apply the patch directly on the server where your piwigo installation is located. Connect to your server (by ssh, that is what I do) and follow the instructions to apply the patch on the command line.
Offline
Thanks for the reply.
I think SSH to the webserver is beyond my expertise.
Sync works, just throws up that error, hopefully will get fixed in next version.
Offline
You can apply the patch on your local copy (if current) and copy only that one changed file include/functions_metadata.inc.php to the hosting web server's installation.
Offline
I downloaded the include folder files to my local copy then performed the patch from the command line, worked a treat.
No More error messages.
Offline
Hello,
same issue here.
I tried to run the patch command, in the /html directory, but it didn't work. I got the following reply:
MY@NAS:/.../piwigo/html$ curl https://github.com/Piwigo/Piwigo/commit/e8090d4149bb83289f6aa2d1d971a420ecdd706f.patch | patch -p1 % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0-sh: patch: command not found 100 1075 100 1075 0 0 3974 0 --:--:-- --:--:-- --:--:-- 3981 curl: (23) Failed writing body
My Installation is running on a Synology NAS. Did I use the correct directory?
I would be happy about any help. I'm pretty much a novice when it comes to these things.
Thanks in advance - Daniel
Offline
Can you download to a local copy of the include/functions_metadata.inc.php file to my PC, then from a terminal window ran the patch, then FTPd the file back to the server, worked fine.
Offline
Thanks for the tip! That worked for me! ;-)
Offline
Glad it worked
Offline
Is it possible to download the updated include/functions_metadata.inc.php file please and overwrite the existing one?
This would seem simpler and safer than playing around with SSH.
Thanks.
Offline
That should do it.
Offline
Make sure to download the correct 14.x branch's file, i.e. this
https://github.com/Piwigo/Piwigo/raw/14 … ta.inc.php
Offline
Thanks. Seems to have resolved it for me.
Offline
Replacing the [functions_metadata.inc.php] file worked for me as well, since I'm using a hosting company and wouldn't be able to apply a patch via SSH. Thank you for the tip!
Offline
Hi All,
I'm running piwigo in a docker container under undraid. If I run the curl command, I get the same error as FotofuchsWW. If I open up a console in unraid and run the command in the docker container, I get the following:
root@server:~# docker exec -it piwigo curl [Github] Piwigo commit e8090d41 | patch -p1
(Stripping trailing CRs from patch; use --binary to disable.)
can't find file to patch at input line 15
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|From e8090d4149bb83289f6aa2d1d971a420ecdd706f Mon Sep 17 00:00:00 2001
|From: plegall <plg@piwigo.org>
|Date: Thu, 18 Apr 2024 14:20:55 +0200
|Subject: [PATCH] fixes #2150 move function strip_html_in_metadata outside
| get_exif_data
|
|---
| include/functions_metadata.inc.php | 9 ++++-----
| 1 file changed, 4 insertions(+), 5 deletions(-)
|
|diff --git a/include/functions_metadata.inc.php b/include/functions_metadata.inc.php
|index 668ab7740a..6fb3bfaa13 100644
|--- a/include/functions_metadata.inc.php
|+++ b/include/functions_metadata.inc.php
--------------------------
File to patch:
I was going to manually replace the file, but I don't see the same file name in any folder.
Any suggestions on how to apply this?
Offline
For Docker the command might have to be
docker exec -it piwigo curl https://github.com/Piwigo/Piwigo/commit/e8090d4149bb83289f6aa2d1d971a420ecdd706f.patch | docker exec -it piwigo patch -p1
or
docker exec -it piwigo (curl https://github.com/Piwigo/Piwigo/commit/e8090d4149bb83289f6aa2d1d971a420ecdd706f.patch | patch -p1)
however, I don't use Docker so don't know. Anyway, using the commit without .patch extension like you wrote won't work. If you can't sort it out you may want to replace the entire file, see [Forum, post 190099 by erAck in topic 33609] 14.4.0: fatal error: Cannot redeclare strip_html_in_metadata().
Offline