Problem with uploading large jpg files after update 3.2.2

Get help with installation and running phpBB 3.2.x here. Please do not post bug reports, feature requests, or extension related questions here.
User avatar
AmigoJack
Registered User
Posts: 5702
Joined: Tue Jun 15, 2010 11:33 am
Location: グリーン ヒル ゾーン
Contact:

Re: Problem with uploading large jpg files after update 3.2.2

Post by AmigoJack »

EA117 wrote:
Mon May 13, 2019 10:31 am
As compared to downloading the one Mick successfully attached (the actual attachment; not the one using an [img] link) which has modified headers and content, whether that happened post-upload or pre-upload.
I was referring to those two different files.

The overall issue is to parse JPEG files only partially. Maybe an outcome of the wrong decision to base parsing onto loading entire parts of a file into memory (instead of accessing file positions only to what is parsed and recognized).
The worst thing about censorship is ███████████
Affin wrote:
Tue Nov 20, 2018 9:51 am
The problem is probably not my English but you do not want to understand correctly.
...
We will not come anybody anyway, nevertheless, it's best to shit this.

User avatar
Kot Matroskin
Registered User
Posts: 126
Joined: Sat May 29, 2010 9:44 am
Location: Minsk, Belarus
Name: Vitaly Filatenko
Contact:

Re: Problem with uploading large jpg files after update 3.2.2

Post by Kot Matroskin »

Btw, I've created a ticket for that: https://tracker.phpbb.com/browse/PHPBB3-16056

Originally I created it by cloning another one, that is why you can see incorrect "Fix Version/s" field. I have no permissions to change this field.

User avatar
PaulusB
Registered User
Posts: 229
Joined: Sun May 28, 2006 2:08 pm
Location: Holland
Contact:

Re: Problem with uploading large jpg files after update 3.2.2

Post by PaulusB »

After the update to 3.2.9 is get the same error only on small png files one file was 634 x 140, large PNG files no problem.
error It was not possible to determine the dimensions of the image. Make sure the URL you entered is correct.
Same error here on phpbb.com with the same image see attachment.
Attachments
Knipsel.PNG

User avatar
John connor
Registered User
Posts: 2497
Joined: Fri Nov 14, 2014 5:14 pm
Location: U S Of A
Name: Aaron
Contact:

Re: Problem with uploading large jpg files after update 3.2.2

Post by John connor »

When are they going to fix this? This has been a years long problem. Though, I can't say I ever had the issue. Maybe once or twice many years ago.

User avatar
3Di
Former Team Member
Posts: 15071
Joined: Mon Apr 04, 2005 11:09 pm
Location: Milan (IT) Frankfurt (DE)
Name: Marco
Contact:

Re: Problem with uploading large jpg files after update 3.2.2

Post by 3Di »

It seems to me it is fixed.

Original file: https://scooterclub.by/tmp/P90505-140230.jpg
(I saved this one with right-mouse-button/download image as and it contains the metadata.)


P90505-140230.jpg
Please PM me only to request paid works. Thx.
Want to compensate me for my interest? Donate
My development's activity º PhpStorm's proud user
Extensions, Scripts, MOD porting, Update/Upgrades
:studio_microphone: Premium extensions @ The Studio

User avatar
PaulusB
Registered User
Posts: 229
Joined: Sun May 28, 2006 2:08 pm
Location: Holland
Contact:

Re: Problem with uploading large jpg files after update 3.2.2

Post by PaulusB »

Upload this picture is to this topic

Image

User avatar
3Di
Former Team Member
Posts: 15071
Joined: Mon Apr 04, 2005 11:09 pm
Location: Milan (IT) Frankfurt (DE)
Name: Marco
Contact:

Re: Problem with uploading large jpg files after update 3.2.2

Post by 3Di »

PaulusB wrote:
Sat Jan 11, 2020 1:49 pm
Upload this picture is to this topic
...
Not in the IMG bbcode pls: https://www.vwforum.nl/images/logo2020b.png ..



And done.
Attachments
logo2020b.png.jpg
Please PM me only to request paid works. Thx.
Want to compensate me for my interest? Donate
My development's activity º PhpStorm's proud user
Extensions, Scripts, MOD porting, Update/Upgrades
:studio_microphone: Premium extensions @ The Studio

User avatar
PaulusB
Registered User
Posts: 229
Joined: Sun May 28, 2006 2:08 pm
Location: Holland
Contact:

Re: Problem with uploading large jpg files after update 3.2.2

Post by PaulusB »

Why do I get with the same file the error on this forum and my forum? And u not. Chrome in Android and firefox on pc same result.
Attachments
Screenshot_20200111-151253.jpg

User avatar
3Di
Former Team Member
Posts: 15071
Joined: Mon Apr 04, 2005 11:09 pm
Location: Milan (IT) Frankfurt (DE)
Name: Marco
Contact:

Re: Problem with uploading large jpg files after update 3.2.2

Post by 3Di »

try using F12 and inspect the issue in the "network tab". - here FF and Windows.
Please PM me only to request paid works. Thx.
Want to compensate me for my interest? Donate
My development's activity º PhpStorm's proud user
Extensions, Scripts, MOD porting, Update/Upgrades
:studio_microphone: Premium extensions @ The Studio

User avatar
PaulusB
Registered User
Posts: 229
Joined: Sun May 28, 2006 2:08 pm
Location: Holland
Contact:

Re: Problem with uploading large jpg files after update 3.2.2

Post by PaulusB »

I see this.

And in the console this error

HTML1403: De numerieke tekenverwijzing wordt niet omgezet in een geldig teken.

Translated:

HTML1403: The numeric character reference is not converted to a valid character.
Attachments
Knipsel.PNG

User avatar
3Di
Former Team Member
Posts: 15071
Joined: Mon Apr 04, 2005 11:09 pm
Location: Milan (IT) Frankfurt (DE)
Name: Marco
Contact:

Re: Problem with uploading large jpg files after update 3.2.2

Post by 3Di »

PaulusB wrote:
Fri Jan 10, 2020 11:12 pm
After the update to 3.2.9 is get the same error only on small png files one file was 634 x 140, large PNG files no problem.
error It was not possible to determine the dimensions of the image. Make sure the URL you entered is correct.
Same error here on phpbb.com with the same image see attachment.
Obviously your image is not a PNG but a JPEG/JFIF as per https://www.filesignatures.net/index.ph ... F&mode=EXT

This is the hexadecimal signature of https://www.vwforum.nl/images/logo2020b.png
FF D8 FF E0 00 10 4A 46 49 46 00 01 01 00 00 01

2020-01-14 04_42_31-EditPlus [325]  - [logo2020b.png].png
2020-01-14 04_42_31-EditPlus [325] - [logo2020b.png].png (2.63 KiB) Viewed 314 times

The library checks for a PNG due to its filename extension

Code: Select all

namespace FastImageSize\Type;

class TypePng extends TypeBase
{
	/** @var string PNG header */
	const PNG_HEADER = "\x89\x50\x4e\x47\x0d\x0a\x1a\x0a";

	/** @var int PNG IHDR offset */
	const PNG_IHDR_OFFSET = 12;

The image if really a png one, must have this hex header ( see: https://www.filesignatures.net/index.ph ... A&mode=SIG )
89 50 4E 47 0D 0A 1A 0A 00 00 00 0D 49 48 44 52

2020-01-14 04_05_33-EditPlus-PNG.png
2020-01-14 04_05_33-EditPlus-PNG.png (11.14 KiB) Viewed 314 times
Conclusion, rename the image as per the link https://www.vwforum.nl/images/logo2020b.png as logo2020-C.png.jpg and try again.

2020-01-14 05_02_37-phpBB • Problem with uploading large jpg files after update 3.2.2 - Page 3.png
Please PM me only to request paid works. Thx.
Want to compensate me for my interest? Donate
My development's activity º PhpStorm's proud user
Extensions, Scripts, MOD porting, Update/Upgrades
:studio_microphone: Premium extensions @ The Studio

KYPREO
Registered User
Posts: 388
Joined: Fri Feb 02, 2018 9:56 am
Contact:

Re: Problem with uploading large jpg files after update 3.2.2

Post by KYPREO »

I have had this error come up once or twice. In my case, it was that the image host sat the JPG images behind a HTML page with a JS challenge to prevent hotlinking and scraping of images. When phpBB went to check the image dimensions, it saw a HTML file, not a JPG.

In essence, It's the same error as described above, because when phpBB checks the file, it is an unexpected MIME type / extension.

I think what is confusing here is that the error refers to not being able to determine image dimensions, rather than incorrect MIME type. Perhaps the error message should be changed to indicate the image has the wrong extension or MIME type eg

Code: Select all

Error: unexpected image extension or MIME type. Make sure the file type and extension for the file you entered is correct.
phpBB user since 2002
www.AusRotary.com

User avatar
PaulusB
Registered User
Posts: 229
Joined: Sun May 28, 2006 2:08 pm
Location: Holland
Contact:

Re: Problem with uploading large jpg files after update 3.2.2

Post by PaulusB »

@3Di thank u for the explanation :D

russian2
Registered User
Posts: 37
Joined: Sun Jan 14, 2018 3:37 pm

Re: Problem with uploading large jpg files after update 3.2.2

Post by russian2 »

AmigoJack wrote:
Thu Jan 18, 2018 1:44 pm
No, this "bug" persisted in 3.2.1 and 3.2.0 already. What you refer to had (a) different culprit(s).

You can fix it yourself by opening /vendor/marc1706/fast-image-size/lib/Type/TypeJpeg.php and finding:

Code: Select all

	const JPEG_MAX_HEADER_SIZE = 124576;
and changing it to a size you feel comfortable with (i.e 10* 1024* 1024 for scanning up to 10 MiB).
Thank you, this has solved this for me!

Post Reply

Return to “[3.2.x] Support Forum”