Home Login Registration Authors Contact Us About Us Subscribe
Want to receive new articles via e-mail? Click here!
: Home  :: Web Hosting  :: Web Hosting General
Installing a Personal Web Server
by Webdevinfo - Webmaster
Views: 964
Votes: none
Rating: 0.00
Rate this article  Print this article  Email this article  View this article in PDF  Discuss this article
First< Prev | Page:  1 | 2 | 
The Article

PHP Install

First, unzip the file that you downloaded.  WinZip is the most common program for unzipping files.  Winzip will unzip the data into a new folder called php4.x.x.  Next, go into that folder and copy all of the files and folders to the directory "c:\web\php\" (You will need to create the folder "php").  I only do this so that all of the web server data is in one folder, and out of the way.

Now that we have installed PHP on the system, we need to configure it to run with Apache.  The first thing to do is to go into the folder "c:\web\php\" and find the file "php4ts.dll".  If you have a different version of PHP, the file might have a different name, but it is the only .dll file in the PHP root folder.  Take this .dll file and copy it to the "c:\web\php\sapi\" folder.  Next, go back to the PHP root folder and open the file "php.ini-dist" in your text-editor.

Once opened, go to "File>Save As..." and rename it "php.ini".  Please make sure that in drop-down menu at the bottom of the "Save As..." window, you select "All Files" so that the ".ini" extension will be added to the file.  Once saved, go back to the PHP root folder ("c:\web\php\") and move the new "php.ini" file to "c:\Windows\" ("c:\WINNT\" if you are using Windows 2000/NT).

Just to make sure that everything's working, if you are a Windows 98 user (or if you installed Apache as a manual application) close the open Apache Window and start Apache again by going to "Start>Programs>Apache HTTP Server>Start Apache in Console".  If you installed the server as a Service, just go to "Start>Programs>Apache HTTP Server>Control Apache Server>Restart".  Open your internet browser and go to http://127.0.0.1/ and if you see an Apache directory system, your doing well.  To check PHP, open your text editor and create a new file called "phpinfo.php" in "c:\web\www\".  In the file type:

   <? php phpinfo(); ?>

Go back to your browser window and refresh the page.  Click on the file phpinfo.php that’s listed there, and if you see a large page of info, your PHP works! 

Lets go tackle the last part of the web server now ... the database!

MySQL Install

The installation of MySQL is very straight-forward.  Just unzip the contents of the zip file you downloaded, and you will find a setup file.  Just follow these instructions until you come to an option to change the path of the MySQL installation.  Change it from "c:\mysql" to "c:\web\mysql".

Once it’s fully installed, go to the folder "c:\web\mysql\bin" and inside you will see a program called winmysqladmin.exe, which you should open.  It will load up a prompt in which you will have to type in a username and password.  This is just to create a MySQL login for you when you need to access the database from your scripts.  For the username, choose "root", and the password doesn't matter too much since this is only a local server.  If you want to enter a password, choose one that will be easy for you to remember, although it will always be accessibly through the my.ini file (located in "c:\Windows", or "c:\WINNT" for Windows 2K/NT users).

After accepting the login, you will see an application with quite a few options in it, and at the top-right hand corner a stoplight.  If the stoplight is red, right click on it, and choose "Windows>Install the Service" (for Windows 2/NT users, it will be "Win NT>Install the Service").  Once completed, if the light is still red, right click on it again and click on "Start the Service" in the "Windows" or "Win NT" subdirectory.

You’re done!

The last thing we'll do is install phpMyAdmin, a great tool for managing MySQL Databases.

phpMyAdmin Install

phpMyAdmin really can't be considered a program, because it’s entirely made in PHP!  Because of this, all we have to do is copy & paste files to our "www" folder.  Unzip the phpMyAdmin package you downloaded and unzip it to "C:\web\www".  Next go to the "www" folder, and you will see a new folder called "phpMyAdmin-x.x.x".  Rename this folder to "phpmyadmin".  Next, in your text-editor, open the file "c:\web\www\phpmyadmin\config.inc.php".


Go down the page, and you'll see the first PHP variable:

 

     $cfg['PmaAbsoluteUri'] = '';

 

Change this to:

 

     $cfg['PmaAbsoluteUri'] = 'http://localhost/phpmyadmin/';

 

If you go into your web browser to http://localhost/ and click on the folder "phpmyadmin", you should see a frameset come up with a phpMyAdmin welcome page.

 

Great job!

 

You have successfully installed all of the main parts of your web server.

 

There are many extra modules you can download for Apache, such as Perl, XML, and Java modules, but right now, you have a fully functional PHP/MySQL Server, just for you.

 


About the Author:
Written by
Saj of the Web Developer Community Forums

First< Prev | Page:  1 | 2 | 
Rate this article  Print this article  Email this article  View this article in PDF  Discuss this article
Similar/related articles:
Advanced Search
Site Search:


FirstWebHosting
Top Ten Hosts as picked by our editors - with reviews and interviews.
The Host Planet
Web hosting reviews and ratings. Learn how to spot a great host.
Hosts2002
The first and greatest hosting directory with the consumer in mind.
Hostcue.com
Hosting directory for the masses with special offers Check us out!
WebDevForums
Web developers or all levels discuss the details of design and ecommerce.
Needscripts.com
Free scripts and applications for web developers.