Running Gallery 3 on Windows environment is not officially supported by the Gallery Team.
This install WILL work provided you are running Windows Server 2008, have local admin and IIS 7/7.5 (co-hosted boxes are not supported)
Anything below Windows Server 2008 is NOT SUPPORTED.
Just a FYI you might be interested in: Gallery3:Installation_on_Windows_and_Apache
SIDE NOTE: If you use Microsoft's Web Platform Installer, technically, it will install all but mod_rewrite on XP/Vista/7 and this is NOT written for anything below IIS7/Windows 2008
If you need help on a NON-COHOSTED box, feel free to contact me: Ranger187@Gmail.com
Contents |
PHP: 5.2.3 and newer.
Edit Php.ini and make sure in extensions is has: extension=php_mbstring.dll
Edit Php.ini and make sure it says: short_open_tag = On
Database: MySQL 5 and later
Browser: Flash is required for the simple file upload function (Add > Add Photos).
PHP Memory Limit: 32M should be the minimum for PHP's memory limit if you're restricted to using GD as your image toolkit. Processing images with GD eats into PHP's allotted memory and can get consumed rather quickly with even smaller images.
You have to download the latest Versions of MySQL and PHP.
MySQL:
http://dev.mysql.com/downloads/mysql/5.1.html
PHP:
Microsoft's Web Installer: http://www.microsoft.com/web/downloads/platform.aspx or via http://php.iis.net/
MOD_REWRITE:
Microsoft's Web Installer: http://www.microsoft.com/web/downloads/platform.aspx or via http://www.iis.net/download/URLRewrite
WINCACHE (Not needed but it increases php transaction speed):
Microsoft's Web Installer: http://www.microsoft.com/web/downloads/platform.aspx or via http://www.iis.net/download/WinCacheForPHP
The default Setting of the MySQL Installer are mostly good, but there are some important things:
In this guide we use "gallery3" as the database name for your gallery, you can choose another if you want.
There are 2 ways to setup the database. I will explain both. The first example is overkill.
EXAMPLE 1
Start Menu -> MySQL -> MySQL Server 5.1 -> MySQL Command Line Client
CREATE DATABASE gallery3;
GRANT USAGE ON * . * TO 'gallery3'@'localhost' IDENTIFIED BY 'yourPasswordHere';
GRANT SELECT , INSERT , UPDATE , DELETE , CREATE , DROP , ALTER ON `gallery3` . * TO 'gallery3'@'localhost';
exit
EXAMPLE 2
EXAMPLE: datadir="C:/Program Files/MySQL/MySQL Server 5.x/Data/"
Make a new folder called "galery3" in that Data directory. DONE!
REMEMBER TO REBOOT AFTER INSTALLING PHP!
Find the extension in your php.ini and remove the ; in front of the line ;extension=php_gd2.dll
;extension=php_gd2.dll
extension=php_gd2.dll
<?php phpinfo(); ?>
Open the test.php file via your browser, example: http://www.example.com/test.php
A page showing your PHP configuration settings should now appear.
Another way to test php is via the CMD line
After you have verified your PHP install, delete the test.php file from your website.
NOTE: The 6.4.2 windows binaries do not seem to play well with G2. After much testing, I finally installed the 6.4.1 binaries that i had working on my WinXP box, and that made IM work. See forum post: http://gallery.menalto.com/node/79750 for more info and the binary I used. -Jrevillini 15:02, 18 July 2008 (UTC)
NOTE: I had trouble successfully configuring the Image Magick plugin in Gallery unless the binaries were installed in a folder higher than the location set in open_basedir. Until I tried that all of the plugin path tests would fail. --Scn095 06:12, 1 January 2009 (UTC)
NOTE: This forum post might be helpfull in your setup for getting IM to work: http://gallery.menalto.com/node/102233#comment-375859
Give IUSR Modify permission on the var directory.
This can occur if you are uploading a file that takes over 300 seconds. Changing the max_execution_time variable in the php.ini above the default IIS value will not fix this problem. You need to change the CGITimeout property which is in the IIS metabase.
Some scripts are offered to help change this variable, but I prefer a GUI. Download this IIS Administration Pack and it will install metabase explorer.
Run the metabase explorer, then expand LM, and find W3SVC. Under this you will see a CGITimeout property, it should be set to 300 (that is the default). Increase this value so that your script can take longer to upload a file. Please realize though that ANY page hosted by IIS will have this timeout value, this is not set on a per site basis.
Assuming you have installed PHP using the ISAPI dll. You now need to restart IIS. To do this, click start, then run, and type "iisreset /restart" then click ok. The problem *should* now be fixed.
REASON: You should NOT be using ISAPI on Windows Server 2008. FastCGI out performs ISAPI and this issue is ONLY present on mis-configured servers or co-hosted servers. AGAIN, do NOT use the ISAPI module.
Try: Gallery3:Modules:win_platform
NOTE: This only happens on co-hosted servers.
Try: http://gallery.menalto.com/node/103784
hints for setting filepermissions:
You should use XCACLS, not CACLS to set permissions, CACLS doesn't correctly set inheritance.
Get XCACLS here:
{{{ XCACLS.vbs <path to your website>\gallery /E /G IUSR_<computernamehere>:M
e.g.
XCACLS.vbs E:\inetpub\wwwroot\mysite.com\htdocs\gallery /E /G IUSR_WEBSERVER1:M }}}