Attachment file name error?

Please report bugs here!

Moderator: Thorsten

Post Reply
seri
Posts: 22
Joined: Wed May 11, 2016 3:43 am

Attachment file name error?

Post by seri »

Hi
It becomes the error when I attach the file of the multi byte name.
The error message says
"The attached file must be smaller than 1.95Bytes."

Single byte name is OK,and "Maximum size for attachments in Bytes" at configuration is up to 2048000.
Thorsten
Posts: 15560
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: Attachment file name error?

Post by Thorsten »

Hi,

which version are you using? I think we had a fix for that in 2.9.2

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
seri
Posts: 22
Joined: Wed May 11, 2016 3:43 am

Re: Attachment file name error?

Post by seri »

Upgraded 2.9.2.

I think that this error did not happen at the time of version 2.9.0.
Thorsten
Posts: 15560
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: Attachment file name error?

Post by Thorsten »

Hi,

can you send me the file via e-mail for testing?

Thanks!

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
Thorsten
Posts: 15560
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: Attachment file name error?

Post by Thorsten »

Hi,

thanks for the PDF file. It worked on my machine...

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
seri
Posts: 22
Joined: Wed May 11, 2016 3:43 am

Re: Attachment file name error?

Post by seri »

I found that my other server with IIS on windows is OK.

On Apache2.4 on Linux,I got this error.
Do you have any ideas whether to change httpd.conf or php.ini?

And It works fine at Apache with filename start with single byte word and middle of it contains multi byte word.
e.g. "1あ.pdf"
seri
Posts: 22
Joined: Wed May 11, 2016 3:43 am

Re: Attachment file name error?

Post by seri »

Hi,
I understood that this error was result of the basename function.

http://php.net/manual/en/function.basename.php
Note:
basename() is locale aware, so for it to see the correct basename with multibyte character paths, the matching locale must be set using the setlocale() function.

At inc/PMF/Init.php
I was recovered when I inserted this one sentence.
setlocale(LC_ALL, 'ja_JP.UTF-8');
Thorsten
Posts: 15560
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: Attachment file name error?

Post by Thorsten »

Hi,

could you please try

Code: Select all

setlocale(LC_ALL, '');
bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
seri
Posts: 22
Joined: Wed May 11, 2016 3:43 am

Re: Attachment file name error?

Post by seri »

Hi,
It became the error in the same way as a beginning.
Thorsten wrote:Hi,

could you please try

Code: Select all

setlocale(LC_ALL, '');
bye
Thorsten
Post Reply