PDA

View Full Version : How to install PHP on Apache?



gilbertsavier
08-06-2009, 02:40 AM
Hi,
You need to add the following lines to httpd.conf (If you're using Apache for Win*2)

ScriptAlias /php/" c:/path-to-php-dir/"
AddType application/x-httpd-php .php
Action application/x-httpd-php "/php/php.exe"

Then restart Apache and it should interpret php files correctly.

For more information on installing Apache with php look at the following manual page:

thof222
09-03-2009, 05:16 AM
I&#82*7;ve had lots of people ask my in the past, how to install PHP, MySQL and Apache for Windows XP. I recently formated my computer, and since I was going to do it, I thought I&#82*7;d write out how to do this, for anyone who wants to know. My computer has SP2 installed.

Apache Web Server

Download Apache HTTP Server. I downloaded the current stable release, in this case: Apache 2.0.54. So download the Win*2 Binary (MSI Installer), double click it, let it install.
____________________________________

hasse222
10-01-2009, 04:41 AM
Installation of Apache, PHP and MySQL is straightforward for Windows computers.

Go to each of the Apache, PHP and MySQL sites to download the software. Select the appropriate ZIP file. Pick the versions that match your web server.

You will have to modify your ini and configuration files as described in the install READMEs, but you do not have to worry about DSO modules, compiling, etc. as discussed for Linux below. I have omitted detailed discussion of changes to local files because different versions of PHP, MySQL and Apache have different requirements.

Moonbat
10-09-2009, 12:46 PM
Just use WAMPserver (http://www.wampserver.com/en/) or XAMPP (http://sourceforge.net/projects/xampp/) which has everything pre-installed and ready to work.

bhavya
10-25-2009, 12:47 AM
Many web developers want to run Apache and PHP on their own computer since it allows them to easily test their scripts and programs before they put them "live" on the Internet. This article gives a step by step guide on how you can install and configure PHP5 to work together with the Apache HTTP Server on Windows. The procedure has been tested to work on both Windows XP and Vista.

If you have not already installed Apache on your machine, check out one of the guides listed below. This "How To" guide assumes that you have already completed installing Apache.

If you are using Apache *.*.x, see the guide How to Install the Apache Web Server *.x on Windows.

If you plan to use one of the Apache 2 or 2.2 web servers on Windows XP, see the tutorial How to Install and Configure Apache 2 on Windows instead.

If you are using Apache 2.2 on Windows Vista, please read How to Install Apache 2.2 on Windows Vista.
_____________________________________
lead generation marketing (http://www.wickedcoolpromoting.com/Lead-Generation-Marketing.html)
stacking tables and c****s (http://www.burgessfurniture.com/welcome.html)

jaanu07
11-11-2009, 11:12 PM
Steps to Setting Up PHP 5

*.
Download PHP 5

Before you begin, get a copy of PHP 5 from the PHP download page. In particular, download the zip package from the "Windows Binaries" section - that is, don't get the installer. For example, select the package labelled "PHP 5.2.5 zip package" if 5.2.5 is the current version.
2.
Install PHP 5

Create a folder on your hard disk for PHP. I s***est "c:\php" although you can use other names if you wish. Personally though, I prefer to avoid names with spaces in it, like "c:\Program Files\php" to avoid potential problems with programs that cannot handle such things. I will assume that you used c:\php in this tutorial.

Extract all the files from the zip package into that folder. To do that simply double-click the zip file to open it, and drag all the files and folders to c:\php.
*.
Upgraders: Remove the Old PHP.INI File from Your Windows Directory

If you are upgrading to PHP 5 from an older version, go to your windows directory, typically c:\windows, and delete any php.ini file that you have previously placed there.
4.
Configuring PHP

Go to the c:\php folder and make a copy of the file "php.ini-recommended". Name the new file "php.ini". That is, you should now have a file "c:\php\php.ini", identical in contents with "c:\php\php.ini-recommended".

Note: if you are using Apache *, you should either move the php.ini file to your windows directory, "C:\Windows" on most systems, or configure your PATH environment variable to include "c:\php". If you don't know how to do the latter, just move the php.ini file to the "c:\windows" folder. You do not have to do this if you are using Apache 2, since we will include a directive later in the Apache 2 configuration file to specify the location of the php.ini file.
______________________________________
Self Certification Mortgage Quote (http://www.self-cert-mortgage-centre.co.uk/self-certification-mortgage-quote.html)
legitimate home based business (http://www.nitromarketing.com/blog/)

trimy555
11-14-2009, 03:43 AM
Installation of Apache, PHP and MySQL is straightforward for Windows computers.

Go to each of the Apache, PHP and MySQL sites to download the software. Select the appropriate ZIP file. Pick the versions that match your web server.

You will have to modify your ini and configuration files as described in the install READMEs, but you do not have to worry about DSO modules, compiling, etc. as discussed for Linux below. I have omitted detailed discussion of changes to local files because different versions of PHP, MySQL and Apache have different requirements.

Most web sites are hosted on a web server that hosts many sites. In most cases your site will be hosted with standard PHP, MySQL, Apache configurations. On your localhost (your own computer), you should not deviate too far from the configuration of your web hosting server. Otherwise, you will find yourself in the common programmer situation of saying ”well it works on my machine.” (More help about this subject is in my web hosting for developers article.)

One of the great things about PHP and MySQL is many web hosting companies provide them at reasonable prices. So, install Apache, PHP and MySQL on your machine, write some code test it and upload it to a real web server for all the world to see.
____________________________________________________
dial up connection (http://www.ispcompared.com/high-speed.htm)
Site Design (http://www.dreamsight.co.uk)

saravanan
11-20-2009, 07:06 AM
This time i want to share with you how to install Curl in PHP5 in Linux Environtment (I&#82*7;m using Ubuntu 8.*0) and using apache web server, but if you have any question to install php-curl in other environment, feel free to contact me of leave any comment, i will glad to help you.

Okay, now let&#82*7;s start with check if php-curl is already installed in your server or not. To check it please follow this step:
*. Create a file in your web server (in Ubuntu it would be in /var/www folder), name it info.php
2. Open that file and type this command:
<?php phpinfo(); ?>

*. Save that file
4. Open your favorite browser and open that file (ex: http://localhost/info.php)
5. Now you will see the Information about your PHP installation
6. Search for Curl, and if you cannot find it, it mean your php doesn&#82*7;t have curl installed.
==============================
whack my boss (http://www.y*.com/search-results/**44*/whack-my-boss)
buy psp (http://www.gameathlon.com/playstation-portable.html)

RAMS123
11-28-2009, 02:29 AM
when running the ./configure command, redirect the error output to a file so you can figure out what's wrong. To do this, append "2> error.file" to the configure command, specifying the file to save the error log in.
=========================================
costume earrings (http://www.frippaccessories.co.uk/shop/earrings)
Breitling replica watches (http://www.thewatchprofessionals.com/replica-watch/breitling/*.html)

alaan222
11-30-2009, 04:01 AM
Installing apache is easy if you download the Microsoft Installer ( .msi ) package. Just double click on the icon to run the installation wizard. Click next until you see the Server Information window. You can enter localhost for both the Network Domain and Server Name. As for the administrator's email address you can enter anything you want.

I'm using Windows XP and installed Apache as Service so everytime I start Windows Apache is automatically started.

Install Apache PHP MySQL - Enter Apache server information

Click the Next button and choose Typical installation. Click Next one more time and choose where you want to install Apache ( I installed it in the default location C:\Program Files\Apache Group ). Click the Next button and then the Install button to complete the installation process.

To see if you Apache installation was successful open up you browser and type http://localhost in the address bar. You should see something like this :

Install Apache PHP MySQL - Testing Apache Installation ( thumbnail created using PHP graphics library )



By default Apache's document root is set to htdocs directory. The document root is where you must put all your PHP or HTML files so it will be process by Apache ( and can be seen through a web browser ). Of course you can change it to point to any directory you want. The configuration file for Apache is stored in C:\Program Files\Apache Group\Apache2\conf\httpd.conf ( assuming you installed Apache in C:\Program Files\Apache Group ) . It's just a plain text file so you can use Notepad to edit it.
____________________________________________________
sports betting lines (http://betonline.com/sportsbook)
cytomel (http://www.steroidsrx.com/Articles/Cytomel.cfm)

Blereete73
12-04-2009, 02:44 PM
Im having trouble with re-designing my .php page for automatic creation. Anyone have a nice guide on strings to use to make it look prettier?

poegreeInputt
12-22-2009, 09:26 PM
Ok, Im not sure if this belongs in Operating Systems or programming so if this is in the wrong forums move it please, I am trying ot install PHP 5.0.2 and APACHE 2 on Yoper Linux, I downloaded them, and everything else, edited the httpd.conf file, but when I try to put htis in: /usr/local/apache2/bin/apachectl start

I get this error: httpd: Could not determine the servers fully qualified domain name, using *27.0.0.* for ServerName
What can I do to get rid of that error?

murthis
12-29-2009, 07:16 AM
Installing Apache

Installing apache is easy if you download the Microsoft Installer ( .msi ) package. Just double click on the icon to run the installation wizard. Click next until you see the Server Information window. You can enter localhost for both the Network Domain and Server Name. As for the administrator's email address you can enter anything you want.

I'm using Windows XP and installed Apache as Service so everytime I start Windows Apache is automatically started.

Install Apache PHP MySQL - Enter Apache server information

Click the Next button and choose Typical installation. Click Next one more time and choose where you want to install Apache ( I installed it in the default location C:\Program Files\Apache Group ). Click the Next button and then the Install button to complete the installation process.

To see if you Apache installation was successful open up you browser and type http://localhost in the address bar. You should see something like this :

Install Apache PHP MySQL - Testing Apache Installation ( thumbnail created using PHP graphics library )



By default Apache's document root is set to htdocs directory. The document root is where you must put all your PHP or HTML files so it will be process by Apache ( and can be seen through a web browser ). Of course you can change it to point to any directory you want. The configuration file for Apache is stored in C:\Program Files\Apache Group\Apache2\conf\httpd.conf ( assuming you installed Apache in C:\Program Files\Apache Group ) . It's just a plain text file so you can use Notepad to edit it.

For example, if you want to put all your PHP or HTML files in C:\www just find this line in the httpd.conf :

DocumentRoot "C:/Program Files/Apache Group/Apache2/htdocs"

and change it to :

DocumentRoot "C:/www"

After making changes to the configuration file you have to restart Apache ( Start > Programs > Apache HTTP Server 2.0.50 > Control Apache Server > Restart ) to see the effect.

Another configuration you may want to change is the directory index. This is the file that Apache will show when you request a directory. As an example if you type http://www.php-mysql-tutorial.com/ without specifying any file the index.php file will be automatically shown.

Suppose you want apache to use index.html, index.php or main.php as the directory index you can modify the DirectoryIndex value like this :

DirectoryIndex index.html index.php main.php

Now whenever you request a directory such as http://localhost/ Apache will try to find the index.html file or if it's not found Apache will use index.php. In case index.php is also not found then main.php will be used.
==============
anadrol 50 (http://legalsteroids.com/anodrol.html)
beach wedding (http://www.bestathoneymoons.co.uk/)

REENU
12-31-2009, 10:30 PM
You need to add the following lines to httpd.conf (If you're using Apache for Win*2)

ScriptAlias /php/" c:/path-to-php-dir/"
AddType application/x-httpd-php .php
Action application/x-httpd-php "/php/php.exe"

Then restart Apache and it should interpret php files correctly.

For more information on installing Apache with php look at the following manual page:
http://www.php.net/manual/en/install.apache.php

____________________________________________
Ford Turbocharger (http://www.turbochargerpros.com/dodge_turbocharger.html)
Alloy Wheels, Chrome Wheels & Performance Tyres (http://www.tyrepitstop.com.au/alloy-wheels.asp)

jonemere
01-05-2010, 05:53 AM
I've tried multiple different solutions for running an apache, SQL, PHP server on an iMac, including ApacheFriends,MAMP and Tenon's iTools. Although they are probably a little easier to install they don't afford the flexibility that using ports provides, and the install went like a breeze anyway.I'll have to test drive it to make sure that it has all of the options that I currently need, but I believe so.If I do need to build PHP with other options is that relatively easy to do?Also,if I want a GUI front end to manage the server what would you recommend. I have used Webmin in the past without too many problems.

rakshu
01-06-2010, 02:26 AM
Open your browser and access the file by typing "localhost/test.php" into your browser's address bar. Do not open the file directly on the hard disk - you'll only see the words you typed in earlier. You need to use the above URL so that the browser will try to access your Apache web server, which in turn runs PHP to interpret your script.

If all goes well, you should see a pageful of information about your PHP setup. Congratulations - you have successfully installed PHP and configured Apache to work with it. You can upload this same file, test.php, to your web host and run it there to see how your web host has set up his PHP, so that you can mimic it on your own machine.

If for some reason it does not work, check to see whether your PHP setup or your Apache setup is causing the problem. To do this, open a Command Prompt window (found in the "Accessories" folder of your "Start" menu) and run php-cgi.exe on test.php with a command line like "c:\php\php-cgi test.php" (without the quotes)
______________________________________________
enterrement de vie de garçon Paris (http://www.enterrementdeviedegarconactivite.com)
best free dating sites (http://www.betterdatingsites.com/)

ragasia
01-08-2010, 04:24 AM
when running the ./configure command, redirect the error output to a file so you can figure out what's wrong. To do this, append "2> error.file" to the configure command, specifying the file to save the error log in.
________________________________________________________
soneva gili (http://www.bestatmaldivesholidays.co.uk/holiday-packages/hotel/Soneva-Gili-Resort-and-Spa.aspx)
Provisional Patent Sample (http://www.new-inventions-success.com/Provisional-Patent-Sample.html)