Php startup unable to load dynamic library ldap

Php startup unable to load dynamic library ldap

Description: ------------ System Config: Windows Server 2003 (32-bit) Apache 2.2.16 PHP 5.2.14 Error Message in Apache Log: PHP Warning: PHP Startup: Unable to load dynamic library 'C:\\Program Files\\PHP\\5.2\\ext\\php_ldap.dll' - The operating system cannot run %1.\r\n in Unknown on line 0 Facts / Things I've Tried - Apache LDAP module is showing in PHPINFO to indicate that it is loading correctly and issue resides on PHP side. - php_ldap extension uncommented. - C:\Program Files\PHP\5.2 and C:\Program Files\PHP\5.2\ext have both been added to the PATH variable - extension_dir set to C:\Program Files\PHP\5.2\ext - dll location has been verified manually (by two sets of eyes) - Apache has been rebooted - Server has been rebooted - Downloaded PHP 5.2.14 (VC6 Thread-Safe for Win) from php.net, replaced DLL with DLL from ZIP and rebooted. - Replaced entire install of PHP with ZIP listed above, rebooted. - Placed DLLs in System32 folder (out of desperation) Test script: --------------- n/a Expected result: ---------------- PHP LDAP module to load correctly and show in PHPInfo Actual result: -------------- Error Message in Apache Log: PHP Warning: PHP Startup: Unable to load dynamic library 'C:\\Program Files\\PHP\\5.2\\ext\\php_ldap.dll' - The operating system cannot run %1.\r\n in Unknown on line 0

Patches

Pull Requests

History

Works just fine (since years in 5.2), please try in CLI (php.exe -d . ) to see the exact error.
php.exe -d extension=php_ldap.dll returns PHP Warning: Module 'ldap' already loaded in Unknown on line 0
That means the module has been loaded already (aka it works). See: php -m to see the list of loaded modules. and php -i | find "php.ini" to see the php.ini used, the one where php_ldap.dll is defined. Please ask more questions/support on the PHP Windows or PHP setup mailing lists, see the 'list' link in the php.net site.
Thats the conflict Im having, it may show as loaded but within PHPInfo it is not showing as loaded.
apache loading different php.ini, some PATHs are wrong, many ways to break an install. But there is no bug, sorry.

Источник

Читайте также:  Java hibernate update entity

Saved searches

Use saved searches to filter your results more quickly

You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session.

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

[BUG] Unable to load dynamic library ‘ldap.so’ #67

[BUG] Unable to load dynamic library ‘ldap.so’ #67

Comments

Describe the bug
Clean installation reports LDAP missing:

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

To Reproduce
Steps to reproduce the behaviour:

Desktop (please complete the following information):

Command used to run the container

Docker compose file (with passwords redacted)

services: sqldb: image: mysql:5.7 environment: - MYSQL_DATABASE=kimai - MYSQL_USER=kimaiuser - MYSQL_PASSWORD=kimaipassword - MYSQL_ROOT_PASSWORD=#### volumes: - /var/lib/mysql command: --default-storage-engine innodb restart: unless-stopped healthcheck: test: mysqladmin -p#### -h localhost interval: 20s start_period: 10s timeout: 10s retries: 3 networks: - kimai nginx: build: compose ports: - ####:80 volumes: - ./nginx_site.conf:/etc/nginx/conf.d/default.conf restart: unless-stopped depends_on: - kimai volumes: - public:/opt/kimai/public healthcheck: test: wget --spider http://nginx/health || exit 1 interval: 20s start_period: 10s timeout: 10s retries: 3 networks: - kimai kimai: image: kimai/kimai2:fpm-alpine-1.5-prod environment: - APP_ENV=prod - TRUSTED_PROXIES=localhost - TRUSTED_HOSTS=kimai.example.net - ADMINMAIL=admin@kimai.local - ADMINPASS=#### volumes: #- ./opt/kimai:/opt/kimai - public:/opt/kimai/public - var:/opt/kimai/var restart: unless-stopped healthcheck: test: wget --spider http://nginx || exit 1 interval: 20s start_period: 10s timeout: 10s retries: 3 networks: - kimai postfix: image: catatnight/postfix environment: maildomain: neontribe.co.uk smtp_user: kimai:kimai restart: unless-stopped restart: always networks: - kimai networks: kimai: name: kimai driver: bridge driver_opts: com.docker.network.bridge.name: br-kimai volumes: public: var: 

Additional context
I’ve read the https://www.kimai.org/documentation/ldap.html, and also tried to modify dockerfile (prod section at the bottom) — with same error output:

 composer install --working-dir=/opt/kimai --no-dev --optimize-autoloader && \ composer clearcache && \ composer require --working-dir=/opt/kimai laminas/laminas-ldap && \ chown -R www-data:www-data /opt/kimai USER www-data``` replaced laminas with `composer require zendframework/zend-ldap` in configurations with --working-dir and without. 

The text was updated successfully, but these errors were encountered:

Источник

Problem Enabling Ldap Module on Php

nope i va got that error
PHP Warning: PHP Startup: Unable to load dynamic library ‘c:/www/php/ext/php_ldap.dll’ — The operating system cannot run %1.\r\n in Unknown on line 0
PHP Warning: PHP Startup: Invalid library (maybe not a PHP library) ‘libeay32.dll’ in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library ‘c:/www/php/ext/ssleay32.dll’ — The operating system cannot run %1.\r\n in Unknown on line 0

How did you install PHP and Apache? Did you install them separately, together, or compile from source?

I am having the same problem. Did you ever resolve this issue?

How did you install PHP and Apache? Did you install them separately, together, or compile from source?

I am having the same problem. How did you resolve the issue?

MYINFO
I am trying to enable ldap for PHP on Windows Server 2003 SP 1
I am running PHP5.2.5
I am running Apache 2.2

I have copied and put all of the following files in the extensions directory «ext» or C:\PHP\ext

Files I have copied into ext and windows system32 directory:
php_ldap.dll
php_openssl.dll

I already have the following files in my system32 directory:
msvcr70.dll
msvcr71.dll
ssleay32.dll
libeay32.dll

I know that the system is seeing my extensions directory because when I put:
extension=php_ldap.dll

The error message shows up twice. This is in the Apache2.2 log file.

Unable to load dynamic library ‘C:\\PHP\\ext\\php_ldap.dll’ — The operating system cannot run %1.\r\n in Unknown on line 0

When I do a php -v, the output is
PHP Warning: Module ‘magickwand’ already loaded in Unknown on line 0
PHP Warning: Module ‘ldap’ already loaded in Unknown on line 0
PHP Warning: Module ‘openssl’ already loaded in Unknown on line 0
PHP 5.2.5 (cli) (built: Nov 8 2007 23:18:51)
Copyright (c) 1997-2007 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2007 Zend Technologies

Any suggestions would be appreciated.

Источник

Php startup unable to load dynamic library ldap

Gray Pipe

Answered by:

Question

User-715295776 posted
I’m getting a «Fatal error: Call to undefined function ldap_connect()«

Running through the motions I can verify the following:

  • I have php_ldap.dll
  • Php_ldap.php is uncommented in the php.ini
  • I have edited the correct php.ini
  • According to the IIS Php Manager extension php_ldap is enabled
  • There is no mention of ldap in phpinfo and obviously the module is not enabled

Answers

@kloinerFeigling83
I have checked phpinfo() and con confirm that I am using the correct php.ini

@HCamper
The offical php site php.net doesn’t have a forum, are you refferring to a Php forum on this site? Could you please provide a link?
Thank you for your help.

Hello, Glad you got that verified. My bad the live PHP manual is set like a Forum you will in the ldap Fundtions Branch topics that have users fixes and links to the Bugs and requests for patches. A common problem is with the libeay32.dll and ssleay32.dll libraries the set may or maynot be right version or linked correctly the posts differ on that point. I do recommend that you look at the suggestions. The libraries have to be in php install section and they also need to be in the system folder. The way to get a valid set of libraries is to (Google or Bing) for Openssl for windows the site to find is «Shining Light Productions» pick the X86 or X64 installer that matches your system. When the installer runs and asks where to put the files give the system folder as the place. It is best to restart after the install. I would say that you have a better than 50% chance that will fix the problem. I will cross my fingers it hope that it does. Martin 🙂

Источник

Оцените статью