PHP 5.3.1 + MySQL on Windows 7
Ok, this was a bit of a hassle getting these two running on my laptop, using Windows 7 Business. I encountered several problems with both MySQL and PHP.
MySQL has issues on Windows 7 setting up the instance configuration. The problem is that the innodb_log_file_size parameter in my.ini is different than what MySQL thinks it is. You have to manually change the innodb_log_file_size in your my.ini file to what mysql thinks it should be. In order to see this, you need to run the command
SHOW GLOBAL STATUS
and change your value in my.ini to match the value from the command.
The second problem I had was that PHP could not talk to MySQL over the localhost. This is because in Windows 7, by default the line
127.0.0.1 localhost
in your host file is commented out. To uncomment this line, open the file C:\Windows\System32\drivers\etc\hosts. and remove the # sign from the line mentioned above.
I’m using the apache available from apachelounge so that I can build PHP extensions from C++ on this version of apache. The PHP I am using is VC9 Thread Safe. It is important that you use the thread safe version, so that you can use mod_php to connect PHP to apache.
You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.