Azure / wordpress-linux-appservice

MIT License
96 stars 65 forks source link

unable to load ldap extension #128

Open annndddy opened 6 months ago

annndddy commented 6 months ago

i follow this to add the ldap extension https://github.com/Azure/wordpress-linux-appservice/blob/main/WordPress/wordpress_adding_php_extensions.md

in step 3 the version i use is php82-ldap after finishing step 1-7, the ldap.so is failed to load

it show in error log

PHP Warning: PHP Startup: Unable to load dynamic library '/home/site/ext/ldap.so' (tried: /home/site/ext/ldap.so (Error loading shared library libldap.so.2: No such file or directory (needed by /home/site/ext/ldap.so)), /usr/local/lib/php/extensions/no-debug-non-zts-20220829//home/site/ext/ldap.so.so (Error loading shared library /usr/local/lib/php/extensions/no-debug-non-zts-20220829//home/site/ext/ldap.so.so: No such file or directory)) in Unknown on line 0

i tried to copy the libldap.so.2 to the /home/site/ext/ folder too but no luck

thanks

rabollin commented 5 months ago

@annndddy - did you check if its dependencies are correctly deployed? I will check from my end too and keep you posted on the resolution.

annndddy commented 5 months ago

@rabollin the dependencies is installed at the folder /usr/lib/ and from the guide step 5, that folder are non-persistent in nature and will be reset to the default state when the container is restarted. so i tried to copy the libldap.so.2 to the /home/site/ext/ and added this extension to the ini file extension=/home/site/ext/libldap.so.2 which will show a dependencies error liblber.so.2 PHP Warning: PHP Startup: Unable to load dynamic library '/home/site/ext/ldap/libldap.so.2' (tried: /home/site/ext/ldap/libldap.so.2 (Error loading shared library liblber.so.2: No such file or directory (needed by /home/site/ext/ldap/libldap.so.2)), /usr/local/lib/php/extensions/no-debug-non-zts-20220829//home/site/ext/ldap/libldap.so.2.so (Error loading shared library /usr/local/lib/php/extensions/no-debug-non-zts-20220829//home/site/ext/ldap/libldap.so.2.so: No such file or directory)) in Unknown on line 0

so i also try to copy the liblber.so.2 to the /home/site/ext/ and added liblber.so.2 to the ini file extension=/home/site/ext/liblber.so.2 and it will show error Invalid library (maybe not a PHP library) '/home/site/ext/ldap/liblber.so.2' in Unknown on line 0

am i doing it wrong or any way to deployed the dependencies correctly? thanks

annndddy commented 2 months ago

any updates on this issues? thanks

BrunoTMartins commented 3 weeks ago

The exact same situation is happening on my side, @annndddy hav you found a solution or an alternative?