0

I am running Fedora Core 10 with php 5.2.9 without ldap. Now i want to remove current php installation and recompile the latest version of php with ldap and install it.

How to do this?

  • Since I'm not familiar with Fedora and therefore can't provide a step by step solution this is only a comment, not an answer: Use the build system of the distribution, copy the existing rule file, modify it and build a new php package (or multiple). Otherwise (if you compile php "manually") the next update by the packet manager _might_ remove your changes. see http://fedoraproject.org/wiki/Koji – VolkerK Mar 12 '10 at 11:49

2 Answers2

1

Basically, download the sources from the PHP website. Then, from a terminal, type './configure --prefix=/usr/local/my_php_version' In the output, checks if it recognize your LDAP installation (and also the Apache one). If not, take a look at the configuration options to learn how to specify the paths. Something like '--with-openldap', '--with apxs', etc. You should also take a look at the configuration options to active the features you need. Once you're done, type 'make', then 'sudo make install'. Also take a look at the official install documentation: http://www.php.net/manual/en/install.unix.php

Macmade
  • 52,708
  • 13
  • 106
  • 123
0

Instead of re-compiling the PHP, you can add the LDAP support to the PHP you have installed.

You can install a variety of libraries and modules without recompiling PHP. To see the libraries that are available, you can execute

  yum search php-

To install LDAP for your PHP, you can execute

  yum install php-ldap

If you have PHP as an Apache module, you must restart the httpd to activate the changes

  service httpd restart
Jaime
  • 5,435
  • 2
  • 18
  • 21