Fatal error: Allowed memory size of ... exhausted #1969

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

I upgraded the Piwigo image on my laptop, in a docker container, and since the upgrade to 15.0.0 I get the following error when trying to view some (but not all) .mp4 video files:

Fatal error: Allowed memory size of ... bytes exhausted (tried to allocate ... bytes) in /app/www/public/include/functions_picture.inc.php on line 146

Environment

Piwigo 15.0.0 Check for upgrade
Installed on 25 March 2024, 7 months 1 week 1 day ago
Operating system: Linux
PHP: 8.3.13 (Show info) [2024-11-02 14:31:25]
MySQL: 10.11.8-MariaDB [2024-11-02 14:31:25]
Graphics Library: ImageMagick ImageMagick 7.1.1-32
Cache size N/A   never calculated Refresh

Activated plugin list 3

Admin Tools
LocalFiles Editor
VideoJS

The line indicated by the error message is: $pdftext = file_get_contents($pdfPath);

Within the following function:

function count_pdf_pages($pdfPath)
{
$pdftext = file_get_contents($pdfPath);
$num = preg_match_all("//Page\W/", $pdftext, $dummy);

return $num;
}

Why there is a call to count the number of pages in a pdf when I am trying to view an .mp4 baffles me.

Any insights or suggestions gratefully accepted.

Thank you

I upgraded the Piwigo image on my laptop, in a docker container, and since the upgrade to 15.0.0 I get the following error when trying to view some (but not all) .mp4 video files: Fatal error: Allowed memory size of ... bytes exhausted (tried to allocate ... bytes) in /app/www/public/include/functions_picture.inc.php on line 146 Environment Piwigo 15.0.0 Check for upgrade Installed on 25 March 2024, 7 months 1 week 1 day ago Operating system: Linux PHP: 8.3.13 (Show info) [2024-11-02 14:31:25] MySQL: 10.11.8-MariaDB [2024-11-02 14:31:25] Graphics Library: ImageMagick ImageMagick 7.1.1-32 Cache size N/A   never calculated Refresh Activated plugin list 3 Admin Tools LocalFiles Editor VideoJS The line indicated by the error message is: $pdftext = file_get_contents($pdfPath); Within the following function: function count_pdf_pages($pdfPath) { $pdftext = file_get_contents($pdfPath); $num = preg_match_all("/\/Page\W/", $pdftext, $dummy); return $num; } Why there is a call to count the number of pages in a pdf when I am trying to view an .mp4 baffles me. Any insights or suggestions gratefully accepted. Thank you <!-- github-sync-id:2633601877 -->
adam closed this issue 2026-10-05 01:02:42 +02:00
Author
Owner

I think it's a duplicate of #2239

I think it's a duplicate of #2239 <!-- github-comment-id:2455488748 -->
Author
Owner

It certainly looks like it.

Thank you for the prompt response.

It certainly looks like it. Thank you for the prompt response. <!-- github-comment-id:2455530782 -->
adam changed title from Fatal error: Allowed memory size of ... exhausted to Fatal error: Allowed memory size of ... exhausted 2026-10-27 11:31:17 +01:00
Sign in to join this conversation.
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: adam/Piwigo#1969