KetilMo wrote:I was tearing my hair out for weeks finding a solution to this problem. Finally figured it out. In php.ini, enable output buffering (output_buffering = on). That fixed it for me! 🙂
Remember to restart IIS after the change in php.ini. This could be done by running iisreset from the command line on your server.
Good luck!
Ketil
Now this just blew my mind. I had a similar problem with MySQL being incredibly slow on Windows 2003 running IIS... on ASP/VBScript pages. PHP is also installed on the server and so is Microsoft SQL 2005 Express. (Yes, we're running ASP, PHP, MySQL and MS SQL on the same Windows 2003 Server using IIS.)
For the hell of it, I went into php.ini and changed output_buffering to on (at the above user's suggestion) and suddenly MySQL and ASP was faster... MySQL and PHP was faster... Microsoft SQL Server 2005 Express and ASP was faster.... everything was faster... even stuff that had no PHP!
And I didn't even have to restart IIS. As soon as I saved the php.ini file with the change, everything got faster.
Apparently PHP and MySQL and IIS are so intertwined somehow that changing the buffering setting really effects performance for the entire server.
Thanks for the solution. Even though this thread is old, I thought that this was valuable enough information to add. Hopefully it will help someone who is in the same position I was... with a slow server that shouldn't be slow and not knowing why.
So thanks and good luck.