In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/03 Report--
This article mainly explains "how to install php ldap in centos". Interested friends may wish to have a look at it. The method introduced in this paper is simple, fast and practical. Let's let the editor take you to learn how to install php ldap in centos.
Centos install php ldap method: 1, execute the "yum install PHP-ldap" command; 2, open the ldap extension in php.ini; 3, restart Apache2.
This article operating environment: centOS6.8 system, PHP7.0 version, DELL G3 computer
Install PHP ldap extension under Centos
There are two ways to install PHP ldap extension under Centos, for reference only.
I. online installation
Execute the following command:
one
Yum install PHP-ldap
Possible problems:
Error: php70w-common-.. Conflicts with php-common-5.4.... It means version conflict.
Solution:
View the version of php:
one
Php-v
Search for ldap with a matching version:
one
Yum search ldap
Find a matching version installation (mine is php70w-ldap.x86-64)
Reinstall:
one
Yum install php70w-ldap.x86-64
I will lose a y halfway to make sure.
Then open the ldap extension in php.ini:
one
two
Vi / usr/local/php/lib/php.ini
Extension=ldap.so
Complete, restart Apache2:service httpd restart.
one
two
three
/ usr/local/apache/bin/httpd-k restart
/ / or this command
Service httpd restart
When you are finished, look at the info.php page and there will be a module for ldap, which will display enabled.
one
two
three
four
five
six
seven
eight
nine
ten
Ldap
LDAP Support enabled
RCS Version $Id: 109508bbbecf73ca923b37138cbac56802f1231b $
Total Links 0/unlimited
API Version 3001
Vendor Name OpenLDAP
Vendor Version 20440
SASL Support Enabled
Directive Local Value Master Value
Ldap.max_links Unlimited Unlimited
II. Compilation and installation
For LDAP installation, you have to install it first.
Check to see if the following is installed, if not:
Check:
one
two
Yum list openldap
Yum list openldap-devel
Installation:
one
two
# yum install openldap
# yum install openldap-devel
Be sure to carry out this command:
one
# cp-frp / usr/lib64/libldap* / usr/lib/
Go to the installation directory
one
# cd / root/lnmp1.0-full/php-5.2.17/ext/ldap
(if you don't know the installation directory, you can use find-name "php-*" to find the directory of the corresponding version you installed.)
Then run
one
two
three
four
five
six
seven
eight
nine
# / usr/local/php/bin/phpize
Configuring for:
PHP Api Version: 20090626
Zend Module Api No: 20090626
Zend Extension Api No: 220090626
#. / configure-with-php-config=/usr/local/php/bin/php-config-with-ldap
# make
# make install
Installing shared extensions: / usr/local/php/lib/php/extensions/no-debug-non-zts-20131226/
To generate such an extension, we go to that directory and place ldap.so in the extensions directory:
one
two
three
four
five
six
seven
eight
nine
ten
eleven
twelve
thirteen
fourteen
[root@openldap ldap] # make install
Installing shared extensions: / usr/local/php/lib/php/extensions/no-debug-non-zts-20131226/
[root@openldap ldap] # cd / usr/local/php/lib/php/extensions/no-debug-non-zts-20131226/
[root@openldap no-debug-non-zts-20131226] # ls-l
Total 748
-rwxr-xr-x 1 root root 173086 Jul 16 16:05 ldap.so
-rwxr-xr-x 1 root root 586024 Jul 16 12:04 opcache.so
[root@openldap no-debug-non-zts-20131226] # cp ldap.so / usr/local/php/lib/php/extensions/ldap.so
[root@openldap no-debug-non-zts-20131226] # cd..
[root@openldap extensions] # ls-l
Total 176
-rwxr-xr-x 1 root root 173086 Jul 16 16:08 ldap.so
Drwxr-xr-x 2 root root 4096 Jul 16 16:05 no-debug-non-zts-20131226
[root@openldap extensions] #
Modify vi / usr/local/php/etc/php.ini (your php configuration file, not necessarily this directory, can be viewed on the info.php page)
Add:
one
Extension=ldap.so
Restart apache
one
two
three
/ usr/local/apache/bin/httpd-k restart
/ / or this command
Service httpd restart
At this point, I believe you have a deeper understanding of "centos how to install php ldap". You might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.