Announcement

#16 2024-05-09 13:52:26

OHappyDay
Member
2023-02-08
73

Re: 14.4.0: fatal error: Cannot redeclare strip_html_in_metadata()

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

 

#17 2024-05-09 21:17:23

digitography
Member
2016-10-27
49

Re: 14.4.0: fatal error: Cannot redeclare strip_html_in_metadata()

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

 

#18 2024-05-10 02:34:02

erAck
Only trying to help
2015-09-06
2091

Re: 14.4.0: fatal error: Cannot redeclare strip_html_in_metadata()

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.


Running Piwigo at https://erack.net/gallery/

Offline

 

#19 2024-05-10 19:30:08

digitography
Member
2016-10-27
49

Re: 14.4.0: fatal error: Cannot redeclare strip_html_in_metadata()

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

 

#20 2024-05-16 18:30:41

FotofuchsWW
Member
2019-02-11
6

Re: 14.4.0: fatal error: Cannot redeclare strip_html_in_metadata()

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:

Code:

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

 

#21 2024-05-16 18:38:57

digitography
Member
2016-10-27
49

Re: 14.4.0: fatal error: Cannot redeclare strip_html_in_metadata()

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

 

#22 2024-05-17 16:07:40

FotofuchsWW
Member
2019-02-11
6

Re: 14.4.0: fatal error: Cannot redeclare strip_html_in_metadata()

Thanks for the tip! That worked for me! ;-)

Offline

 

#23 2024-05-17 19:17:43

digitography
Member
2016-10-27
49

Re: 14.4.0: fatal error: Cannot redeclare strip_html_in_metadata()

Glad it worked

Offline

 

#24 2024-06-06 13:14:26

JAK
Member
2013-07-07
64

Re: 14.4.0: fatal error: Cannot redeclare strip_html_in_metadata()

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

 

#25 2024-06-06 13:20:44

OHappyDay
Member
2023-02-08
73

Re: 14.4.0: fatal error: Cannot redeclare strip_html_in_metadata()

That should do it.

Offline

 

#26 2024-06-06 14:34:15

erAck
Only trying to help
2015-09-06
2091

Re: 14.4.0: fatal error: Cannot redeclare strip_html_in_metadata()

Make sure to download the correct 14.x branch's file, i.e. this
https://github.com/Piwigo/Piwigo/raw/14 … ta.inc.php


Running Piwigo at https://erack.net/gallery/

Offline

 

#27 2024-06-07 01:21:51

JAK
Member
2013-07-07
64

Re: 14.4.0: fatal error: Cannot redeclare strip_html_in_metadata()

Thanks. Seems to have resolved it for me.

Offline

 

#28 2024-06-28 19:56:50

bhochstrasser
Member
North Carolina
2023-01-25
3

Re: 14.4.0: fatal error: Cannot redeclare strip_html_in_metadata()

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

 

#29 2024-07-02 20:50:02

piwigoaus
Member
2024-07-02
5

Re: 14.4.0: fatal error: Cannot redeclare strip_html_in_metadata()

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

 

#30 2024-07-02 23:23:56

erAck
Only trying to help
2015-09-06
2091

Re: 14.4.0: fatal error: Cannot redeclare strip_html_in_metadata()

For Docker the command might have to be

Code:

docker exec -it piwigo curl https://github.com/Piwigo/Piwigo/commit/e8090d4149bb83289f6aa2d1d971a420ecdd706f.patch | docker exec -it piwigo patch -p1

or

Code:

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().


Running Piwigo at https://erack.net/gallery/

Offline

 

Board footer

Powered by FluxBB

github twitter newsletter Donate Piwigo.org © 2002-2024 · Contact