I have spent hours and hours on this problem and would dearly love some help!
The problem: The Moodle menus don't work (along with other symptoms).
Configuration: Dedicated server Windows 2008 Web Edition, IIS7, PHP 5.3.6, MySQL 5.5.14, Moodle 2.1+ (Build: 20110719) (in fact any build since 20110701 - I've tried them all, with the same result). Client: Firefox 5 with Firebug. Also, just in case Firebug is introducing a problem, the run-time sypmtoms are the same in IE9. And for comparison I have Moodle 2 installed and running well on a local Vista PC with IIS7.
The trace from Firebug tells me that everything is OK except for the YUI calls, and the Console trace follows up with a "YUI is not defined" error (its hard to find, but YUI is defined in a js file somewhere).
But the yui_combo.ph file is there, and its server permissions are the same as for the other files. So after some excrutiating investigation, a bit of code has been inserted in moodle\lib\yui\phploader\phploader\loader.php, which is where the action takes place (as far as I can tell). Here's the code for the CSS calls, for the four parameters of the first call to yui_combo.php:
if ($type == YUI_CSS) {
$myCombo = "C:/inetpub/wwwroot/moodle/theme/yui_combo.php";
echo("<BR/>File permission for $myCombo: ".decoct(fileperms($myCombo)));
$myBase = "C:/inetpub/wwwroot/moodle/lib/yui/";
$perms =decoct(fileperms($myBase.$pathToModule));
echo("<BR/>Module permissions for $myBase/$pathToModule: $perms ");
$myArr = stat($myBase.$pathToModule);
echo("<BR/>File size of $myBase/$pathToModule: ".$myArr[7]." bytes<BR/>");
The second and third lines are looking for permissions of yui_combo.php. The remainder looks for (a) the file permissions of the four YUI CSS files, and (b) the size of the CSS files.
Here's the result, clipped from the Moodle front page:
File permission for C:/inetpub/wwwroot/moodle/theme/yui_combo.php: 100666
Module permissions for C:/inetpub/wwwroot/moodle/lib/yui//3.2.0/build/cssreset/reset-min.css: 100666
File size of C:/inetpub/wwwroot/moodle/lib/yui//3.2.0/build/cssreset/reset-min.css: 859 bytes
File permission for C:/inetpub/wwwroot/moodle/theme/yui_combo.php: 100666
Module permissions for C:/inetpub/wwwroot/moodle/lib/yui//3.2.0/build/cssfonts/fonts-min.css: 100666
File size of C:/inetpub/wwwroot/moodle/lib/yui//3.2.0/build/cssfonts/fonts-min.css: 437 bytes
File permission for C:/inetpub/wwwroot/moodle/theme/yui_combo.php: 100666
Module permissions for C:/inetpub/wwwroot/moodle/lib/yui//3.2.0/build/cssgrids/grids-min.css: 100666
File size of C:/inetpub/wwwroot/moodle/lib/yui//3.2.0/build/cssgrids/grids-min.css: 1458 bytes
File permission for C:/inetpub/wwwroot/moodle/theme/yui_combo.php: 100666
Module permissions for C:/inetpub/wwwroot/moodle/lib/yui//3.2.0/build/cssbase/base-min.css: 100666
File size of C:/inetpub/wwwroot/moodle/lib/yui//3.2.0/build/cssbase/base-min.css: 761 bytes
As I read this, yui_combo.php and the four CSS files have read+write permissions as seen by the IIS7 Application User (the write permission is hopefully unnecessary but was assigned so the Moodle installer could set up the data folder - but that's a different issue).
And the files sizes of the four CSS files are 859, 437, 1458 and 761 bytes, which checks out exactly on the server.
So some debug code tells me the files are there, reporting OK file permissions and OK file sizes.
So why does the run-time report a 404 error for these files? I'm starting to choke on this!