Sunday, March 02, 2008

Vista + PHP + MySQL + Apache - Getting All To Play Nice

I had pretty good luck getting Windows Vista more or less setup as a dev server. But I ran into the system crashing when I attempted to use MySQL. This meant that while my dev environment was close to setup, it was still pretty useless.

Tonight I finally got the system tamed. Here's what I had to do:

  • Install just the right versions of PHP and MySQL. I found this bug report immensely helpful. The winning combination turned out to be: PHP = 5.2.4, MySQL = 5.0.45, libmysql.dll = 5.0.45.
  • I had to explicitly grant permission for Everyone on my system to have full access to my PHP ext directory and the libmysql.dll file that I had installed in C:\Windows\System32. This is almost certainly a bad thing. However, just giving everyone on the system Read permissions didn't do the trick - I was still getting the message:
    PHP Warning:  PHP Startup: Unable to load dynamic library
     'c:/tools/php-5.2.5-Win32/ext\\php_mysqli.dll' - Access is denied.\r\n
      in Unknown on line 0
    

With this two items out of the way, life is good again.

No comments:

Post a Comment