Source code when installing zabbix3.2.7 PHP LDAP Warning

Source: Internet
Author: User
Tags bz2 ldap zts zend



The problem is as follows:






Workaround:


1, first check the source code installed PHP module whether there is ldap.so
[[email protected] ldap] # ll/usr/local/PHP/lib/PHP/extensions/no - debug - non - ZTS - 20160303 /
Total 1576
Rwxr-xr-x 1 root root root 129484 Aug 22 10:18 ldap. So # warning because this module does not exist, need to compile to generate this module and reload
-rwxr-xr-x 1 root root 1430846 Aug 21 19:38 opcache.so
[[email protected] ldap] #




2, how to have ldap.so in this machine, only need to add extension=ldap.so in php.ini file
   864 ; Dynamic Extensions ;
    865 ;;;;;;;;;;;;;;;;;;;;;;
    866 
    867 ; If you wish to have an extension loaded automatically, use the following
    868 ; syntax:
    869     extension=ldap.so          #the new content
    870 ;   
    871 ;   extension=modulename.extension
    872 ; 
    873 ; For example, on Windows:
    874 ;   
    875 ;   extension=msql.dll
    876 ; 
    877 ; ... or under UNIX:
    878 ;   
    879 ;   extension=msql.so
    880 ; 
    881 ; ... or with a path:
    882 ;   
    883 ;   extension=/path/to/extension/msql.so
    884 ; 




3, if the corresponding module does not exist


3.1 Download the corresponding PHP version of the source code to the main directory, the source code compiled LDAP module (emphasis, other modules if the missing compilation method)


 
 
[[email protected] ~]# tar jxvf php-7.1.7.tar.bz2 
[[email protected] ~]# ls
anaconda-ks.cfg                  install.log         lnmp-install.log  php-7.1.7.tar.bz2
databases_backup_20170821115223  install.log.syslog  php-7.1.7
[[email protected] ldap]# CD /root/php-7.1.7/ext/ldap/ # enter the source code location where the module resides
[[email protected] ldap] # ll
Total 144
-rw-rw-r-- 1 1000 1000 7374 Jul 6 17:30 config.m4
-rw-rw-r-- 1 1000 1000 1008 Jul 6 17:30 config.w32
-rw-rw-r-- 1 1000 1000 77 Jul 6 17:30 CREDITS
-rw-rw-r-- 1 1000 1000 102189 Jul 6 17:30 ldap
-rw-rw-r-- 1 1000 1000 4464 Jul 6 17:30 ldap. Mak
-rw-rw-r-- 1 1000 1000 1546 Jul 6 17:30 ldap_win32_howto.txt
-rw-rw-r-- 1 1000 1000 2315 Jul 6 17:30 php_ldap.h
Drwxrwxr-x 2 1000 1000 12288 Jul 6 17:30 tests
[[email protected] ldap] # / usr/local/PHP/bin/phpize # compile PHP extension tools, mainly based on the system information to generate the corresponding the configure file
You for:
PHP Api Version: 20160303
Zend Module Api No: 20160303
Zend Extension Api No: 320160303
[[email protected] ldap]#./configure --with-php-config= /usr/local/php-bin/php-config --with-ldap # compile
Checking for grep that handles long lines and -e... / bin/grep
Checking for egrep... / bin/grep - E
Checking for a sed that does not truncate output... / bin/sed
.

[[email protected] ldap
/bin/sh /root/php-7.1.7/ext/ldap/libtool --mode=compile cc-dldap_deprecated = 1-i-i /root/php-7.1.7/ext/ ldp-7.1.7 /ext/ ldap-dphp_atom_inc-i /root/ ldap/ include-i /root/php-7.1.7/ext/ldap/ ldap/main - - 7.1.7 I/root/PHP/ext/ldap - I/usr/local/PHP/include/PHP - I/usr/local/PHP/include/PHP/main - I/usr/local/PHP/include/PHP/TSRM - I/usr/local/PHP/include/PHP/Zend - I/usr/local/PHP/include/PHP/ext -i/usr/local/PHP/include/PHP/ext/date/lib - DHAVE_CONFIG_H - g - O2 - - 7.1.7 c/root/PHP/ext/ldap/ldap. C - o ldap. Lo
The mkdir. Libs
Cc - DLDAP_DEPRECATED = 1 - i. - - 7.1.7 I/root/PHP/ext/ldap DPHP_ATOM_INC - - 7.1.7 I/root/PHP/ext/ldap/include - - 7.1.7 I/root/PHP/ext/ldap/main - - 7.1.7 I/root/PHP/ext/ldap - I/usr/local/PHP/include/PHP -i/usr/local/PHP/include/PHP/main - I/usr/local/PHP/include/PHP/TSRM - I/usr/local/PHP/include/PHP/Zend - I/usr/local/PHP/include/PHP/ext - I/usr/local/PHP/include/PHP/ext/date/lib - DHAVE_CONFIG_H - g - O2 C /root/php-7.1.7/ext/ldap/ldap
- 7.1.7 / bin/sh/root/PHP/ext/ldap/libtool -- mode = link cc - 7.1.7 DPHP_ATOM_INC - I/root/PHP/ext/ldap/include - - 7.1.7 I/root/PHP/ext/ldap/main - - 7.1.7 I/root/PHP/ext/ldap - I/usr/local/PHP/include/PHP -i/usr/local/PHP/include/PHP/main - I/usr/local/PHP/include/PHP/TSRM - I/usr/local/PHP/include/PHP/Zend - I/usr/local/PHP/include/PHP/ext - I/usr/local/PHP/include/PHP/ext/date/lib - DHAVE_CONFIG_H - g La-export-dynamic-avoid -version -prefer- pic-module-rpath /root/php-7.1.7/ext/ldap/modules ldap.lo - llap-llber
Cc-shared.libs/ldap.o-llap-llber-wl, -soname-wl, ldap.so-o.libs /ldap.so
Creating an ldap. La
(CD. Libs && rm -f ldap. / ldap. La ldap. La)
/bin/sh /root/php-7.1.7/ext/ldap/libtool --mode=install cp. /ldap.la /root/php-7.1.7/ext/ldap/modules
Cp. / libs/ldap. So/root/PHP - 7.1.7 / ext/ldap/modules/ldap. So
Cp. / libs/ldap. Lai - 7.1.7 / root/PHP/ext/ldap/modules/ldap. La
PATH = "$PATH: / sbin" ldconfig - n - 7.1.7 / root/PHP/ext/ldap/modules
----------------------------------------------------------------------
Libraries have been installed in:
- 7.1.7 / root/PHP/ext/ldap/modules

If you ever happen to want to link against installed libraries
In a given directory, LIBDIR, you must either use libtool, and
Specify the full pathname of the library, or use the '-LLIBDIR'
Flag during linking and do at least one of the following:
-add LIBDIR to the 'LD_LIBRARY_PATH' environment variable
During execution
-add LIBDIR to the 'LD_RUN_PATH' environment variable
During linking
-use the '-wl,-- rpath-wl,LIBDIR' linker flag
- have your system administrator add LIBDIR to '/etc/ld.so. Conf'

See any operating system documentation about Shared libraries for details
More information, such as the ld(1) and ld.so(8) manual pages.
----------------------------------------------------------------------

The Build is complete.
Don't forget to run 'make test'.

Installing Shared extensions: / usr/local/PHP/lib/PHP/extensions/no - debug - non - ZTS - 20160303 / # make generating module is installed
[[email protected] ldap] #
[[email protected] PHP - 7.1.7] # ll/usr/local/PHP/lib/PHP/extensions/no - debug - non - ZTS - # 20160303 / confirm the ldap. So module
Total 1576
Rwxr-xr-x 1 root root 129484 Aug 22 10:18 ldap
-rwxr-xr-x 1 root root 1430846 Aug 21 19:38 opcache.so

[[email protected] PHP - 7.1.7] # vi/usr/local/PHP/etc/PHP. Ini # editing PHP. Ini, adding a new generation of ldap. So module

853 default_socket_timeout = 60
854
855; If your scripts have to deal with files from Macintosh systems,
856; Or you are running on a Mac and need to deal with files from
857; Unix or win32 systems, setting this flag will cause PHP to
858; Automatically detect the EOL character in those files so that
859; Fgets () and file() will work regardless of the source of the file.
860; http://php.net/auto-detect-line-endings
861; Auto_detect_line_endings = Off
862
863;;;;;;;;;;;;;;;;;;;;;;
864; The Dynamic Extensions.
865;;;;;;;;;;;;;;;;;;;;;;
866
867; If you wish to have an extension loaded automatically, use the following
868; Syntax:
869 extension=ldap.so # new module added
870;
871; The extension = modulename. The extension
872;
873; For example, on Windows:
874;
875; The extension = MSQL. DLL
876;
877; . Or under UNIX:
878;
879; The extension = MSQL. So
880;


[[email protected] php-7.1.7]# service HTTPD restart # restart HTTPD
Restart apache... The done

 




4, http://192.168.0.198/zabbix/setup.php again into the front-end installation found PHP LDAP module ok!! 5. Zabbix front Install "Check of pre-requisites" all OK














Source code when installing zabbix3.2.7 PHP LDAP Warning


Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.