answersLogoWhite

0

The specific order of program installation does matter here.

PHP makes certain configuration changes to Apache's httpd.conf to enable support for PHP files.

If you install Apache after PHP, then those changes will not take place.

To add such support, either re-install PHP, or edit httpd.conf manually.

User Avatar

Wiki User

16y ago

Still curious? Ask our experts.

Chat with our AI personalities

RossRoss
Every question is just a happy little opportunity.
Chat with Ross
CoachCoach
Success isn't just about winning—it's about vision, patience, and playing the long game.
Chat with Coach
ReneRene
Change my mind. I dare you.
Chat with Rene
More answers

It depends.

If your Linux distro supports packages like RPM, DEB or others, I suggest you to search the distro specific package and install it with the tool that the distro offers.

If you want to build it from source, or you don't have a package based distro do the following:

1) Download the package from the site php.net

2) From the terminal/bash console move into the folder where you downloaded the file

3) Decompress it, by typing: "tar -xvf nameofthefile.tar.gz"

4) Enter the folder you've just created by decompression "CD nameofthefile"

5) Do a configure procedure "./configure" to view configure options type "./configure --help"

6) Do a make procedure "make"

7) Finally a make install "make install"

8) Now you're ready, test your installation by type something like "php -v" and if you don't see errors all is fine.

User Avatar

Wiki User

13y ago
User Avatar

  1. Verify that the extension file (.dll in windows, .so in unix/linux/mac) is in the ext directory within the PHP installation directory.
  2. Open the apache configuration file, conf/httpd.conf in the apache installation directory, and find the section for enabled modules. Most modules are commented by default. Remove the "#" at the beginning of the to enable it.
  3. Restart apache
User Avatar

Wiki User

14y ago
User Avatar

Add your answer:

Earn +20 pts
Q: How do you install Apache 2 and PHP?
Write your answer...
Submit
Still have questions?
magnify glass
imp