alt
Advertisement
Sponsored links
Online Training
Career Series
Exforsys
Exforsys arrow Tutorials arrow PHP arrow PHP Tutorial - Installation
Site Search


PHP Tutorial - Installation

PHP Tutorial - Installation

In this tutorial you will learn about PHP - Installation steps involved in Installing Apache server, Installing PHP 4 and Installing PHP 5.

Installing Apache server:

1- Download the installer from Apache site:
http://httpd.apache.org/download.cgi
2- Double-click on the installer file to start the installation process.
3- You will get a welcome screen, select Next to continue the installation process.
4- You will be prompted to accept the Apache license.
5- After you accept the license, the installer presents you with a brief introduction to Apache.
6- Then the installer will ask you to provide basic information about your computer.
7- The next screen enables you to choose the type of installation.
8- If everything goes well, it will present you with the final screen.

Installing PHP 4:

1. Download the file php-version.zip from PHP site:
http://www.php.net/downloads.php
2. Uncompress the zip file to the path you want the PHP to reside.
3. In the PHP installation directory, find the php.ini-dist file and rename it php.ini.
4. Move the php.ini file to the windows directory.
5. Move the php4ts.dll file to C:\WINDOWS\SYSTEM\ or C:\WINDOWS\SYSTEM32/.
6. Go to Apache installation directory, find the file httpd.conf, it’s under the conf directory, then find the following section:

# Example:
# LoadModule foo_module modules/mod_foo.so
#
LoadModule access_module modules/mod_access.so
LoadModule actions_module modules/mod_actions.so
LoadModule alias_module modules/mod_alias.so
LoadModule asis_module modules/mod_asis.so
LoadModule auth_module modules/mod_auth.so
#LoadModule auth_anon_module modules/mod_auth_anon.so
#LoadModule auth_dbm_module modules/mod_auth_dbm.so
#LoadModule auth_digest_module modules/mod_auth_digest.so
LoadModule autoindex_module modules/mod_autoindex.so
#LoadModule cern_meta_module modules/mod_cern_meta.so
LoadModule cgi_module modules/mod_cgi.so
#LoadModule dav_module modules/mod_dav.so
#LoadModule dav_fs_module modules/mod_dav_fs.so
LoadModule dir_module modules/mod_dir.so
LoadModule env_module modules/mod_env.so
#LoadModule expires_module modules/mod_expires.so
#LoadModule file_cache_module modules/mod_file_cache.so
#LoadModule headers_module modules/mod_headers.so


At the end of this section add the following:
LoadModule php4_module c:/php-version/sapi/php4apache2.dll

Notice: replace c:/php-version with the PHP directory.

7. In the same file find the following section:

#
# AddType allows you to add to or override the MIME configuration
# file mime.types for specific file types.
#

At the end of this section add the following:
AddType application/x-httpd-php .php .phtml .html
AddType application/x-httpd-php-source .phps



Installing PHP 5:

PHP 5 comes in a windows installer file, the installer installs itself, and sets the needed environment variables.


Trackback(0)
Comments (4)add comment

kriplozoik said:

  Thank you for this article!
July 14, 2007

jobo said:

  Iam trying to learn how to properly install PHP on server system over with XP operating system so i did the following:
After installing Apache2.2.5
I have downloaded PHP5 binaries with installer and completed the process selecting php-win (server) over command scripting and cgi, however when i executed a simple PHP Test script (embeded in HTML file) over the browser, the browser is empty. so I clck the 'view source' on the browser and saw the source code. (meaning it was loaded)

I looked and reviewed the httpd.cnf file and found that the insatller automatically loaded PHP directives for the PHP

I have also created manually the upload and session folders in the 'Documents and Settings'/ ./Temp/..
because the installer will not do it automatically. (i did this rather than renaming to C:WindowsTemp in the Ini file.)
I looked at the Wiindows environment variables and saw that the PHP was included in the PATH. but did not see the PHPRC variable. I did not add the PHPRC variable because the Installer was suppose to do this but did not, so I assume that it was not ncessary for this PHP version set up..

Question why is the page blank?
What step am I missing? Help


February 14, 2008

jobo said:

  After reading so many articles and doing trial and errors , I have discovered the solution to my problem. Its merely that PHP 5 does not have a dll that will run with Apache server with version higher than 2.0 , as of writing. The simple solution That i have made is to downgrade to Apache 2.0. Now its working.!
February 18, 2008

nepnep said:

  im using php 5 and apache 2.2.8 , and it works very well without any problem. maybe you missed some configurations...............................
March 19, 2008

Write comment

busy
 
< Prev   Next >
Exforsys Offers
© 2008 Exforsys.com
Joomla! is Free Software released under the GNU/GPL License.
Page copy protected against web site content infringement by Copyscape