attachments phpmyfaq 3.1.1

Please report bugs here!

Moderator: Thorsten

Post Reply
treichelt
Posts: 26
Joined: Fri May 20, 2016 12:14 am

attachments phpmyfaq 3.1.1

Post by treichelt »

I have my clean phpmyfaq 3.1.1, IIS and php 8.1.3 installed and working.
2 things I discovered.
i had a hyphen - in the name of one of my categories and when i resorted and saved the list it always put that one with the hyphen at the top.
when i removed the hyphen it stayed where i placed it.

i set php.ini file upload size to 20 MB and in the admin section shows 20MB but when i attach a file it won't let me and shows attachment size (max 0.1 MB)

I looked at the php log

[16-Mar-2022 21:15:46 Europe/Berlin] phpMyFAQ TypeError: phpMyFAQ\Attachment\AttachmentAbstract::setKey(): Argument #1 ($key) must be of type string, null given, called in D:\phpmyfaq\src\phpMyFAQ\Attachment\AttachmentFactory.php on line 85 in D:\phpmyfaq\src\phpMyFAQ\Attachment\AttachmentAbstract.php on line 201
Stack trace:
#0 D:\phpmyfaq\src\phpMyFAQ\Attachment\AttachmentFactory.php(85): phpMyFAQ\Attachment\AttachmentAbstract->setKey(NULL)
#1 D:\phpmyfaq\admin\ajax.attachment.php(39): phpMyFAQ\Attachment\AttachmentFactory::create(NULL)
#2 D:\phpmyfaq\admin\index.php(232): require('D:\\phpmyfaq\\adm...')
#3 {main}

I would enable debug but it shows nothing but errors and can't get to any page.
Thorsten
Posts: 15661
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: attachments phpmyfaq 3.1.1

Post by Thorsten »

Hi,

this was fixed the 3.1.2 release yesterday.

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
treichelt
Posts: 26
Joined: Fri May 20, 2016 12:14 am

Re: attachments phpmyfaq 3.1.1

Post by treichelt »

sorry but I still cannot upload anything above .01 mb
post max size is 80m upload max size is 20M
I verified all extensions are installed, i upgraded to 3.1.2 this morning
PHP 8.1.4 is out and they strongly encouraged upgrading to that.
I am still not able to use ldap before and after the phpmyfaq upgrae and or before and after the php upgrade.
if I use domain\user name always comes back with wrong user name or password. i use the same ldap file i have used with the 3.0.12 version that does work with ldap
The above is on my prod server
my dev server has also been upgraded to 3.1.2 with php 7.4.2, same configuration
ldap and file uploads work as expected.

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

Re: attachments phpmyfaq 3.1.1

Post by Thorsten »

Hi,

so, LDAP and the file upload are working on PHP 7.4, but not PHP 8.1, right?

I'll check the code base about BC breaks in PHP.

Thanks for your support!

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
treichelt
Posts: 26
Joined: Fri May 20, 2016 12:14 am

Re: attachments phpmyfaq 3.1.1

Post by treichelt »

that is correct, 8.1 will break it, with 7.4 it still works.

Danke fuer deine hilfe

Thorsten
Thorsten
Posts: 15661
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: attachments phpmyfaq 3.1.1

Post by Thorsten »

Hi,
treichelt wrote: Thu Mar 17, 2022 3:29 pm sorry but I still cannot upload anything above .01 mb
post max size is 80m upload max size is 20M
one question, did you changed the value fpr the uploads in the admin configuration as well?

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

Re: attachments phpmyfaq 3.1.1

Post by Thorsten »

Hi,

did you try the login via LDAP with DEBUG turned on?

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

Re: attachments phpmyfaq 3.1.1

Post by Thorsten »

Hi,

I fixed the LDAP / AD issue.

Please use this code for the LDAP class: https://github.com/thorsten/phpMyFAQ/bl ... Q/Ldap.php

My config/ldap.php file looks like:

Code: Select all

$PMF_LDAP['ldap_server'] = 'ldap://192.168.2.163';
$PMF_LDAP['ldap_port'] = 10389;
$PMF_LDAP['ldap_user'] = 'uid=admin,ou=system';
$PMF_LDAP['ldap_password'] = 'secret';
$PMF_LDAP['ldap_base'] = 'ou=users,dc=wimpi,dc=net';
My LDAP-Configuration:

Code: Select all

ldap.ldapSupport true
ldap.ldap_dynamic_login_attribute uid
ldap.ldap_mapping.mail mail
ldap.ldap_mapping.memberOf 
ldap.ldap_mapping.name cn
ldap.ldap_mapping.username samAccountName
ldap.ldap_options.LDAP_OPT_PROTOCOL_VERSION 3
ldap.ldap_options.LDAP_OPT_REFERRALS 0
ldap.ldap_use_anonymous_login false
ldap.ldap_use_domain_prefix false
ldap.ldap_use_dynamic_login false
ldap.ldap_use_memberOf false
ldap.ldap_use_multiple_servers false
ldap.ldap_use_sasl false
I used this Docker container for testing: https://github.com/dwimberger/ldap-ad-it

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
Post Reply