.NET & MySQL Part 3
Install PHP on Windows XP IIS Server
Prerequisites: IIS (Internet Information Services available on XP CD)
Version: 5.2.9
File Name: php-5.2.9-1-win32-installer.msi
Download Location: http://www.php.net/get/php-5.2.9-1-win32-installer.msi/from/a/mirror
For the latest version check it out at http://www.php.net/downloads/
- Run php-5.2.9-1-win32-installer.msi and wait.
- Click Next
- Check I accept the terms in the License Agreement check box, and then click Next
- Change the directory to the D:\PHP\ Click Next
Note: Do not use recommended directory Program Files, you will run into problems.
Please take note my root drive is the D Drive, usually it is the C drive.
- Select IIS ISAPI module and click Next
- Expand Extensions and Select MySQL and MySQLi, and then Click Next
Note: You can select other extensions and/or options you may need.
- Click Install
- Wait …
- Click Finish
- Open IIS Management Console
Start | Control Panel | Performance and Maintenance | Administrative Tools | Internet Information Services - Select Web Sites in the Left Panel
- Right Click your web site in the Right Panel and select Properties.
- Select ISAPI Filters Tab Page
- Click Add
- Type PHP in the Filter Name Text box.
- Browse to the installation directory and select php5isapi.dll
- Click OK
- Select Home Directory tab page.
- Select the Mappings tab page, and then click the Add button.
- Click the Browse button. Browse to the installation directory and change the Files of Type to Dynamic Link libraries (*.dll). Select the file php5isapi.dll and click the Open button
- In the Extension text box type .php
- In the Limit to: text box type GET, HEAD, POST
- Check the Script Engine check box.
- Check the Check that file exists check box.
- Click OK
- Click OK
- Click OK
- Important REBOOT your PC before carrying on!
Configure IIS to work with PHP
Test PHP
Test Installation
Create a new text file called phpinfo.php and paste the following into it. Save it in your wwwroot directory (default is C:\Inetpub\wwwroot )
<html>
<head>
<title>PHP Info<title>
</head>
<body>
<p>This is an HTML line</p>
<?php
echo "This is a PHP Line";
?>
<p>
<?php
phpinfo();
?>
</p>
</body>
</html>
Open http://localhost/phpinfo.php in a web browser. If you see something like the following, you have successfully installed PHP!
When you scroll down you should see the mysql and mysqli extensions.
Note: According to some sources mysqli is an improved version of mysql and support some stuff that mysql doesn’t. And mysqli has better security and you can do object oriented programming (OOP).
Happy Coding!
In the next post in this series, we will have a more in-depth look on how to connect a MySQL database in Visual Studio with VB.NET
Previous Posts:
.NET & MySQL Part 1 A list of software required as well as optional software that can be used.
.NET & MySQL Part 2 Install MySQL Server
Version 1.1
2 Comments »
Leave a reply to CasTex Cancel reply
-
Archives
- November 2010 (1)
- August 2010 (2)
- June 2010 (3)
- May 2010 (1)
- April 2010 (3)
- February 2010 (2)
- January 2010 (1)
- December 2009 (4)
- November 2009 (11)
- October 2009 (9)
- September 2009 (9)
- August 2009 (12)
-
Categories
-
RSS
Entries RSS
Comments RSS
Thanks for the post.
Comment by CasTex | 25 March 2009 |
Thanks for this post.
Comment by CasTex | 25 March 2009 |