Shahzad Fateh Ali
Shahzad Fateh Ali

Reputation: 724

Recompile and reinstalling php

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?

Upvotes: 0

Views: 762

Answers (2)

Jaime
Jaime

Reputation: 6091

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

Upvotes: 0

Macmade
Macmade

Reputation: 53960

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

Upvotes: 1

Related Questions