[11.x] ob_clean(): failed to delete buffer - corrupted downloads #1126

Closed
opened 2026-10-05 00:32:25 +02:00 by adam · 3 comments
Owner

Hi,

I recently updated to version 11.1.0 and noticed that image downloads were corrupted and could not be opened.

I checked the file with a hex editor and found the problem. A PHP notice at the start of the file:

piwigo_3

Notice ob_clean(): failed to delete buffer. No buffer to delete in action.php on line 224

I changed the line with an additional check, I am no PHP expert, so the solution might not be good:

piwigo_4

However image downloads are currently working again. I am not sure if its a problem with Piwigo or my server.

Andy

Hi, I recently updated to version 11.1.0 and noticed that image downloads were corrupted and could not be opened. I checked the file with a hex editor and found the problem. A PHP notice at the start of the file: ![piwigo_3](https://user-images.githubusercontent.com/355448/105627910-ddaa3b80-5e39-11eb-9a64-a0274c07ac16.jpg) `Notice ob_clean(): failed to delete buffer. No buffer to delete in action.php on line 224` I changed the line with an additional check, I am no PHP expert, so the solution might not be good: ![piwigo_4](https://user-images.githubusercontent.com/355448/105627935-0af6e980-5e3a-11eb-9db8-3075a11019ae.jpg) However image downloads are currently working again. I am not sure if its a problem with Piwigo or my server. Andy <!-- github-sync-id:792768557 -->
adam closed this issue 2026-10-05 00:32:25 +02:00
Author
Owner

In i.php Piwigo does:

if (ob_get_length () !== FALSE)

before calling ob_clean()

In `i.php` Piwigo does: ``` if (ob_get_length () !== FALSE) ``` before calling `ob_clean()` <!-- github-comment-id:769786681 -->
Author
Owner

Fwiw, I left a comment at commit db65aa51d5

Fwiw, I left a comment at commit db65aa51d52ec2b4bd00b2f7835770779b19579c <!-- github-comment-id:770202063 -->
Author
Owner

Hello, I have the same problem in a fresh install (piwigo version 12.3.0 - php7.3).
The downloaded file is corrupted (incomplete, I get a .part file) with Firefox (v100.0), but not in Chrome nor Edge).
The problem seems to be solved when I comment ob_clean() in action.php even if I assume that this is not the best way to proceed.

Hello, I have the same problem in a fresh install (piwigo version 12.3.0 - php7.3). The downloaded file is corrupted (incomplete, I get a .part file) with Firefox (v100.0), but not in Chrome nor Edge). The problem seems to be solved when I comment ob_clean() in action.php even if I assume that this is not the best way to proceed. <!-- github-comment-id:1266606502 -->
Sign in to join this conversation.
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: adam/Piwigo#1126