У меня тоже была эта проблема. У меня есть Apache / 2.2.22 (Win32) PHP / 5.3.23 на компьютере с Windows 7. Моим решением было заменить extension_dir = C: \ Program Files (x86) \ PHP \ ext в файле php.ini на extension_dir = "C: \ Program Files (x86) \ PHP \ ext". Просто нужно было добавить кавычки.
Я также добавил каталог php в CLASSPATH.
I think the HTTP spec decided that "anchors" (Is that what they're called? Anyway, the hash sign and the label that comes after) don't get passed to the server, they're just used client-side to scroll the page, or to be used in JavaScript. So there's no way you can get that value, other than having a little script passing it to your server with an Ajax request once the page is loaded, but that's not very convenient.