Saturday, July 14, 2007

Setting up Apache, PHP, MySQL under Vista

Update 7-22-07:

For some reason, and I’m not sure why, I wasn’t able to get MySQL to work with PHP. PhP was working, and MySQL was working from the command prompt, but php was not loading the the mysql dll, or not loading it properly. I tried many different scenarios to get it work and finally gave up. I uninstalled Apache, PhP and MySQL and downloaded WAMP5 (www.wampserver.com). WAMP is an installer that installs Apache, MySQL and PHP so that they all work together right from the start. After spending 3 days trying to Install those on my own, I used WAMP and was up and running in 15 minutes. Once installed you can make changes to the httpd.conf, php.ini and mysql as you normally would to customize it for yourself. However, you may still need to disable UAC, but I’m not sure about this.

If you would still like to manually install php/mysql/apache on vista then check out the post below which got php and apache running just fine. If you get MySQL to work with PhP on Vista, I would love to hear how you did it!

Disable User Account Control (UAC) and never look back!

As I mentioned in my last post, I now have Vista Home (for good or bad, it came with my new laptop). First thing I must say is if you have a working system on XP, unless you have a specific NEED to upgrade to Microsoft Vista, then Don’t. It has been a troublesome experience for me and now that I have everything working pretty well, there are still little unexplained annoyances (i.e., explorer.exe crashes about once every day or two for no apparent reason, though it does start right back up in about 30 seconds and doesn’t effect my other open programs).

That being said, if you do have Vista and are installing (or planning to install) a web server (especially the Apache/PhP/MySQL variety) than the first thing you should do to eliminate at least half of your head-aches is to disable User Account Control. There are many different ways of turning this off and you can find them described here:
http://www.petri.co.il/disable_uac_in_windows_vista.htm

Once you have done this, you should have no problem installing Apache the way you are familiar with (I’m not going to get into that here). Now you are ready to install php.

Install PhP under Apache and Vista:

If you have disabled User Account Control and have successfully installed Appache then check out the step-by-step instructions here:
http://senese.wordpress.com/2007/06/06/install-php-5-under-apache-22-and-windows-vista/

I follwed that procedure from start to finish (after removing my innitial php install attempt) and was up and running with no problems.

I am now working on installing MySQL and if anything weird should come up, I’ll add it to this post.

~Billy Flaherty
Website Developer
www.billyswebdesign.com

Posted by Billy at 05:19:54 | Permalink | Comments (8)