Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fatal error whenever I try to use the plugin #47

Open
nigiord opened this issue Sep 16, 2023 · 2 comments
Open

Fatal error whenever I try to use the plugin #47

nigiord opened this issue Sep 16, 2023 · 2 comments

Comments

@nigiord
Copy link

nigiord commented Sep 16, 2023

I get a PHP fatal error whenever I try to use the plugin.

Batch Downloader version: 13.a
Piwigo version: 13.8.0
PHP version:

$ php --version
PHP 7.4.33 (cli) (built: Sep  4 2023 08:11:54) ( NTS )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies
    with Zend OPcache v7.4.33, Copyright (c), by Zend Technologies

Full error:

Fatal error: Uncaught ValueError: fread(): Argument #2 ($length) must be greater than 0 in /var/www/piwigo/admin/include/pclzip.lib.php:2674 Stack trace: #0 /var/www/piwigo/admin/include/pclzip.lib.php(2674): fread() #1 /var/www/piwigo/admin/include/pclzip.lib.php(2504): PclZip->privAddFile() #2 /var/www/piwigo/admin/include/pclzip.lib.php(2406): PclZip->privAddFileList() #3 /var/www/piwigo/admin/include/pclzip.lib.php(2141): PclZip->privAddList() #4 /var/www/piwigo/admin/include/pclzip.lib.php(409): PclZip->privCreate() #5 /var/www/piwigo/plugins/BatchDownloader/include/BatchDownloader.class.php(998): PclZip->create() #6 /var/www/piwigo/plugins/BatchDownloader/include/BatchDownloader.class.php(516): myZip->__construct() #7 /var/www/piwigo/plugins/BatchDownloader/include/events.inc.php(102): BatchDownloader->createNextArchive() #8 /var/www/piwigo/include/functions_plugins.inc.php(264): batch_download_index_button() #9 /var/www/piwigo/index.php(351): trigger_notify() #10 {main} thrown in /var/www/piwigo/admin/include/pclzip.lib.php on line 2674

Haven't found anything similar online. Any help would be appreciated.

@rajdude
Copy link

rajdude commented Oct 8, 2024

Hmm, one year has passed and no one has commented on this error.

I have the same error, but the plugin version I have installed is 14.5
That makes me think the developer knows about it and this is a problem with only some users, not all.

So what is the fix? Did you ever find a solution?

@rajdude
Copy link

rajdude commented Oct 8, 2024

I may have found a solution for this problem. I noticed that this plugin was complaining that it could not find ZipArchive on my webhost, so it will use PclZip. I went into my host's cPanel and went to
Software > Select PHP version
On that page under "Z" I enabled the checkbox for Zip

After that the error showing up in this plugin's setting page went away. I was then able to download the album as a zip file using the cloud button on my photo album's page.

Notes:

  1. Also went away was the error related to undefined array and this one:
    Fatal error: Uncaught ValueError: fread(): Argument Contourne l'interdiction de télécharger des photos en les ajoutant à une collection #2 ($length) must be greater than 0.

  2. This error is still there, if "Photo size choices" is set to One size = Original
    Downloader Warning: Undefined array key "SIZE_INFO" in file.init_zip.tpl.php on line 153

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants