First, I have never successfully installed php / mysql together on server 2003 without at least something going wrong. While writing this tutorial, it was permissions on the php directory. I am going to install php 5.2.6 and mysql 5.0.67 to IIS 6 on Server 2003 Enterprise Service Pack 2.
1. download php 5.2.6 (ZIP only, don't get the msi because you will have problems) and mysql 5.0.67 from their sites, you may need to make their sites trusted to download from them due to IE's enhanced server security.
2. copy the php unzipped directory to c:\php526 (my choice, you can choose another location).
3. copy my php.ini file to c:\php526 and change extension_dir inside of it to c:\php526\ext or whatever directory you are using
4. goto the iis panel and add new webservice extension, name it PHP, and add required file: C:\php526\php5isapi.dll and allow extension.
5. now we need to update path variables for windows
a. right click my computer, goto properties, goto advanced, click environment variables
b. find path, and add: ";C:\php526" to this and ok it.
c. Click new, variable is "PHPRC" and value "C:\php526" ok it. Then ok the properties of my computer.
6. now we need to give network service permission to access php, goto my computer, click on c:\ then right click your php526 folder, click on sharing and security, goto the security tab, and click on add, type in network service, ok it, and make sure it can read and execute. Then ok this and get out of my computer.
7. now we need to goto the iis control panel, right click websites, click properties, goto the home directory, click on configuration, click add. Executable is "C:\php526\php5isapi.dll", extension is php, and limit verbs to: "GET,HEAD,POST", then ok it. Also, enable execute permissions under home directory to scripts and executables.
8. goto the documents tab and add index.php to the default file list and ok everything.
9. from the iis panel, right click your server name and goto tasks>restart IIS, php is now installed with mysql support!
10. start the mysql installer, install with typical settings, afterwards, configure it
11. Lets select detailed configuration settings, this will be a server machine (I have 2GB of ram on this server, which should easily support this, 512MB of ram should suffice as well). We want a multifunctional database, decision support is fine (select more if you plan on high usage), make sure you allow a firewall exception if you need people to use the server remotely. strict mode is fine, standard characters, windows service are both fine, but check bin extension for command line use. finally enable root access, I also allowed remote root, but it isn't needed. I did not enable anonymous connections. Hit execute at the end, then finish.
12. Now if everything worked correctly, php and mysql should be installed. Try uploading a php script such as
<?echo phpinfo();?>and running it, it should work fine. Mysql should show up in this as well.
Congrats, your server is now set up as a php, mysql and iis server if you didn't run into a problem. If you have questions or run into trouble, let me know and I will try to help you out.
Attached Files
Edited by John, 28 September 2008 - 01:07 PM.
fixed mistake


Sign In
Create Account



Back to top









