# Accessing phpLDAPadmin on Apache-1 webserver problem

## reinier

When I try to access phpLDAPadmin asdescribed in https://forums.gentoo.org/viewtopic.php?p=791337#791337 at http://host/phpmyadmin/ I receive the error message:

"Your install of PHP appears to be missing LDAP support. Please install LDAP support before using phpLDAPadmin."

My PHP install works but my test.php (with <? phpinfo(); ?>) file shows:

Configure Command (table one, third row) 

'./configure' ........ '--without-ldap' ....... '--with-config-file-path=/etc/php/apache1-php4' 

I tried re-emerging apache/1.3.29, php and mod_php with the USE="ldap" command (also included in my /etc/make.conf file) but that didn't work.  I don't want to upgrade to apache-2 but it seems as though I can't change the apache-1 ebuild to support LDAP..?  Does anyone have any suggestions?  I would really like to modify my LDAP directories through a web-based interface.  If worst comes to worst, I'll have to install apache-2... I already tried that once and everything stopped working so I'd rather not do that... help!  :Rolling Eyes: 

----------

## mariourk

Apache2 moves the htdocs from /home/htdocs to /var/www/locahost/htdocs.

So after upgrading to apache2 you'll have to move everything from the old to the new location.

I think that is why everything stopped working after you upgraded to apache2.

Believe me, it took me a week to figure this out   :Very Happy: 

----------

## reinier

Such is life... I had to upgrade to apache-2 for the LDAP support...  I didn't have to move all my files over though (which saves me the hassle of trying to figure out how grant the other 'user'(s) access to /var/www/localhost/htdocs ...

Just in case anyone ever needs to do the same, the way I ended up being able to 'port' my settings is by changing the following in my /etc/apache2/conf/apache2.conf :

```
#Include conf/vhosts/vhosts.conf (edit this line out)

<VirtualHost yourIPaddress:*>

        ServerAdmin root@localhost

DocumentRoot /home/user/www

ServerName user

        ServerAlias user.com

<IfModule mod_dir.c> 

        DirectoryIndex index.html index.php

</IfModule> 

<IfModule mod_alias.c> 

        Alias / "/home/user/www/"

        Alias /webmail "/var/www/localhost/htdocs/squirrelmail/"

        Alias /adbook "/var/www/localhost/htdocs/phpldapadmin/"

</IfModule> 

<Directory /home/user/www> 

        Options FollowSymLinks +Includes 

        AllowOverride None 

        Allow from all 

</Directory> 

<Directory /var/www/localhost/htdocs/squirrelmail> 

        Options FollowSymLinks +Includes 

        AllowOverride None 

        Allow from all 

</Directory> 

<Directory /var/www/localhost/htdocs/phpldapadmin> 

        Options FollowSymLinks +Includes 

        AllowOverride None 

        Allow from all 

</Directory> 

</VirtualHost>
```

I then put two symlinks to ../htdocs/squirrelmail and ../htdocs/phpldapadmin in my /home/user/www directory named 'webmail' and 'adbook' and everything seems to work  :Smile: 

ps. of course chown those directories to your apache user:group if you haven't already done so

----------

