1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121
|
<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Upgrading a Previous Gallery Installation</title><meta name="generator" content="DocBook XSL Stylesheets V1.64.1"><link rel="home" href="index.html" title="Gallery Manual"><link rel="up" href="gallery1-install.html" title="Chapter1.Gallery 1.x Installation Guide"><link rel="previous" href="gallery1-install.windows-iis.html" title="Installing on a Windows Server (IIS)"><link rel="next" href="gallery1-install.help.html" title="Getting Additional Help"><link rel="stylesheet" href="html.css"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Upgrading a Previous Gallery Installation</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="gallery1-install.windows-iis.html">Prev</a></td><th width="60%" align="center">Chapter1.Gallery 1.x Installation Guide</th><td width="20%" align="right"><a accesskey="n" href="gallery1-install.help.html">Next</a></td></tr></table><hr></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="gallery1-install.upgrade"></a>Upgrading a Previous Gallery Installation</h2></div></div><div></div></div><div class="toc"><dl><dt><span class="sect2"><a href="gallery1-install.upgrade.html#gallery1-install.upgrade.shell">Upgrading with Shell Access</a></span></dt><dt><span class="sect2"><a href="gallery1-install.upgrade.html#gallery1-install.upgrade.ftp">Upgrading Gallery with FTP</a></span></dt><dt><span class="sect2"><a href="gallery1-install.upgrade.html#gallery1-install.upgrade.modified">Upgrading a modified Gallery</a></span></dt></dl></div><p>
This sections describes how to upgrade your Gallery from an old version to
a new one. Upgrading is very easy, and you won't loose any data if you
follow all the directions.
</p><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="gallery1-install.upgrade.shell"></a>Upgrading with Shell Access</h3></div></div><div></div></div><div class="orderedlist"><ol type="1"><li><p>
<span class="emphasis"><em>Put your Gallery into configuration mode</em></span>.
This is very important. If you don't do this, then you won't be
able to back up your existing setup directory or install the new
setup code on top of it.
</p><pre class="screen">
cd gallery
sh configure.sh (or configure.bat for Windows)
</pre><p>
</p></li><li><p>
Make a backup of your old Gallery installation. The easiest way to do
this is to use the <span><b class="command">tar</b></span> command.
</p><pre class="screen">
tar -cz gallery > gallery-backup.tar.gz
</pre><p>
On Windows, use something like WinZip to create an archive of your Gallery
directory.
</p></li><li><p>
Download Gallery from the <a href="http://sourceforge.net/project/showfiles.php?group_id=7130" target="_top">
Gallery SF.net Download Page</a>. Put the tarball in your gallery directory's
parent directory.
</p></li><li><p>
Untar the new Gallery version over the old one.
</p><pre class="screen">
tar -xvzf gallery-1.x.x.tar.gz
[list of new files]
</pre><p>
Windows users: use WinZip to extract Gallery over the old installation
</p></li><li><p>
Re-run the <a href="gallery1-install.config-wizard.html" title="The Configuration Wizard">configuration
wizard</a>. Afterward, put Gallery back into secure mode, as described
in that guide.
</p></li><li><p>
Some upgrades include changes to the Gallery data formats and
require you to upgrade all of your albums. You can either let
this happen automatically the first time somebody views the
album, or you can upgrade the albums yourself when logged in as
an admin. If you want to upgrade them all, open
</p><div class="blockquote"><blockquote class="blockquote"><p>
http://www.example.com/gallery/upgrade_album.php
</p></blockquote></div><p>
in your web browser (use the real url to your Gallery, of course)
and then follow the instructions you find there.
</p></li><li><p>
Enjoy your upgraded Gallery!
</p></li></ol></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="gallery1-install.upgrade.ftp"></a>Upgrading Gallery with FTP</h3></div></div><div></div></div><div class="orderedlist"><ol type="1"><li><p>
<span class="emphasis"><em>Put your Gallery into configuration mode</em></span>.
This is very important. If you don't do this, then you won't be
able to back up your existing setup directory or install the new
setup code on top of it. Do this by chmodding <tt class="filename">.htaccess</tt>
and <tt class="filename">config.php</tt> 0777 and by chmodding the
<tt class="filename">setup/</tt> directory 0755.
</p></li><li><p>
Make a backup copy of your Gallery directory. Use your FTP client to download
the old Gallery directory, just in case
</p></li><li><p>
Download Gallery from the <a href="http://sourceforge.net/project/showfiles.php?group_id=7130" target="_top">
Gallery SF.net Download Page</a>. Untar it using <span><b class="command">tar</b></span>
or WinZip on your computer.
</p></li><li><p>
Using your FTP client, upload the new Gallery files over the old Gallery files.
Yes, this will override the old Gallery files, but this is OK!
</p></li><li><p>
Re-run the <a href="gallery1-install.config-wizard.html" title="The Configuration Wizard">configuration
wizard</a>. Afterward, put Gallery back into secure mode, as described
in that guide.
</p></li><li><p>
Some upgrades include changes to the Gallery data formats and
require you to upgrade all of your albums. You can either let
this happen automatically the first time somebody views the
album, or you can upgrade the albums yourself when logged in as
an admin. If you want to upgrade them all, open
</p><div class="blockquote"><blockquote class="blockquote"><p>
http://www.example.com/gallery/upgrade_album.php
</p></blockquote></div><p>
in your web browser (use the real url to your Gallery, of course)
and then follow the instructions you find there.
</p></li><li><p>
Enjoy your upgraded Gallery!
</p></li></ol></div><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>
If after you upgrade your Gallery, you get a blank screen or a PHP error
(e.g. "function not found", etc...), don't panic. Your FTP client probably
didn't override all the files. The solution is to delete all the Gallery
files except <tt class="filename">config.php</tt> and your albums directory and re-upload Gallery
(don't forget to re-run the configuration wizard).
</p></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="gallery1-install.upgrade.modified"></a>Upgrading a modified Gallery</h3></div></div><div></div></div><p>
Upgrading a Gallery installation you have modified can be difficult. By modified,
we mean modifying the actual PHP code Gallery runs on. If you just made changes
in the <tt class="filename">html_wrap/</tt> or <tt class="filename">css/</tt> directories,
you should have no worries (you should have removed the .default extension from
the files before modifying them, so that they won't get overridden when upgrading) and
can proceed upgrading Gallery using one of the guides above.
</p><p>
If you indeed have modified some of the PHP code that Gallery uses, upgrading will
be more difficult, but not totally impossible. It will be, however, extremely hard
or impossible to upgrade a modified Gallery without shell access to the server. Keep
this in mind. First, you'll need to download the original non-modified Gallery version
that corresponds to the version you are currently using (i.e. if you modified Gallery 1.3.4,
re-download an unmodified Gallery 1.3.4). Unpack it in the same directory that your modified
Gallery is in, but name is something like <tt class="filename">orig_gallery/</tt>. You should now
have two directories, <tt class="filename">gallery/</tt> (or whatever your modified Gallery's directory
name is) and <tt class="filename">orig_gallery/</tt>. Next, run this command:
</p><pre class="screen">
diff -r -C 3 orig_gallery gallery > changes.txt
</pre><p>
</p><p>
You now have a patch file containing the changes you made. Next, download the newest version
of Gallery (the one you want to upgrade to). "cd" to the parent directory of the new unpacked
Gallery. Run this command:
</p><pre class="screen">
patch < changes.txt
</pre><p>
</p><div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Warning</h3><p>
The odds are that this won't completely work, because we may have made changes to the same
line you changed, causing <span><b class="command">patch</b></span> to get confused. However, it's worth
a try.
</p></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="gallery1-install.windows-iis.html">Prev</a></td><td width="20%" align="center"><a accesskey="u" href="gallery1-install.html">Up</a></td><td width="40%" align="right"><a accesskey="n" href="gallery1-install.help.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Installing on a Windows Server (IIS)</td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top">Getting Additional Help</td></tr></table></div></body></html>
|