attachment size limit

In this board you can talk about general questions about phpMyFAQ

Moderator: Thorsten

Post Reply
ylhu
Posts: 5
Joined: Wed Mar 16, 2022 6:45 am

attachment size limit

Post by ylhu »

Hello,

I installed phpMyFAQ 3.1.1 on a CentOS 7 server. Versions of related software are: httpd 2.4.6; mariadb 5.5.68; php 8.1.3. It works great overall.

But I am having problems uploading attachment files. The system php.ini has the following setups: post_max_size=8M and upload_max_filesize=2M. In phpMyFAQ configuration, "Maximum size for attachments in bytes" is set at 1000000.

When I attempted to upload any file, I received the error message "the file is too big", even if the files are actually very small. I tried 0-byte files and received the same message. I tried different file types and the problem remained the same.

I checked file /var/log/httpd/error_log and found it logged the following info when I tried to upload files:
[Wed Mar 16 13:33:59.363459 2022] [php:notice] [pid 26850] [client 10.14.255.103:56464] phpMyFAQ TypeError: phpMyFAQ\\Attachment\\AttachmentAbstract::setKey(): Argument #1 ($key) must be of type string, null given, called in /var/www/html/src/phpMyFAQ/Attachment/AttachmentFactory.php on line 85 in /var/www/html/src/phpMyFAQ/Attachment/AttachmentAbstract.php on line 201\nStack trace:\n#0 /var/www/html/src/phpMyFAQ/Attachment/AttachmentFactory.php(85): phpMyFAQ\\Attachment\\AttachmentAbstract->setKey()\n#1 /var/www/html/admin/ajax.attachment.php(39): phpMyFAQ\\Attachment\\AttachmentFactory::create()\n#2 /var/www/html/admin/index.php(232): require('...')\n#3 {main}, referer: http://xxx.195.xxx.51/admin/?action=editentry

Your help is greatly appreciated,
Thorsten
Posts: 15560
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: attachment size limit

Post by Thorsten »

Hi,

we'll release v3.1.2 asap with a fix for this issue.

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
ylhu
Posts: 5
Joined: Wed Mar 16, 2022 6:45 am

Re: attachment size limit

Post by ylhu »

OK. Thank you.
Thorsten
Posts: 15560
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: attachment size limit

Post by Thorsten »

Hi,

3.1.2 was released yesterday.

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
ylhu
Posts: 5
Joined: Wed Mar 16, 2022 6:45 am

Re: attachment size limit

Post by ylhu »

I just upgraded and the problem is gone.
Thanks!
Post Reply