[Webinar] Streamline your web hosting managementRegister Today

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 351
  • Last Modified:

Having apache recognize new php install

I am working on an Red Hat Enterprise Linux 5.x (but I do not have a license with Red Hat, so I cannot use 'yum'). I installed a new version of php on the server, but apache is still using the old version (without the features enabled that I need). How do I get apache to recognize the new php build? Do I rebuild apache? If so, how do i rebuild apache non-destructively in order to retain all of my current servers settings and files?
2 Solutions
Did you try simply restarting apache yet?
Did you compile php with --with-apxs2=/usr/local/apache2/bin/apxs

You can also try Zend Core as complete uptodate php-distribution with latest php and apache http://www.zend.com/products/core/
mcorsi62Author Commented:
red hat enterprise linux 5.x does not have the file /usr/local/apache2/bin/apxs . It does not have any file anywhere named apxs. I am running apache 2.2.3 . How do I reinstall php (from source file NOT rpm or yum) and link it into apache?
You can only recompile php fpr apache if you have apxs[2] available. install the -devel package of the webserver or better remove apache from RHE and install Zend Corewith it's apache
By installing  the httpd-devel rpm apxs will be available.

To install the php new version
1 . download the php source from the php.net site.
2. install all the development tools like gcc, automake etc
3. untar the php source .
4. get in to the PHP source folder (by cd php<ver>)
5. type command ./configure , make, make install
6. it will install every properly.
7. enjoy new php version.

Note if got any compilation error post here for the solution or just search on google. it may be like development rpm are missing.

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now