Configure error cannot find ldap h

Compile PHP 7.3.13 on CentOS 7 with OCI8 and MongoDB extension. First Install Development Tools on CentOS 7. Exit fullscreen mode Download the latest stable PHP version 7.3.13 source code from its website. Exit fullscreen mode “configure” is a script designed to aid a program to be run on a wide number of different […]

Содержание

  1. Compile PHP 7.3.13 on CentOS 7 with OCI8 and MongoDB extension.
  2. Creativ-Tech KB
  3. Technology is an Art
  4. Common php compile errors and the corresponding missing lib
  5. 4 thoughts on “ Common php compile errors and the corresponding missing lib ”
  6. Русские Блоги
  7. configure: error: Cannot find ldap.h
  8. Интеллектуальная рекомендация
  9. IView CDN Загрузка значка шрифта нормальная, а значок шрифта не может быть загружен при локальной загрузке JS и CSS
  10. Критическое: ошибка настройки прослушивателя приложения класса org.springframework.web.context.ContextLoaderLis
  11. 1086 Не скажу (15 баллов)
  12. Pandas применяют параллельный процесс приложения, многоядерная скорость очистки данных
  13. PureMVC Learning (Tucao) Примечания
  14. Linux System Administration

Compile PHP 7.3.13 on CentOS 7 with OCI8 and MongoDB extension.

First Install Development Tools on CentOS 7.

Exit fullscreen mode

Download the latest stable PHP version 7.3.13 source code from its website.

Exit fullscreen mode

“configure” is a script designed to aid a program to be run on a wide number of different computers. This will automatically use your system variables to configure and ready the source for your VPS. When it is done it will generate a file called Makefile with all the info in it so define your required parameters while configuring it.

Exit fullscreen mode

You may face multiple errors during compilation. Resolve the Dependencies first.

configure: error: libxml2 not found. Please check your libxml2 installation.

Exit fullscreen mode

configure: error: Cannot find OpenSSL’s

Exit fullscreen mode

configure: error: Please reinstall the BZip2 distribution

Exit fullscreen mode

checking for cURL 7.15.5 or greater… configure: error: cURL version 7.15.5 or later is required to compile php with cURL support.

Exit fullscreen mode

configure: error: jpeglib.h not found.

Exit fullscreen mode

configure: error: png.h not found.

Exit fullscreen mode

configure: error: xpm.h not found.

Exit fullscreen mode

configure: error: freetype-config not found.

Exit fullscreen mode

configure: error: Unable to locate gmp.h

Exit fullscreen mode

configure: error: Unable to detect ICU prefix or /usr/bin/icu-config failed. Please verify ICU install prefix and make sure icu-config works.

Exit fullscreen mode

configure: error: Cannot find ldap.h

Exit fullscreen mode

configure: error: Cannot find libtidy

Exit fullscreen mode

configure: error: xslt-config not found. Please reinstall the libxslt >= 1.1.0 distribution

Exit fullscreen mode

configure: error: Please reinstall the libzip distribution

Exit fullscreen mode

configure: error: off_t undefined; check your library configuration

Exit fullscreen mode

/usr/local/include/zip.h:59:21: fatal error: zipconf.h: No such file or directory

Exit fullscreen mode

Finally, Build part has been completed.

Exit fullscreen mode

You are now ready to compile the source. To compile it run the below command. This will compile the source output a lot of rubbish to your console. Just go ahead and let it finish. It will take time if you won’t mention “-j” option. Increase the number according to your VPS CPU core available. This will reduce the compiling time.

Exit fullscreen mode

When it is done, you should be ready to install it. Make will now follow the instructions in the Makefile to install the compiled package.

Exit fullscreen mode

( PHP Installation part has been completed. )

Источник

Creativ-Tech KB

Technology is an Art

Common php compile errors and the corresponding missing lib

Common php compile errors and the corresponding missing lib

Some of the package only available if you have set up epel for additional yum repo.

configure: error: Please reinstall the sqlite distribution from http://www.sqlite.org
$ yum install sqlite-devel.x86_64

configure: error: freetype-config not found.
$ yum install freetype-devel.x86_64 freetype.x86_64

configure: error: libXpm.(a|so) not found.
$ yum install libXpm-devel.x86_64 libXpm.x86_64

configure: error: jpeglib.h not found.
$ yum install libjpeg-devel.x86_64
or for centOS 6.x
$ yum install libjpeg-turbo.x86_64 libjpeg-turbo-devel.x86_64

configure: error: png.h not found.
$ yum install libpng-devel.x86_64

configure: error: Unable to locate gmp.h
$ yum install gmp-devel.x86_64

configure: error: utf8_mime2text() has new signature, but U8T_CANONICAL is missing. This should not happen. Check config.log for additional information.
$ yum install libc-client-devel.x86_64

configure: WARNING: continuing without libevent support
$ yum install libevent-devel.x86_64

configure: error: Cannot find imap library (libc-client.a). Please check your c-client installation.
# you may find that you have the lic-client-devel.x86_64 installed but configure still complains, and it seems, we need
# the i686 version. or we can use –with-libdir=lib64 without install the i686 package
$ yum install libc-client-devel.i686

configure: error: Kerberos libraries not found.
# you find you have the 64bits version installed, but configure still complains
# install the i686 version too or we can use –with-libdir=lib64 without install the i686 package
$ yum install krb5-devel.i686

configure: error: Unable to detect ICU prefix or no failed. Please verify ICU install prefix and make sure icu-config works.
$ yum install libicu-devel.x86_64

configure: error: installation or configuration problem: C++ compiler cannot create executables.
$ yum install gcc-c++.x86_64

configure: error: Cannot find ldap.h
$ yum install openldap-devel.x86_64

configure: error: Cannot find ldap libraries in /usr/lib.
# on our 64 bits system, it needs something still in /usr/lib
# or we can use –with-libdir=lib64 without install the i686 package
$ yum install openldap-devel.i686

configure: error: mcrypt.h not found. Please reinstall libmcrypt.
$ yum install libmcrypt-devel.x86_64

mysql_config not found
# find out where mysql_config is and add –with-mysqli=/usr/bin/mysql_config

configure: error: Cannot find pspell
$ yum install aspell-devel.x86_64

configure: error: Cannot find libtidy
$ yum install libtidy-devel.x86_64

configure: error: xslt-config not found. Please reinstall the libxslt >= 1.1.0 distribution
$ yum install libxslt-devel.x86_64

configure: error: Please reinstall the BZip2 distribution
$ yum install bzip2-devel.x86_64

configure: error: Cannot find libsphinxclient headers

configure: error: xml2-config not found. Please check your libxml2 installation.
$ yum install libxml2-devel.x86_64

configure: error: Cannot find OpenSSL’s
$ yum install openssl-devel.x86_64

checking for PCRE headers location… configure: error: Could not find pcre.h in /usr
$ yum install pcre-devel.x86_64

configure: error: Please reinstall the libcurl distribution –
easy.h should be in /include/curl/

$ yum install libcurl-devel.x86_64

configure: error: Unable to detect ICU prefix or shared,/usr/bin/icu-config failed. Please verify ICU install prefix and make sure icu-config works.
$ yum install icu.x86_64 libicu-devel.x86_64

configure: error: C++ preprocessor “/lib/cpp” fails sanity check
$ yum install gcc-c++.x86_64

checking for libmemcached location… configure: error: memcached support requires libmemcached. Use –with-libmemcached-dir=xxx to specify the prefix where libmemcached headers and library are located
$ yum install libmemcached.x86_64
and add “–with-libmemcached-dir=/usr” to configure cmd

checking for libmemcached location… configure: error: Unable to find memcached.h under /usr
$ yum install libmemcached-devel.x86_64

configure: error: no, libmemcached sasl support is not enabled. Run configure with –disable-memcached-sasl to disable this check
fix: let us go without SASL support by adding “–disable-memcached-sasl”
later we could build a memcached with SASL enabled and revisit this issue

configure: error: Cannot find enchant
$ yum install enchant.x86_64 enchant-devel.x86_64 enchant-aspell.x86_64

configure: error: Cannot find MySQL header files under /usr.
Note that the MySQL client library is not bundled anymore!
fix:
$ yum install mysql-libs.x86_64 mysql-devel.x86_64

configure: error: mysql configure failed. Please check config.log for more information.
conftest.c:36: undefined reference to `pthread_mutexattr_init’
conftest.c:37: undefined reference to `pthread_create’
fix:
This issue is similar the issue above. however in our case, we are using mysql.com latest mysql 5.6.22 RPM and there are something broken in
our env. and our fix is to build php 5.4.36 with the yum mysql client lib and dev lib.

configure: error: Cannot find libpq-fe.h. Please specify correct PostgreSQL installation path
$ yum install postgresql-libs.x86_64 postgresql-devel.x86_64

checking for sqlite3 files in default path… not found
configure: error: Please reinstall the sqlite3 distribution
$ yum install sqlite-devel.x86_64

configure: error: Could not find net-snmp-config binary. Please check your net-snmp installation.
$ yum install net-snmp-devel.x86_64 net-snmp-libs.x86_64

configure: error: Please install pecl/raphf and activate extension=raphf.so in your php.ini
$ yum install php-pecl-raphf-devel.x86_64 php-pecl-propro-devel.x86_64
still can not compile. we may have to leave pecl_http for later using pecl?

configure: WARNING: unrecognized options: –enable-magic-quotes, –with-sqlite
fix: these are no longer valid for php 5.4+, just remove these options.

ext/pecl_http/config.m4:5: warning: file `config9.m4′ included several times
fix: rename it to “http” which is the official ext name, though the downloaded ext file name is pecl_http

4 thoughts on “ Common php compile errors and the corresponding missing lib ”

Thanks for your personal marvelous posting! I definitely enjoyed reading it, you are a great author.I will make sure to bookmark your blog and will eventually come back down the road. I want to encourage one to continue your great writing, have a nice evening!

hello
cool stuff

Nice Blog, thanks for sharing this kind of information.

Источник

Русские Блоги

configure: error: Cannot find ldap.h

CentOS release 7.3 (Final)

Об ошибке сообщалось во время компиляции LNMP и установки PHP:

configure: error: Cannot find ldap.h

configure: error: Cannot find ldap libraries in /usr/lib

Интеллектуальная рекомендация

IView CDN Загрузка значка шрифта нормальная, а значок шрифта не может быть загружен при локальной загрузке JS и CSS

Используйте iview, чтобы сделать небольшой инструмент. Чтобы не затронуть другие платформы, загрузите JS и CSS CDN на локальные ссылки. В результате значок шрифта не может быть загружен. Просмо.

Критическое: ошибка настройки прослушивателя приложения класса org.springframework.web.context.ContextLoaderLis

1 Обзор Серверная программа, которая обычно запускалась раньше, открылась сегодня, и неожиданно появилась эта ошибка. Интуитивно понятно, что не хватает связанных с Spring пакетов, но после удаления п.

1086 Не скажу (15 баллов)

При выполнении домашнего задания друг, сидящий рядом с ним, спросил вас: «Сколько будет пять умножить на семь?» Вы должны вежливо улыбнуться и сказать ему: «Пятьдесят три». Это.

Pandas применяют параллельный процесс приложения, многоядерная скорость очистки данных

В конкурсе Algorith Algorith Algorith Algorith Algorith 2019 года используется многофункциональная уборка номера ускорения. Будет использовать панды. Но сама панда, кажется, не имеет механизма для мно.

PureMVC Learning (Tucao) Примечания

Справочная статья:Введение подробного PrueMVC Использованная литература:Дело UnityPureMvc Основная цель этой статьи состоит в том, чтобы организовать соответствующие ресурсы о PureMVC. Что касается Pu.

Источник

Linux System Administration

Some PHP compilation errors you may encounter while configuring PHP and their fixes:

checking for BZip2 support… yes
checking for BZip2 in default path… not found
configure: error: Please reinstall the BZip2 distribution

Fix:
yum install bzip2-devel

checking for cURL support… yes
checking if we should use cURL for url streams… no
checking for cURL in default path… not found
configure: error: Please reinstall the libcurl distribution –
easy.h should be in /include/curl/

Fix:
yum install curl-devel

checking for curl_multi_strerror in -lcurl… yes
checking for QDBM support… no
checking for GDBM support… no
checking for NDBM support… no
configure: error: DBA: Could not find necessary header file(s).

Fix:
yum install db4-devel

checking for fabsf… yes
checking for floorf… yes
configure: error: jpeglib.h not found.

checking for fabsf… yes
checking for floorf… yes
checking for jpeg_read_header in -ljpeg… yes
configure: error: png.h not found.

Fix:
yum install libpng-devel

checking for png_write_image in -lpng… yes
If configure fails try –with-xpm-dir=

configure: error: freetype.h not found.
Fix: Reconfigure your PHP with the following option.
–with-xpm-dir=/usr

===================================

checking for png_write_image in -lpng… yes
configure: error: libXpm.(a|so) not found.

Fix:
yum install libXpm-devel

checking for bind_textdomain_codeset in -lc… yes
checking for GNU MP support… yes
configure: error: Unable to locate gmp.h

Fix:
yum install gmp-devel

checking for utf8_mime2text signature… new
checking for U8T_DECOMPOSE…
configure: error: utf8_mime2text() has new signature, but U8T_CANONICAL is missing. This should not happen. Check config.log for additional information.

Fix:
yum install libc-client-devel

checking for LDAP support… yes, shared
checking for LDAP Cyrus SASL support… yes
configure: error: Cannot find ldap.h

Fix:
yum install openldap-devel

checking for mysql_set_character_set in -lmysqlclient… yes
checking for mysql_stmt_next_result in -lmysqlclient… no
checking for Oracle Database OCI8 support… no
checking for unixODBC support… configure: error: ODBC header file ‘/usr/include/sqlext.h’ not found!

Fix:
yum install unixODBC-devel

checking for PostgreSQL support for PDO… yes, shared
checking for pg_config… not found
configure: error: Cannot find libpq-fe.h. Please specify correct PostgreSQL installation path

Fix:
yum install postgresql-devel

checking for sqlite 3 support for PDO… yes, shared
checking for PDO includes… (cached) /usr/local/src/php-5.3.7/ext
checking for sqlite3 files in default path… not found
configure: error: Please reinstall the sqlite3 distribution

Fix:
yum install sqlite-devel

checking for utsname.domainname… yes
checking for PSPELL support… yes
configure: error: Cannot find pspell

Fix:
yum install aspell-devel

checking whether to enable UCD SNMP hack… yes
checking for default_store.h… no

checking for kstat_read in -lkstat… no
checking for snmp_parse_oid in -lsnmp… no
checking for init_snmp in -lsnmp… no
configure: error: SNMP sanity check failed. Please check config.log for more information.

Fix:
yum install net-snmp-devel

checking whether to enable XMLWriter support… yes, shared
checking for xml2-config path… (cached) /usr/bin/xml2-config
checking whether libxml build works… (cached) yes
checking for XSL support… yes, shared
configure: error: xslt-config not found. Please reinstall the libxslt >= 1.1.0 distribution

Fix:
yum install libxslt-devel

configure: error: xml2-config not found. Please check your libxml2 installation.

Fix:
yum install libxml2-devel

checking for PCRE headers location… configure: error: Could not find pcre.h in /usr

Fix:
yum install pcre-devel

libtool: link: cannot find the library `/usr/lib/libidn.la’ or unhandled argument `/usr/lib/libidn.la’
make: *** [sapi/cgi/php-cgi] Error 1

Fix:
cd /usr/src/
wget http://ftp.gnu.org/gnu/libidn/libidn-1.26.tar.gz
tar -zvxf libidn-1.26.tar.gz
cd libidn-1.26
./configure
make
make install
ln -s /usr/local/lib/libidn.la /usr/lib/libidn.la

libtool: link: `/usr/lib/libxml2.la’ is not a valid libtool archive
make: *** [ext/xsl/xsl.la] Error 1

Fix:
cd /usr/src/
wget ftp://xmlsoft.org/libxml2/libxml2-2.7.3.tar.gz
tar -zvxf libxml2-2.7.3.tar.gz
cd libxml2-2.7.3
./configure –prefix=/usr
make
make install

================================
configure: error: Your t1lib distribution is not installed correctly. Please reinstall it.

yum install t1lib-devel.x86_64
==================================
configure: error: mcrypt.h not found. Please reinstall libmcrypt.

yum install libmcrypt-devel.x86_64
=================================
configure: error: Cannot find libtidy

Fix:
yum install libtidy libtidy-devel

Источник

An almost complete list:

RUN apt update
RUN apt upgrade -y
RUN apt install -y apt-utils
RUN a2enmod rewrite
RUN apt install -y libmcrypt-dev
RUN docker-php-ext-install mcrypt
RUN apt install -y libicu-dev
RUN docker-php-ext-install -j$(nproc) intl
RUN apt-get install -y libfreetype6-dev libjpeg62-turbo-dev libpng12-dev
RUN docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ 
RUN docker-php-ext-install -j$(nproc) gd    
RUN apt install -y php-apc    
RUN apt install -y libxml2-dev 
RUN apt install -y libldb-dev
RUN apt install -y libldap2-dev 
RUN apt install -y libxml2-dev
RUN apt install -y libssl-dev
RUN apt install -y libxslt-dev
RUN apt install -y libpq-dev
RUN apt install -y postgresql-client
RUN apt install -y mysql-client 
RUN apt install -y libsqlite3-dev
RUN apt install -y libsqlite3-0
RUN apt install -y libc-client-dev
RUN apt install -y libkrb5-dev
RUN apt install -y curl
RUN apt install -y libcurl3
RUN apt install -y libcurl3-dev
RUN apt install -y firebird-dev
RUN apt-get install -y libpspell-dev
RUN apt-get install -y aspell-en
RUN apt-get install -y aspell-de  
RUN apt install -y libtidy-dev
RUN apt install -y libsnmp-dev
RUN apt install -y librecode0
RUN apt install -y librecode-dev
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/bin/ --filename=composer
#RUN pecl install apc
RUN docker-php-ext-install opcache
RUN yes | pecl install xdebug 
    && echo "zend_extension=$(find /usr/local/lib/php/extensions/ -name xdebug.so)" > /usr/local/etc/php/conf.d/xdebug.ini 
    && echo "xdebug.remote_enable=on" >> /usr/local/etc/php/conf.d/xdebug.ini 
    && echo "xdebug.remote_autostart=off" >> /usr/local/etc/php/conf.d/xdebug.ini
RUN docker-php-ext-install soap
RUN docker-php-ext-install ftp
RUN docker-php-ext-install xsl
RUN docker-php-ext-install bcmath
RUN docker-php-ext-install calendar
RUN docker-php-ext-install ctype
RUN docker-php-ext-install dba
RUN docker-php-ext-install dom
RUN docker-php-ext-install zip
RUN docker-php-ext-install session
RUN docker-php-ext-configure ldap --with-libdir=lib/x86_64-linux-gnu
RUN docker-php-ext-install ldap
RUN docker-php-ext-install json
RUN docker-php-ext-install hash
RUN docker-php-ext-install sockets
RUN docker-php-ext-install pdo
RUN docker-php-ext-install mbstring
RUN docker-php-ext-install tokenizer
RUN docker-php-ext-install pgsql
RUN docker-php-ext-install pdo_pgsql
RUN docker-php-ext-install pdo_mysql 
RUN docker-php-ext-install pdo_sqlite
RUN docker-php-ext-install intl
RUN docker-php-ext-install mcrypt
RUN docker-php-ext-install mysqli
RUN docker-php-ext-configure imap --with-kerberos --with-imap-ssl
RUN docker-php-ext-install imap
RUN docker-php-ext-install gd
RUN docker-php-ext-install curl
RUN docker-php-ext-install exif
RUN docker-php-ext-install fileinfo
RUN docker-php-ext-install gettext
#RUN apt install -y libgmp-dev # idk
#RUN docker-php-ext-install gmp # idk
RUN docker-php-ext-install iconv
RUN docker-php-ext-install interbase
RUN docker-php-ext-install pdo_firebird
RUN docker-php-ext-install opcache
#RUN docker-php-ext-install oci8 # idk
#RUN docker-php-ext-install odbc # idk
RUN docker-php-ext-install pcntl
#RUN apt install -y freetds-dev # idk
#RUN docker-php-ext-install pdo_dblib  # idk
#RUN docker-php-ext-install pdo_oci # idk
#RUN docker-php-ext-install pdo_odbc # idk
RUN docker-php-ext-install phar
RUN docker-php-ext-install posix
RUN docker-php-ext-install pspell
#RUN apt install -y libreadline-dev # idk
#RUN docker-php-ext-install readline # idk
RUN docker-php-ext-install recode
RUN docker-php-ext-install shmop
RUN docker-php-ext-install simplexml
RUN docker-php-ext-install snmp
RUN docker-php-ext-install sysvmsg
RUN docker-php-ext-install sysvsem
RUN docker-php-ext-install sysvshm
RUN docker-php-ext-install tidy
RUN docker-php-ext-install wddx
RUN docker-php-ext-install xml
#RUN apt install -y libxml2-dev # idk
#RUN docker-php-ext-install xmlreader # idk
RUN docker-php-ext-install xmlrpc
RUN docker-php-ext-install xmlwriter             
# idk bz2 enchant 

Off topic, but another tip:

If you, like me, need to run ie a framework and want to access your source directory from within your host system (lets say in your IDE for dev purposes), add this in your Dockerfile:
RUN useradd user
Then, you will need to add a config file for your Apache. My preferred way of doing this is mounting it. Anyway, the directory is /etc/apache2/conf-enabled.
In your config you need to add:

Of course, you will need to replace user with your local user.

Maybe someone can figure out a way to make those missing extensions work.

На системе Linux Mint 20 с ядром 5.8.0, пробуем собрать PHP 7.4 с поддержкой протокола LDAP, для этого добавляем к вызову конфигурационного скрипта (./configure) опцию:


--with-ldap

Если после этого ваш скрипт падает и вы получаете ошибку:


configure: error: Cannot find ldap.h

Необходимо выполнить установку OpenLDAP development libraries:


sudo apt install libldap2-dev

После успешной установки библиотек OpenLDAP вновь запускаем конфигурационный скрипт и доводим сборку PHP до финальной установки, в результате получаем желаемый результат

PHP 7.4 с LDAP

Обязательные поля помечены *

807 votes

4 answers

Get the solution ↓↓↓

any idea how can i install the php Ldap extension in dockerfile

FROM php:7.2-fpm-alpine

i tried the following

RUN docker-php-ext-configure ldap --prefix=/usr/local/php --with-ldap=/usr/lib/i386-linux-gnu
RUN docker-php-ext-install ldap

but when i build docker , i get the error message

configure: error: Cannot find ldap.h

ERROR: Service ‘php’ failed to build: The command ‘/bin/sh -c docker-php-ext-install ldap’ returned a non-zero code: 1

PS: it is alpine so ‘apt-get’ wont work here, instead ‘apk add’

2021-11-1

Write your answer


998

votes

Answer

Solution:

If you are experiencing configure: error: Cannot find ldap.h
try to add this line in your Alpine based Dockerfile

RUN apk add ldb-dev libldap openldap-dev


130

votes

Answer

Solution:

This is working for me:

FROM php:7.4.9-fpm-alpine3.12
        
COPY --from=mlocati/php-extension-installer /usr/bin/install-php-extensions /usr/bin/

# Install PHP extensions
RUN install-php-extensions ldap


703

votes


561

votes

Answer

Solution:

fixed with the following dockerfile :

FROM php:7.2-fpm-alpine

# Install composer
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer

# lumen packages
RUN apk add openldap-back-mdb
RUN apk add --update --virtual .build-deps autoconf g++ make zlib-dev curl-dev libidn2-dev libevent-dev icu-dev libidn-dev openldap libxml2-dev

RUN docker-php-ext-install intl soap
RUN docker-php-ext-install mbstring tokenizer mysqli pdo_mysql json hash iconv
RUN apk --update --no-cache add php7-ldap libldap php-ldap  openldap-clients openldap openldap-back-mdb

RUN apk add --no-cache ldb-dev
RUN ln -s /usr/lib/x86_64-linux-gnu/libldap.so /usr/lib/libldap.so 
&& ln -s /usr/lib/x86_64-linux-gnu/liblber.so /usr/lib/liblber.so
#RUN docker-php-ext-configure ldap --prefix=/usr/local/php --with-ldap=/usr/lib/libldap.so
#RUN docker-php-ext-install ldap
ARG DOCKER_PHP_ENABLE_LDAP

RUN echo -n "With ldap support:          " ; if [[ "${DOCKER_PHP_ENABLE_LDAP}" = "on" ]] ;      then echo "Yes"; else echo "No" ; fi && 
    if [ -z ${DOCKER_USER_UID+x} ]; then echo "DOCKER_USER_UID is unset"; DOCKER_USER_UID=1000; else echo "DOCKER_USER_UID is set to '$DOCKER_USER_UID'"; fi && 
    if [ -z ${DOCKER_USER_GID+x} ]; then echo "DOCKER_USER_GID is unset"; DOCKER_USER_GID=1000; else echo "DOCKER_USER_GID is set to '$DOCKER_USER_GID'"; fi

# Enable LDAP
RUN if [ "${DOCKER_PHP_ENABLE_LDAP}" != "off" ]; then 
      # Dependancy for ldap 
      apk add --update --no-cache 
          libldap && 
      # Build dependancy for ldap 
      apk add --update --no-cache --virtual .docker-php-ldap-dependancies 
          openldap-dev && 
      docker-php-ext-configure ldap && 
      docker-php-ext-install ldap && 
      apk del .docker-php-ldap-dependancies && 
      php -m; 
    else 
      echo "Skip ldap support"; 
    fi




RUN pecl install raphf propro
RUN docker-php-ext-enable raphf propro
RUN pecl install pecl_http
RUN echo -e "extension=raphf.sonextension=propro.sonextension=iconv.sonextension=http.so" > /usr/local/etc/php/conf.d/docker-php-ext-http.ini
RUN rm -rf /usr/local/etc/php/conf.d/docker-php-ext-raphf.ini
RUN rm -rf /usr/local/etc/php/conf.d/docker-php-ext-propro.ini
RUN rm -rf /tmp/*


COPY ./app /var/www/html/

RUN chown -R www-data:www-data /var/www/html/
RUN chmod -R 755 /var/www/html/

WORKDIR /var/www/html/
RUN composer install


Share solution ↓

Additional Information:

Date the issue was resolved:

2021-11-1

Link To Source

Link To Answer
People are also looking for solutions of the problem: a non-numeric value encountered in

Didn’t find the answer?

Our community is visited by hundreds of web development professionals every day. Ask your question and get a quick answer for free.


Similar questions

Find the answer in similar questions on our website.

Bug #62003 LDAP compile failure
Submitted: 2012-05-11 10:42 UTC Modified: 2013-10-01 15:05 UTC
Votes: 4
Avg. Score: 4.5 ± 0.5
Reproduced: 4 of 4 (100.0%)
Same Version: 2 (50.0%)
Same OS: 4 (100.0%)
From: aconnor at ait dot ie Assigned: mike (profile)
Status: Closed Package: Compile Failure
PHP Version: 5.4.3 OS: Ubuntu server 12.04
Private report: No CVE-ID: None

 [2012-05-11 10:42 UTC] aconnor at ait dot ie

Description:
------------
I am trying configure php 5.4.3 from source on a ubuntu 12.04 server build using this switch --with-ldap=/usr i get this error:

configure: error: Cannot find ldap libraries in /usr/lib.

So i change to --with-ldap=/usr/lib
Then i get this error:

configure: error: Cannot find ldap.h

So i find ldap.h in /usr/include

I created a sym link for the /include directory in the /usr/lib directory, so the config might see ldap.h.

I have tried ln -s /usr/include/ /usr/lib and 
ln -s /usr/include/ldap.h /usr/lib/ but i still get the same error.


also:
Permissions on the directory /usr/lib: drwxr-xr-x 53 root root 4096 May 11 09:06 lib

I chmod 777 the ldap.h file.

Then ran ln -s /usr/include/ldap.h /usr/lib/ i also tried 
ln -s /usr/include/ldap.h .

Both create the link it appears as : lrwxrwxrwx 1 root root 19 May 11 09:00 ldap.h -> /usr/include/ldap.h

But still the same error


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports

 [2012-06-28 13:41 UTC] macolinovo at gmail dot com

I'm also with same problem

 [2012-12-05 14:15 UTC] fernando dot wendt at gmail dot com

When compiling PHP 5.4.9, trying to enable both oci8 (instantclient, 11.2) and 
ldap modules, it points the same issue, and fails. The little bit diff is that 
once you point --with-ldap, it seems to compile it, but - by a misunderstood 
behavior, it uses the ldap.h from instantclient sdk file! Of course, make fails.

Reading at OTN forum, theres is a thread where some people does not recommend 
compiling them togheter: the suggest is to compile PHP with ldap, and install 
oci8 with PECL, after [https://forums.oracle.com/forums/thread.jspa?
messageID=10319335]. 

Works to me: i was needing ldap at first. oci8, will be added after.

Best regards

 [2013-10-01 14:15 UTC] mike@php.net

-Status: Open
+Status: Feedback

 [2013-10-01 14:15 UTC] mike@php.net

See bug #61450 -- a fix is in the works.
I'm inclined to mark this as duplicate.

@aconnor: Were you trying to build ldap and oci8 at the same time, too?

 [2013-10-01 14:33 UTC] aconnor at ait dot ie

-Status: Feedback
+Status: Open

 [2013-10-01 14:33 UTC] aconnor at ait dot ie

Hi Mike,

At the time I wasn't trying to build with oci8 at the time.
I eventually got around this error after alot of trial and error I found then 
solution in a different version of ldap. I was trying to compile with openldap-
stable-20120311 (2.4.30), I downloaded and compiled openldap-2.4.31 and this 
allowed me to compile php 5.4.3. I now have multiple successful ldap connections 
running on the front end of our server.
Sorry I didn't post these comments earlier, I didn't realise others were having 
a similar issue.

This was my solution but it only be a work-around as there could be a bug. 

Regards,
Anthony

 [2013-10-01 15:05 UTC] mike@php.net

-Status: Open
+Status: Closed
-Assigned To:
+Assigned To: mike

 [2013-10-01 15:05 UTC] mike@php.net

Ok, we'll suppose it's fixed then.

Понравилась статья? Поделить с друзьями:
  • Connection attempt failed with error 10060 proxifier
  • Connecting to the guest os via vix error mlocate was not found
  • Connecting to the guest os via ssh error mlocate was not found
  • Connecting to server error could not connect to server
  • Connecting to remote server failed with the following error message the client cannot connect to