Hello! Hey - am I the only fool trying to run TWG on Windows server?
I start using TWG v1.7.8.1 on Windows Server 2008 Standard SP2 (IIS7, Flash 10, php v5.2.10). It required few tricks to make it work, and I would like to share them with you. I didn't find all them mentioned here (in forum or faq). I hope I can save someone few hours of googling and head scratching
I do believe I'd face with similar problems on w2k3 (IIS6) and solutions should be similar.
1.
Allow Double Escaping for gallery site in IIS. Otherwise - folder or image names containing spaces could not display (neither thumbs, nor small or fullsize images)
2.
Add php FastCGI *.tmp handler for gallery site in IIS. Otherwise - flash navigation wasn't working (Error: "Unable to load XML Data from")
3.
Grant additional permissions on default php upload_tmp_dir (C:\Windows\Temp) or specify another - with appropriate permissions. Otherwise - TFU wasn't working corretly (images were not resized, they were uploaded with strange permissions - accessible only to administrators)
More details:
1.
Allow Double Escaping for gallery site in IIS.
Go to your site in IIS Manager > double-click on feature named
Request Filtering (features listed in middle pane) > In the righ pane click on action
Edit Feature Settings.... Select
Allow double escaping checkmark.
P.S. It's possible to change this setting on parent site (Default Web Site). But paranoic M$ says it's compromising security - I chose to enable it only where I really need it.
2.
Add php FastCGI *.tmp handler for gallery site in IIS.
Solution was hinted in this forum, but in German (Ich verstehe nicht). Thanks to it and to google translator
Go to your site in IIS Manager > double-click on feature named
Handler Mappings (from middle pane) > select action
Add Module Mapping ... (from right pane):
Request Path: *.tmp
Module: FastCgiModule
Executable (optional): path to php-cgi.exe of your php installation (in my case it's "C:\Program Files\PHP\php-cgi.exe")
Name: Whatever meaningful. e.g. tmp_FastCGI
3.
Grant additional permissions on default php upload_tmp_dir (C:\Windows\Temp) or specify another - with appropriate permissions.
When you upload a file, PHP sends the file to a temporary directory on the hard drive (Default usualy is C:\Windows\Temp) and then copies it over to it’s intended directory. Once the file has landed in the temporary directory, it is assigned the permissions of that directory. The problem is when Windows copies that file, it keeps the temporary directory’s permissions and doesn’t inherit your web directory’s permissions. By default only administrators and system has full access on C:\Windows\Temp, users are allowed to execute, write and append (but no read!).
The easiest way to fix this problem is to add to the temporary directory your intended web directory’s permissions.
If you want to change your temporary upload directory, find the “upload_tmp_dir” in your php.ini file and set it to the directory of your choosing (outside your web folders of course), and then add the proper permissions. If I'm not mistaken - IIS service restart required for changes to take effect.
And just so you know, if the two folders were on separate drives, you wouldn’t have this problem, and thus wouldn’t be reading this
Enjoy the flight