Difference between revisions of "PhpLDAPadmin"

From ArchWiki
Jump to: navigation, search
(config changes as phpldapadmin now install to /usr/share/webapps)
Line 58: Line 58:
 
</pre>
 
</pre>
  
phpldapadmin now installs to /usr/share/webapps.  This means there some changes to the configuration needed.
+
phpldapadmin now installs to /usr/share/webapps.  This means some changes to the configuration are required.
  
 
Copy the configuration file as follows:
 
Copy the configuration file as follows:

Revision as of 12:09, 22 May 2011

Template:I18n links start Template:I18n entry Template:I18n links end

Pre-Installation

See LAMP for a guide to setting up Apache, MySQL, and PHP.

Adding php-ldap

PHP needs the php-ldap extension to work with phpLDAPadmin

pacman -S php-ldap

then edit Template:Filename and uncomment the line

;extension=ldap.so

by removing the ";" so it will look like this

extension=ldap.so

Now add

:/srv/http/phpldapadmin/lib/

to the "open_basedir" line.

Installation

Simply do

pacman -S phpldapadmin

Configuration

phpLDAPadmin comes with a usable example configuration file, so lets use it

cp /srv/http/phpldapadmin/config/config.php.example /srv/http/phpldapadmin/config/config.php

Although not strictly neccessary you can edit Template:Filename and name your server with the line

$servers->setValue('server','name','the_name_you_want');

phpldapadmin now installs to /usr/share/webapps. This means some changes to the configuration are required.

Copy the configuration file as follows:

sudo cp /etc/webapps/phpldapadmin/apache.example.conf /etc/httpd/conf/extra/httpd-phpldapadmin.conf

It should look like this:

  Alias /phpldapadmin "/usr/share/webapps/phpldapadmin"
  <Directory "/usr/share/webapps/phpldapadmin">
    AllowOverride All
    Options FollowSymlinks
    Order allow,deny
    Allow from all
    php_admin_value open_basedir "/srv/:/tmp/:/usr/share/webapps/:/etc/webapps:/usr/share/pear/"
  </Directory>

Add the following lines to /etc/httpd/conf/httpd.conf:

# phpldapadmin configuration
Include conf/extra/httpd-phpldapadmin.conf

Edit /usr/share/webapps/phpldapadmin/.htaccess and comment out deny from all, otherwise you will receive a 403 access denied error. It should look like this:

#deny from all

Accessing your phpMyAdmin installation

Finally your phpLDAPadmin installation is complete. Before start using it you need to restart your apache server by following command:

# /etc/rc.d/httpd restart

You can access your phpLDAPadmin installation using the following url:

http://serverip/phpldapadmin
or
http://localhost/phpldapadmin

Note: 'localhost' is the hostname in your Template:Filename file.