Batch downloader failing using pclzip and php 7.1 #640

Closed
opened 2026-10-05 00:08:41 +02:00 by adam · 2 comments
Owner

Resubmitting here as plugin creator indicated the issue was upstream of the plugin: https://github.com/mistic100/Piwigo-BatchDownloader/issues/18


Receiving following php error:

Notice: A non well formed numeric value encountered in /config/www/gallery/admin/include/pclzip.lib.php on line 1845

After a little googling, it appears that the issue is related to requiring the memory_limit needing to get casted correctly in php 7.1. Possible solutions:

piwik/component-decompress#9
FineUploader/php-traditional-server#17

Piwigo 2.9.0
Batch Downloader: 2.2.3
Environment
PHP 7.1.5
PclZip 2.8.2

Resubmitting here as plugin creator indicated the issue was upstream of the plugin: https://github.com/mistic100/Piwigo-BatchDownloader/issues/18 ------- Receiving following php error: Notice: A non well formed numeric value encountered in /config/www/gallery/admin/include/pclzip.lib.php on line 1845 After a little googling, it appears that the issue is related to requiring the memory_limit needing to get casted correctly in php 7.1. Possible solutions: piwik/component-decompress#9 FineUploader/php-traditional-server#17 Piwigo 2.9.0 Batch Downloader: 2.2.3 Environment PHP 7.1.5 PclZip 2.8.2 <!-- github-sync-id:232098110 -->
adam closed this issue 2026-10-05 00:08:41 +02:00
Author
Owner

Hi @tjw1184

I have no PHP 7.1 environment yet. Can you test this for me? In file admin/include/pclzip.lib.php

$ git diff admin/include/pclzip.lib.php 
diff --git a/admin/include/pclzip.lib.php b/admin/include/pclzip.lib.php
index c2d09a5..3bb44d6 100644
--- a/admin/include/pclzip.lib.php
+++ b/admin/include/pclzip.lib.php
@@ -1836,6 +1836,7 @@
     $v_memory_limit = ini_get('memory_limit');
     $v_memory_limit = trim($v_memory_limit);
     $last = strtolower(substr($v_memory_limit, -1));
+    $v_memory_limit = intval($v_memory_limit);
  
     if($last == 'g')

I have tested on PHP 5.5 and it works fine.

Hi @tjw1184 I have no PHP 7.1 environment yet. Can you test this for me? In file admin/include/pclzip.lib.php ``` $ git diff admin/include/pclzip.lib.php diff --git a/admin/include/pclzip.lib.php b/admin/include/pclzip.lib.php index c2d09a5..3bb44d6 100644 --- a/admin/include/pclzip.lib.php +++ b/admin/include/pclzip.lib.php @@ -1836,6 +1836,7 @@ $v_memory_limit = ini_get('memory_limit'); $v_memory_limit = trim($v_memory_limit); $last = strtolower(substr($v_memory_limit, -1)); + $v_memory_limit = intval($v_memory_limit); if($last == 'g') ``` I have tested on PHP 5.5 and it works fine. <!-- github-comment-id:305488841 -->
Author
Owner

Apologies for the delay, I did test this fix and it indeed fixes the issue I was seeing. Thank you for fixing it.

Apologies for the delay, I did test this fix and it indeed fixes the issue I was seeing. Thank you for fixing it. <!-- github-comment-id:310870557 -->
Sign in to join this conversation.
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: adam/Piwigo#640