Announcement

  •  » Extensions
  •  » Batch Downloader and PHP 8.x

#1 2023-01-30 15:17:07

willem
Member
The Netherlands
2022-04-25
14

Batch Downloader and PHP 8.x

Greetings,

The Batch Downloader extension page does not tell which PHP versions it supports. It works fine here with Piwigo 13.5 and PHP 7.4. With PHP 8.0 and 8.1 it still works, but is throwing all kinds of warnings, both on the front end and the plugin settings. My PHP knowledge is nill, so I cannot judge how bad it is, but it sure scares my volunteers that are doing the tagging.

On the front in a single album or a subalbum:

Code:

Warning:  Undefined array key " batch_dwn_size"="" in="" /home/piwigolv/public_html/_data/templates_c/8w8u1p^f3bf574320518d6df108461c6e4b65d23c57b464_0.file.download_button.tpl.php on line 25


Warning:  Attempt to read property "value" on null in /home/piwigolv/public_html/_data/templates_c/8w8u1p^f3bf574320518d6df108461c6e4b65d23c57b464_0.file.download_button.tpl.php on line 25<br>
" id="batchDownloadLink" title="Download all pictures of this selection" class="pwg-state-default pwg-button" rel="nofollow">

In the plugin settings:

Code:

Warning: Undefined array key "sets" in /home/piwigolv/public_html/_data/templates_c/p6jhns^8e71618e3676257f77e26bb7420c68036aaa7a7a_0.file.sets.tpl.php on line 117

Warning: Attempt to read property "value" on null in /home/piwigolv/public_html/_data/templates_c/p6jhns^8e71618e3676257f77e26bb7420c68036aaa7a7a_0.file.sets.tpl.php on line 117

Warning: Undefined array key "sets" in /home/piwigolv/public_html/_data/templates_c/p6jhns^8e71618e3676257f77e26bb7420c68036aaa7a7a_0.file.sets.tpl.php on line 166

Warning: Attempt to read property "value" on null in /home/piwigolv/public_html/_data/templates_c/p6jhns^8e71618e3676257f77e26bb7420c68036aaa7a7a_0.file.sets.tpl.php on line 166

Piwigo 13.5.0
    Installed on 25 April 2022, 9 months 4 days ago
    Operating system: Linux
    PHP: 8.1.13 (Show info) [2023-01-30 14:00:57]
    MySQL: 8.0.32 [2023-01-30 15:00:57]
    Graphics Library: ImageMagick 7.1.0-20
    Cache size 456.5

Piwigo URL: https://beeldbank.lvbhb.nl/ (members only)

Offline

 

#2 2023-01-31 13:55:47

BigIsland270972
Member
Norway
2022-03-15
374

Re: Batch Downloader and PHP 8.x

local/config/config.inc.php

$conf['show_php_errors'] = E_ALL & ~E_NOTICE & ~E_DEPRECATED & ~E_WARNING;

To supress the messages


Piwigo 14.0 | https://fotoarkiv.no | https://foto.arki.vet | http://Bergen.gallery  | http://Ålesund.gallery | http://geiranger.gallery | http://fjord.photos | http://foto.oslo.no
Apache | PHP 8.1 | MariaDB

Offline

 

#3 2023-01-31 16:14:17

willem
Member
The Netherlands
2022-04-25
14

Re: Batch Downloader and PHP 8.x

Thanks, BigIsland270972! This works fine.

From posts in the wordpress.org forum I understand that this is a workaround, not a long term solution. Some future PHP version would change from warning to hard errors, so the deprecated code has to be updated someday.

But for the time being we're happy batch-downloaders!

Offline

 

#4 2023-01-31 17:56:35

BigIsland270972
Member
Norway
2022-03-15
374

Re: Batch Downloader and PHP 8.x

willem wrote:

Thanks, BigIsland270972! This works fine.

From posts in the wordpress.org forum I understand that this is a workaround, not a long term solution. Some future PHP version would change from warning to hard errors, so the deprecated code has to be updated someday.

But for the time being we're happy batch-downloaders!

Hi Willem!

GLAD I could help!
Best regards
Robert


Piwigo 14.0 | https://fotoarkiv.no | https://foto.arki.vet | http://Bergen.gallery  | http://Ålesund.gallery | http://geiranger.gallery | http://fjord.photos | http://foto.oslo.no
Apache | PHP 8.1 | MariaDB

Offline

 

#5 2023-04-28 10:44:50

neon
Member
2023-03-27
11

Re: Batch Downloader and PHP 8.x

Does it really work for you after supressing error messages? For me it doesn't :(
With messages supressed it just shows HTTP ERROR 500 and does not download anything.

Offline

 

#6 2023-04-29 18:12:47

willem
Member
The Netherlands
2022-04-25
14

Re: Batch Downloader and PHP 8.x

neon wrote:

Does it really work for you after suppressing error messages?

Yes, it really works. Note: I edited local/config/config.inc.php using the Local files editor plugin. If you edited it using some other tool you might have changed permissions. Just guessing. Error 500 is a very generic one. Your server log would probably tell you more.

It looks like a Pull Request to fix the PHP 8.x issue is waiting to be merged:
https://github.com/Piwigo/Piwigo-BatchD … er/pull/44

Last edited by willem (2023-04-29 18:13:25)

Offline

 

#7 2023-05-02 18:35:02

neon
Member
2023-03-27
11

Re: Batch Downloader and PHP 8.x

Still doesn't work for me :(
I have also edited local/config/config.inc.php using the Local files editor plugin, and it helps to visually remove the warnings. The error log is like this:

2023/05/02 18:28:37 [error] 1731#1731: *488 FastCGI sent in stderr: "PHP message: PHP Warning:  include(../../include/common.inc.php): Failed to open stream: No such file or directory in /config/www/plugins/BatchDownloader/download.php on line 3PHP message: PHP Warning:  include(): Failed opening '../../include/common.inc.php' for inclusion (include_path='.:/usr/share/php8') in /config/www/plugins/BatchDownloader/download.php on line 3PHP message: PHP Fatal error:  Uncaught Error: Call to undefined function check_status() in /config/www/plugins/BatchDownloader/download.php:5
Stack trace:
#0 {main}
  thrown in /config/www/plugins/BatchDownloader/download.php on line 5" while reading response header from upstream, client: 173.20.1.1, server: _, request: "GET /plugins/BatchDownloader/download.php?set_id=10&zip=1 HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "192.168.0.33:8634", referrer: "http://192.168.0.33:8634/index.php?/category/780&action=advdown_set&down_size=original"

Offline

 
  •  » Extensions
  •  » Batch Downloader and PHP 8.x

Board footer

Powered by FluxBB

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