answersLogoWhite

0


Best Answer

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
This answer is:
User Avatar
More answers
User Avatar

Wiki User

12y ago

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.

This answer is:
User Avatar

User Avatar

Wiki User

13y ago
  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
This answer is:
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
Related questions

Does Apache support PHP?

Yes, Apache Tomcat supports the installation and usage of PHP (of any version below 5, not including 5). See the related links for an official Tomcat-PHP installation guide.


How do you run php programs?

You need to install PHP either on a pre built apache server such as xampp or download PHP directly from the website.


Does you need any software to execute php files?

To execute PHP files, you will need a webserver (Apache) and a compiler (PHP4 or PHP5) . You may refer to Apache official website on how to install Apache on a Windows-based machine


Does php run in Windows 7?

Php can run on windows 7, but it does not run directly on it. PHP is a server side-language that runs on Apache. So in order to use PHP on windows 7, you need to install Apache on it. You can do this by installing WAMP server on your windows 7 machine. PHP will automatically be available to you once installed.


Is it possible to install wamp server without php?

The principle of WAMP/LAMP server is that MySQL, Apache and PHP are staked in a neat package easy to install. However, it is easy to install only the components you need separately.


How do you install PHP on a memory stick?

You can install an entire web server on your flash drive with XAMPP Portable. http://portableapps.com/apps/development/xampp You will need an entire server (at least Apache and PHP) if you want to execute PHP scripts.


Difference between apache and PHP?

Apache is a web server. PHP is a scripting language.


Why can't install php on vista?

There is a problem with the installer and vista. To install Apache, MySQL or PHP you must disable User Account Controller, install the program(s) restart the computer and enable UAC. This is the only way to install those software and other ones, not listed here.


How do you run php file?

Either you could download latest version of php, mysql & apache server or better you just need to install xampp. Versions of it are available for all OS


What is a good server for PHP language?

The best server yet for php serving is Apache, as PHP and Apache work closely together. The MySQL community database is a good server for PHP applications, this is why we talk about w/xamp servers, Windows/Linux Apache MySQL PHP servers.


How do you install PHP on a Mac?

First install a webserver such as apache.Then download and unpack the PHP source for Unix/Linux.Open apache's httpd.conf and enable the PHP5 module and specify the location of PHP. There should be sample lines to uncomment within this file


What line is added to the Apache configuration file to ensure that PHP extensions are recognized?

Adding the following lines to the Apache 2.x configuration file will associate .php files with PHP, given the PHP 5 module (DLL file) is also loaded through the configuration: <FilesMatch \.php$> SetHandler application/x-httpd-php </FilesMatch>