<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>vincentkong.com &#187; Gallery</title>
	<atom:link href="http://www.vincentkong.com/tag/gallery/feed" rel="self" type="application/rss+xml" />
	<link>http://www.vincentkong.com</link>
	<description>Just another WordPress weblog</description>
	<lastBuildDate>Sun, 25 Dec 2011 01:35:03 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Upgrading Gallery2</title>
		<link>http://www.vincentkong.com/2008/08/upgrading-gallery2</link>
		<comments>http://www.vincentkong.com/2008/08/upgrading-gallery2#comments</comments>
		<pubDate>Fri, 15 Aug 2008 08:37:39 +0000</pubDate>
		<dc:creator>Vincent Kong</dc:creator>
				<category><![CDATA[Gallery]]></category>

		<guid isPermaLink="false">http://www.vincentkong.com/?p=230</guid>
		<description><![CDATA[The most reliable way to upgrade Gallery2 is to do a complete replacement. To ensure a safer upgrade, it&#8217;s recommended that you deactivate or even uninstall all the plugins installed, and change the theme back to default theme of Gallery2 &#8230; <a href="http://www.vincentkong.com/2008/08/upgrading-gallery2">Continue reading <span class="meta-nav">&#8594;</span></a>


Related posts:<ol><li><a href='http://www.vincentkong.com/2008/06/gallery2-quickstart-guide' rel='bookmark' title='Gallery2 Quickstart Guide'>Gallery2 Quickstart Guide</a></li>
<li><a href='http://www.vincentkong.com/2008/06/gallery2-url-rewrite-plugin' rel='bookmark' title='Gallery2 URL Rewrite Plugin'>Gallery2 URL Rewrite Plugin</a></li>
<li><a href='http://www.vincentkong.com/2007/12/upgrading-dopod-818-pro-to-windows-mobile-6' rel='bookmark' title='Upgrading Dopod 818 Pro to Windows Mobile 6'>Upgrading Dopod 818 Pro to Windows Mobile 6</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>The most reliable way to upgrade Gallery2 is to do a complete replacement.</p>
<p>To ensure a safer upgrade, it&#8217;s recommended that you deactivate or even uninstall all the plugins installed, and change the theme back to default theme of Gallery2 to Matrix.</p>
<p><a href="http://www.vincentkong.com/wp-content/uploads/2008/06/gallery_plugins2.png"><img class="aligncenter size-medium wp-image-231" title="Gallery 2 Plugins" src="http://www.vincentkong.com/wp-content/uploads/2008/06/gallery_plugins2-300x270.png" alt="Gallery 2 Plugins" width="300" height="270" /></a></p>
<p><a href="http://www.vincentkong.com/wp-content/uploads/2008/06/gallery_matrix_theme.png"><img class="aligncenter size-medium wp-image-232" title="Gallery 2 Matrix Theme" src="http://www.vincentkong.com/wp-content/uploads/2008/06/gallery_matrix_theme-300x203.png" alt="Gallery2 Matrix Theme" width="300" height="203" /></a></p>
<p><a href="http://codex.gallery2.org/Gallery2:Download#Packages">Download</a> and extract the latest version of Gallery2.</p>
<p><code>$ cd /var/www/<br />
$ wget http://downloads.sourceforge.net/gallery/gallery-2.2.5-minimal.tar.gz<br />
$ tar -zxvf gallery-2.2.5-minimal.tar.gz<br />
</code></p>
<p>I like to use symbolic links to help me easily replace older version with newer one.</p>
<p><code>$ mv gallery2 gallery-2.2.5<br />
$ ln -s gallery-2.2.5 gallery2</code></p>
<p>Copy the existing <code>g2data</code> directory to the new Gallery2 directory e.g.</p>
<p><code>$ cp -R ./gallery-2.2.4/g2data_e76ab32e8b ./gallery-2.2.5</code></p>
<p>Run the install script by pointing your browser to the base url of your website (e.g http://gallery.vincentkong.com), which will bring you through an installation wizard to setup Gallery.</p>
<p><a href="http://www.vincentkong.com/wp-content/uploads/2008/05/gallery_welcome.png"><img class="aligncenter size-medium wp-image-176" title="Gallery 2 Installer" src="http://www.vincentkong.com/wp-content/uploads/2008/05/gallery_welcome-300x189.png" alt="Gallery Installer" width="300" height="189" /></a></p>
<p>When the <strong>Storage Setup</strong> is reached, Gallery will ask to specific a directory <code>g2data</code> where all the images will be stored. Enter the same directory which was just copied previously.  e.g. <code>/var/www/gallery-2.2.5/g2data_e76ab32e8b</code></p>
<p><a href="http://www.vincentkong.com/wp-content/uploads/2008/06/gallery_database_setup_upgrade.png"><img class="aligncenter size-medium wp-image-233" title="Gallery 2 Database Setup Upgrade" src="http://www.vincentkong.com/wp-content/uploads/2008/06/gallery_database_setup_upgrade-300x243.png" alt="Gallery 2 Database Setup Upgrade" width="300" height="243" /></a></p>
<p>When the <strong>Database Setup</strong> is reached.  Click on the &#8220;Reuse Existing Tables&#8221; button.</p>
<p><a href="http://www.vincentkong.com/wp-content/uploads/2008/06/gallery_database_setup_upgrade.png"><img class="aligncenter size-medium wp-image-235" title="Gallery Database Setup Upgrade" src="http://www.vincentkong.com/wp-content/uploads/2008/06/gallery_database_setup_upgrade-300x243.png" alt="Gallery Database Setup Upgrade" width="300" height="243" /></a></p>
<p>When the <strong>Version Check</strong> is reached by the installer it will bring you to the Gallery Upgrader script, where you continue with the Upgrade wizard.</p>
<p><a href="http://www.vincentkong.com/wp-content/uploads/2008/06/gallery_version_check.png"><img class="aligncenter size-medium wp-image-236" title="Gallery 2 Version Check" src="http://www.vincentkong.com/wp-content/uploads/2008/06/gallery_version_check-300x194.png" alt="Gallery 2 Version Check" width="300" height="194" /></a></p>
<p><a href="http://www.vincentkong.com/wp-content/uploads/2008/06/gallery_upgrade_welcome.png"><img class="aligncenter size-medium wp-image-237" title="Gallery 2 Upgrade Welcome" src="http://www.vincentkong.com/wp-content/uploads/2008/06/gallery_upgrade_welcome-300x154.png" alt="Gallery 2 Upgrade Welcome" width="300" height="154" /></a></p>
<p>In the <strong>Upgrading the Gallery Core Module</strong> it&#8217;s recommended to back the exist database before continuing. e.g.</p>
<p><code>$ mysqldump -u username -p gallery_database &gt; gallery_database.sql</code></p>
<p><a href="http://www.vincentkong.com/wp-content/uploads/2008/06/gallery_upgrade_core.png"><img class="aligncenter size-medium wp-image-238" title="Gallery 2 Upgrade Core" src="http://www.vincentkong.com/wp-content/uploads/2008/06/gallery_upgrade_core-300x194.png" alt="Gallery 2 Upgrade Core" width="300" height="194" /></a></p>
<p>The <strong>Upgrade Plugins</strong> is the final step in the upgrade process.</p>
<p><a href="http://www.vincentkong.com/wp-content/uploads/2008/06/gallery_upgrade_plugin.png"><img class="aligncenter size-medium wp-image-239" title="Gallery 2 Upgrade Plugin" src="http://www.vincentkong.com/wp-content/uploads/2008/06/gallery_upgrade_plugin-300x224.png" alt="Gallery 2 Upgrade Plugin" width="300" height="224" /></a></p>
<p><a href="http://www.vincentkong.com/wp-content/uploads/2008/06/gallery_upgrade_finish.png"><img class="aligncenter size-medium wp-image-240" title="Gallery 2 Upgrade Finish" src="http://www.vincentkong.com/wp-content/uploads/2008/06/gallery_upgrade_finish-300x137.png" alt="Gallery 2 Upgrade Finish" width="300" height="137" /></a></p>


<p>Related posts:<ol><li><a href='http://www.vincentkong.com/2008/06/gallery2-quickstart-guide' rel='bookmark' title='Gallery2 Quickstart Guide'>Gallery2 Quickstart Guide</a></li>
<li><a href='http://www.vincentkong.com/2008/06/gallery2-url-rewrite-plugin' rel='bookmark' title='Gallery2 URL Rewrite Plugin'>Gallery2 URL Rewrite Plugin</a></li>
<li><a href='http://www.vincentkong.com/2007/12/upgrading-dopod-818-pro-to-windows-mobile-6' rel='bookmark' title='Upgrading Dopod 818 Pro to Windows Mobile 6'>Upgrading Dopod 818 Pro to Windows Mobile 6</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.vincentkong.com/2008/08/upgrading-gallery2/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Gallery2 URL Rewrite Plugin</title>
		<link>http://www.vincentkong.com/2008/06/gallery2-url-rewrite-plugin</link>
		<comments>http://www.vincentkong.com/2008/06/gallery2-url-rewrite-plugin#comments</comments>
		<pubDate>Sun, 29 Jun 2008 16:37:08 +0000</pubDate>
		<dc:creator>Vincent Kong</dc:creator>
				<category><![CDATA[Gallery]]></category>

		<guid isPermaLink="false">http://www.vincentkong.com/?p=185</guid>
		<description><![CDATA[By default Gallery uses web URLs which have question marks and lots of numbers in them which looks ugly. e.g. http://example.com/?g2_itemId=123 The URL Rewrite plugin enables you to configure URL patterns to more human readable. To install the URL Rewrite &#8230; <a href="http://www.vincentkong.com/2008/06/gallery2-url-rewrite-plugin">Continue reading <span class="meta-nav">&#8594;</span></a>


Related posts:<ol><li><a href='http://www.vincentkong.com/2008/08/upgrading-gallery2' rel='bookmark' title='Upgrading Gallery2'>Upgrading Gallery2</a></li>
<li><a href='http://www.vincentkong.com/2008/06/gallery2-quickstart-guide' rel='bookmark' title='Gallery2 Quickstart Guide'>Gallery2 Quickstart Guide</a></li>
<li><a href='http://www.vincentkong.com/2008/06/wordpress-plugins' rel='bookmark' title='WordPress Plugins'>WordPress Plugins</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>By default <a href="http://gallery.menalto.com/">Gallery</a> uses web URLs which have question marks and lots of numbers in them which looks ugly. e.g. http://example.com/?g2_itemId=123</p>
<p>The URL Rewrite plugin enables you to configure URL patterns to more human readable.</p>
<p>To install the URL Rewrite plugin, go to Gallery Admin and click on the &#8220;Plugins&#8221; link to display the plugins already installed, and then the &#8220;Get More Plugins&#8221; tab. To display an available list of plugins which can be installed.</p>
<p><a href="http://www.vincentkong.com/wp-content/uploads/2008/05/gallery_installed_plugins.png"><img class="aligncenter size-medium wp-image-189" title="Installed Plugins" src="http://www.vincentkong.com/wp-content/uploads/2008/05/gallery_installed_plugins-300x230.png" alt="Installed Plugins" width="300" height="230" /></a></p>
<p><a href="http://www.vincentkong.com/wp-content/uploads/2008/05/gallery_plugins_list.png"><img class="aligncenter size-medium wp-image-186" title="Gallery Plugins List" src="http://www.vincentkong.com/wp-content/uploads/2008/05/gallery_plugins_list-300x149.png" alt="Gallery Plugins List" width="300" height="149" /></a></p>
<p>If this is your first visit, you&#8217;ll need to download the list of plugins first. When the list of plugins are displayed, go to the &#8220;Gallery&#8221; section and click the &#8220;download&#8221; link associated with &#8220;URL Rewrite&#8221; plugin.</p>
<p>When the plugin has been installed a status message &#8220;URL Rewrite plugin updated&#8221; will appear. Click on &#8220;Plugins&#8221; link again to see your installed plugins, the &#8220;URL Rewrite&#8221; plugin will appear in the &#8220;Gallery&#8221; section with a &#8220;disabled&#8221; status.   Click on the &#8220;Configure&#8221; link to begin setting up the URL Rewrite plugin.</p>
<p><a href="http://www.vincentkong.com/wp-content/uploads/2008/05/gallery_installed_plugins2.png"><img class="aligncenter size-medium wp-image-190" title="URL Rewrite plugin" src="http://www.vincentkong.com/wp-content/uploads/2008/05/gallery_installed_plugins2-300x273.png" alt="URL Rewrite plugin" width="300" height="273" /></a></p>
<p>There are two types of methods which can be used for the URL Rewrite plugin, Apache <code>mod_rewrite</code> or PHP Path Info. The difference is <code>mod_rewrite</code> will give you pretty links e.g. http://example.com/album-name, and PHP Path Info will give you almost pretty links e.g. http://example.com/main.php/album-name. I setup my URL Rewrite plugin with <code>mod_rewrite</code></p>
<p><a href="http://www.vincentkong.com/wp-content/uploads/2008/05/gallery_url_rewrite_setup.png"><br />
<img class="aligncenter size-medium wp-image-191" title="URL Rewrite Setup" src="http://www.vincentkong.com/wp-content/uploads/2008/05/gallery_url_rewrite_setup-300x142.png" alt="URL Rewrite Setup" width="300" height="142" /></a></p>
<p>Before you select the Apache <code>mod_rewrite</code> method it must be enable first. In Ubuntu run execute the following:</p>
<p><code>$ sudo a2enmod rewrite</code></p>
<p>In the Apache configuration file, the <code>FollowSymLinks</code> option needs to be enabled and the <code>FileInfo</code> needs to be allowed for the Gallery’s home directory.</p>
<pre>&lt;Directory /var/www/gallery&gt;
    Options FollowSymLinks
    AllowOverride FileInfo
    allow from all
&lt;/Directory&gt;</pre>
<p>Then create a file in your Gallery directory named <code>.htaccess</code> and give it read/write permission.</p>
<pre>$ cd /var/www/gallery
$ touch .htaccess
$ chmod 666 .htaccess</pre>
<p>After click on the &#8220;Apache mod_rewrite&#8221; link to continue the URL Rewrite Administration setup with <code>mod_rewrite</code>, and click on the &#8220;Save&#8221; button when you are satisfy with the URL rewrite rules.<br />
<a href="http://www.vincentkong.com/wp-content/uploads/2008/05/gallery_url_rewrite_admin.png"><br />
<img class="aligncenter size-medium wp-image-193" title="URL Rewrite Administration" src="http://www.vincentkong.com/wp-content/uploads/2008/05/gallery_url_rewrite_admin-300x217.png" alt="URL Rewrite Administration" width="300" height="217" /></a></p>
<p>For better security it&#8217;s recommended to remove write permission on the <code>.htaccess</code></p>
<p><code>$ chmod 644 .htaccess</code></p>
<p>For more information refer to the <a href="http://codex.gallery2.org/Gallery2:Modules:rewrite">Gallery2 Module Rewrite</a> page.</p>


<p>Related posts:<ol><li><a href='http://www.vincentkong.com/2008/08/upgrading-gallery2' rel='bookmark' title='Upgrading Gallery2'>Upgrading Gallery2</a></li>
<li><a href='http://www.vincentkong.com/2008/06/gallery2-quickstart-guide' rel='bookmark' title='Gallery2 Quickstart Guide'>Gallery2 Quickstart Guide</a></li>
<li><a href='http://www.vincentkong.com/2008/06/wordpress-plugins' rel='bookmark' title='WordPress Plugins'>WordPress Plugins</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.vincentkong.com/2008/06/gallery2-url-rewrite-plugin/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Gallery2 Quickstart Guide</title>
		<link>http://www.vincentkong.com/2008/06/gallery2-quickstart-guide</link>
		<comments>http://www.vincentkong.com/2008/06/gallery2-quickstart-guide#comments</comments>
		<pubDate>Thu, 26 Jun 2008 01:40:12 +0000</pubDate>
		<dc:creator>Vincent Kong</dc:creator>
				<category><![CDATA[Gallery]]></category>

		<guid isPermaLink="false">http://www.vincentkong.com/?p=175</guid>
		<description><![CDATA[Gallery is an open source PHP web application that enables management of digital photos and other media. Installing Gallery2 Download and extract the latest version of Gallery2, I choose the Minimal version $ wget http://downloads.sourceforge.net/gallery/gallery-2.2.4-minimal.tar.gz $ tar -zxvf gallery-2.2.4-minimal.tar.gz $ &#8230; <a href="http://www.vincentkong.com/2008/06/gallery2-quickstart-guide">Continue reading <span class="meta-nav">&#8594;</span></a>


Related posts:<ol><li><a href='http://www.vincentkong.com/2008/08/upgrading-gallery2' rel='bookmark' title='Upgrading Gallery2'>Upgrading Gallery2</a></li>
<li><a href='http://www.vincentkong.com/2007/05/drupal-quickstart-guide' rel='bookmark' title='Drupal Quickstart Guide'>Drupal Quickstart Guide</a></li>
<li><a href='http://www.vincentkong.com/2007/05/mysql-for-ubuntu-quickstart-guide' rel='bookmark' title='MySQL for Ubuntu Quickstart Guide'>MySQL for Ubuntu Quickstart Guide</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p><a href="http://gallery.menalto.com">Gallery</a> is an open source PHP web application that enables management of digital photos and other media.</p>
<h4>Installing Gallery2</h4>
<p><a href="http://codex.gallery2.org/Gallery2:Download#Packages">Download</a> and extract the latest version of Gallery2, I choose the Minimal version</p>
<p><code>$ wget http://downloads.sourceforge.net/gallery/gallery-2.2.4-minimal.tar.gz<br />
$ tar -zxvf gallery-2.2.4-minimal.tar.gz<br />
$ cp gallery2/* /var/www/gallery</code></p>
<p>Create a database for gallery to use, for MySQL</p>
<p><code>mysql&gt; create database databasename<br />
mysql&gt; grant SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, INDEX, ALTER ON databasename.* TO 'username'@'localhost' identified by 'password'</code></p>
<p>Run the install script by pointing your browser to the base url of your website (e.g http://gallery.vincentkong.com), which will bring you through an installation wizard to setup Gallery.</p>
<p><a href="http://www.vincentkong.com/wp-content/uploads/2008/05/gallery_welcome.png"><img class="alignnone size-medium wp-image-176" title="Gallery Installer" src="http://www.vincentkong.com/wp-content/uploads/2008/05/gallery_welcome-300x189.png" alt="Gallery Installer" width="300" height="189" /></a></p>
<p>When the <strong>Storage Setup</strong> is reached, Gallery will ask to specific a directory <code>g2data</code> where all the images will be stored. It is recommend that this directory is not web accessible, however if that&#8217;s not possible then add a randomize string to the end of the directory e.g. <code>g2data_e76ab32e8b</code>. Create the directory and set read/write permission to it.</p>
<p><code>$ cd /var/www/gallery<br />
$ mkdir g2data_e76ab32e8b<br />
$ chmod 777 g2data_e76ab32e8b</code></p>
<p><a href="http://www.vincentkong.com/wp-content/uploads/2008/05/gallery_storage_setup.png"><img class="alignnone size-medium wp-image-177" title="Storage Setup" src="http://www.vincentkong.com/wp-content/uploads/2008/05/gallery_storage_setup-286x300.png" alt="Storage Setup" width="286" height="300" /></a></p>
<p>Continue with the installation until the <strong>Create a config file</strong> step is reached, which then requires the <code>config.php</code> file to be created with read/write permissions</p>
<p><code>$ cd /var/www/gallery<br />
$ touch config.php<br />
$ chmod 666 config.php</code></p>
<p>After the installation has been completed, it&#8217;s recommended that write permission be removed from the <code>config.php</code> file.</p>
<p><code>$ chmod 644 config.php</code></p>
<h4>Securing Gallery</h4>
<p>It&#8217;s important to have the Gallery secure, here are a few things which can be done:</p>
<ul>
<li>Prevent the viewing of the Gallery code by adding the following to the Apache configuration file or by creating a <code>.htaccess </code>in the Gallery root directory<code>.</code>
<pre>&lt;FilesMatch "\.(inc|class)$"&gt;
    Deny from all
&lt;/FilesMatch&gt;</pre>
</li>
<li>If the g2data directory is web accessible it should be block from access with the following:
<pre>&lt;Directory /var/www/gallery/g2data&gt;
    Deny from all
&lt;/Directory&gt;</pre>
</li>
</ul>
<p>For more information on securing Gallery refer to the <a href="http://codex.gallery2.org/Gallery2:Security">Security Guide</a>.</p>
<h4>Troubleshooting</h4>
<p>The thumbnails are not displaying for the albums.</p>
<ul>
<li>To generate thumbnails Gallery2 requires the <a href="http://ca.php.net/gd">GD Library for PHP</a>.  To install the GD Library in Ubuntu:<br />
<code>$ apt-get install php5-gd</code></li>
</ul>


<p>Related posts:<ol><li><a href='http://www.vincentkong.com/2008/08/upgrading-gallery2' rel='bookmark' title='Upgrading Gallery2'>Upgrading Gallery2</a></li>
<li><a href='http://www.vincentkong.com/2007/05/drupal-quickstart-guide' rel='bookmark' title='Drupal Quickstart Guide'>Drupal Quickstart Guide</a></li>
<li><a href='http://www.vincentkong.com/2007/05/mysql-for-ubuntu-quickstart-guide' rel='bookmark' title='MySQL for Ubuntu Quickstart Guide'>MySQL for Ubuntu Quickstart Guide</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.vincentkong.com/2008/06/gallery2-quickstart-guide/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

