Entertainment Technology Entertainment Entertainment


TUTORIALS AND ARTICLES>>PHP(Installing Apache, PHP and MySQL on Windows)>>

Here are the steps I went through to install Apache, PHP and MySQL on my Windows XP Pro computer. Whether this works for all versions of windows, I can't guarantee. I've made a point of referring directly to the files you need to download - it's more specific than most tutorials which just tell you to 'download Apache'. Note - this article was written on 7 Oct 2004 so current release versions may be different. Installing Apache Server
You want to download apache_1.3.29-win32-x86-no_src.exe. This can be found in the binaries/win32 directory. Select a download mirror directly from: http://www.apache.org/dyn/closer.cgi/httpd/binaries/win32/ Once you run the downloaded setup file, click Next through the initial steps until you get to Server Information, where you enter the following info:
Network Domain: localhost
Server Name: localhost
Administrator's Email Address: your own email
Check "Run as a service for All Users"
Click Next. Under Setup Type, select Complete. Once finished, open a browser and type the URL http://localhost/ (or just click the link) to ensure the server is properly installed. Installing PHP
Download PHP from http://www.php.net/downloads.php. I downloaded the PHP 4.3.9 installer package. Run the installer - it's an executable file. For "Please select the type of installation you require", select Standard. Under Mail Configuration, enter 'localhost' for the SMTP server. For 'from' address, leave the default 'me@localhost.com'. Mail isn't important if you're setting this up for local testing as you'll be the only person using your local server. For Server Type, click Apache. You will receive a message about having to manually configure Apache. We'll do this after PHP has finished installing. Once PHP has finished installation, select Start > Program File > Apache HTTP Server > Configure Apache Server > Edit the Apache httpd.conf Configuration File. Go to the end of the text file and if you don't see the following code, cut and paste it in:
ScriptAlias /php/ "c:/php/"

AddType application/x-httpd-php .php .phtml

Action application/x-httpd-php "/php/php.exe"
To configure your default index page, look for the line DirectoryIndex index.html. Change it to the following line: DirectoryIndex index.php index.html When you've finished updating the Apache Config File, restart Apache so it reads the new configuration: Start > Program File > Apache HTTP Server > Control Apache Server > Restart To test whether Apache is configured correctly with PHP, open up a text editor (eg - Notepad) and copy and paste the following code:
<?PHP phpinfo(); ?>
Save it as phpinfo.php (the filename isn't important, the main thing is you use the extension .php) and save it in the directory C:\Program Files\Apache Group\Apache\htdocs. This is the location of your local website http://localhost/. Just a warning, watch your text editor doesn't add a .txt extension to your file. Installing MySQL
Download MySQL from http://dev.mysql.com/downloads/mysql/4.0.html. Go down to the Windows Downloads section and download Windows (x86). Click Next through the various steps, selecting Typical for Setup Type. Once installation is complete, you need to set up the root account, the admin who controls the system. Click on Start > Run and type cmd to open the command prompt. Type the following commands:
cd c:mysql
cd bin
mysqladmin -u root password YourPassword
Installing PHPMyAdmin
This last step is optional but I find PHPMyAdmin, a web based database editor, indispensable for creating and editing my local databases. Download it from http://www.phpmyadmin.net/home_page/. I downloaded the latest stable version 2.6.0-pI1 (ZIP compressed). Extract all the files from the PHPMyAdmin download and save them in a subdirectory of htdocs. Eg - htdocs/phpMyAdmin/. Then go in there and open the file config.inc. There are a few variables you need to configure in here to help PHPMyAdmin work. Look for the following variables and set them to the values I've given:
$cfg['PmaAbsoluteUri'] = 'http://localhost/phpMyAdmin/';
$cfg['Servers'][$i]['controluser']   = 'root';
$cfg['Servers'][$i]['password']      = 'rootpass';
Then point your browser to http://localhost/phpMyAdmin/ to start creating and editing your databases!


<< Back








   



MSN Nick Name



More Resources...





Most Viewed Services:
  1. HTML Tutorial
  2. XHTML Tutorial
  3. CSS Tutorial
  4. Javascript Tutorial
  5. DHTML Tutorial
  6. VB Script
  7. TCP/IP Tutorial
  8. ADO Tutorial
  9. MYSQL Tutorial
  10. ASP Tutorial
  11. AJAX Tutorial
  12. CFML Tutorial
  13. PHP Tutorial
  14. WML Tutorial
  15. FLASH Tutorial
  16. XML Tutorial
  17. RSS Tutorial
  18. SQL Tutorial
  19. HTML Articles
  1. Javascript Articles
  2. PHP Articles
  3. SEO Articles
  4. Web Design Articles
  5. SEO Tips
  6. Web Design Tips
  7. Articles
  8. CSS
  9. CSS Tips
  10. HTML Tips
  11. JAVASCRIPT Tips
  12. MYSQL Tips
  13. PHP Tips
  14. Money
  15. Tutorials
  16. Web Hosting



  • Home
  • Web Directory
  • Top Directoriers
  • Webmaster Directories
  • Contact
  • © Copyright 2006-2010 All Rights Reserved By CodeDcode.Com : HTML : RSS : TEXT : XML