Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fatal error logging to LAM installed on Ubuntu Server 22.04 [SOLVED] #308

Closed
adeuxdev2 opened this issue Mar 16, 2024 · 6 comments
Closed

Comments

@adeuxdev2
Copy link

Setup:
Server Ubuntu 22.04.4 LTS
Apache/2.4.52 (Ubuntu)
PHP 8.1.2-1ubuntu2.14
Samba 4.15.13-Ubuntu
LDAP Account Manager - 7.7

Brand new server with virgin installation of Samba 4 AD-DC, using the samba 4 internal LDAP, with only the Administrator set up in LDAP.

LDAP search works:
ldapsearch -x -b "dc=xxx,dc=yyy" -H ldap://localhost -D "cn=Administrator,cn=Users,dc=xxx,dc=yyy" -W

I can successfully connect to the LDAP using the windows utility ldapadmin and interact with the schema.

I have set up LAM 7.7, when I try to log in with the Administrator name and an incorrect password the login is correctly rejected.

However, when I login with the correct details LAM fails to connect. Setting PHP error reporting to all gives the following response after login, instead of loading /lam/templates/main.php:

Actual behaviour:

Deprecated: htmlspecialchars(): Passing null to parameter #1 ($string) of type string is deprecated in /usr/share/ldap-account-manager/lib/html.inc on line 508

Repeated 41 times, then:

Fatal error: Uncaught TypeError: ldap_get_entries(): Argument #2 ($result) must be of type LDAP\Result, bool given in /usr/share/ldap-account-manager/templates/main.php:85 Stack trace: #0 /usr/share/ldap-account-manager/templates/main.php(85): ldap_get_entries() #1 {main} thrown in /usr/share/ldap-account-manager/templates/main.php on line 85

Expected behaviour:

Loads /lam/templates/main.php

I think the first 'error' is just a warning of something that will break in the future, so it might as well be addressed now. The real error is the second one.

@gruberroland
Copy link
Contributor

Do you really use LAM 7.7 (this version is several years old)? If yes then please try 8.7.

@adeuxdev2
Copy link
Author

adeuxdev2 commented Mar 16, 2024

Hi,
Yes, I tried to install 8.6.1, which appears to be the latest version for Ubuntu but it failed to install there is no package 'php-voku-portable-ascii' in Ubuntu 22.04 so 8.6.1 will not install, hence I went with the version included in the apt repos - however, 'php-voku-portable-ascii' is included in Ubuntu 24.04 which is due for release next month - so I might do a complete server upgrade to 24.04 now to see if that clears things.

@adeuxdev2
Copy link
Author

Further update: updated server to Ubuntu server 24.04 daily. Comes with LAM 8.5 - installed through apt. Now working.
Tried to install the ldap-account-manager_8.6-1_all.deb with apt install - that failed with the following error:

The following packages have unmet dependencies:
 ldap-account-manager : Depends: php-psr-log (< 2.0) but 3.0.0-1 is to be installed
E: Unable to correct problems, you have held broken packages.

Not sure why LAM needs a version less than 2.0 or if it is a typo for > 2.0?

Summary - now have a working LAM installation on 24.04
Conclusion LAM is incompatible with Ubuntu 22.04 (which still has several years of LTS to run)

@gruberroland
Copy link
Contributor

Can you try to download and install php-psr-log 1.1.4 from here?

https://packages.debian.org/bookworm/all/php-psr-log/download

Debian and Ubuntu ship different major versions of it but an external dependency just supports the 1.x one. This will be resolved with LAM 8.8 in June (we need to increase the minimum required PHP version for this).

#296

@adeuxdev2
Copy link
Author

adeuxdev2 commented Mar 17, 2024

Can you try to download and install php-psr-log 1.1.4 from here?

https://packages.debian.org/bookworm/all/php-psr-log/download

Debian and Ubuntu ship different major versions of it but an external dependency just supports the 1.x one. This will be resolved with LAM 8.8 in June (we need to increase the minimum required PHP version for this).

#296

Actually, I somewhat forced the installation of 8.6 by using dpkg.

dpkg -i ldap-account-manager_8.6-1_all.deb

That still complained and threw a few more exceptions (which I didn't capture as it was late last night ;-) ). But LAM is working and reports as version 8.6. So, I am minded to quit while I am ahead and wait until the release of version 8.8.

Thanks

PS: I will edit the title of the bug to reflect that it is actually an Ubuntu 22.04 issue

@adeuxdev2 adeuxdev2 changed the title Fatal error logging in to new Samba4 instance Fatal error logging to LAM installed on Ubuntu Server 22.04 Mar 17, 2024
@adeuxdev2
Copy link
Author

Just to circle back to this and report that I downloaded LAM 8.8 and it installed without a hitch.

I will edit the title to include [solved]

@adeuxdev2 adeuxdev2 changed the title Fatal error logging to LAM installed on Ubuntu Server 22.04 Fatal error logging to LAM installed on Ubuntu Server 22.04 [SOLVED] Jun 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants