The following instructions are specifically for installing Gallery 1.4.1 on a website hosted on a shared server at DreamHost. I created the original instructions from notes I took during a somewhat bumpy 1.3.3 install. If you follow these streamlined and updated notes that contain my many "lessons learned", your install should be much smoother than my first install.
I recently did a multisite install of Gallery2. Gallery2 comes with a very nice install wizard that does most of the installation work for you. I definitely recommend using Gallery 2 over 1.x, if you have a choice. There were a few subtleties in getting the instal to work the way I wanted, so I will try to write up my Gallery2 notes when I get a chance.
If you notice an error or missing info, I would appreciate it if you would let me know at robert AT wombatnation DOT com.
One very good piece of news for DreamHost clients is that Gallery releases starting with version support the version of ImageMagick that is installed on DreamHost servers. That will save you from having to mess with NetPBM.
Any text in bold should be replaced with your specific website domain name, user name, password, filenames, etc.
These notes used to have instructions for installing jhead. It should now already be installed on all DreamHost shared servers.
cd domainname.com
mkdir albums
(I chose to put the albums dir outside of the gallery dir)chmod 775 albums
tar -zxf gallery-1.x.x.tar.gz
(Using the appropriate version numbers in the filename)ls gallery
" to list the directory contents and verify that a directory
called gallery was created under the root of the website
and was populated with seemingly appropriate files and directoriescd gallery
mkdir tmp
(I chose to put the tmp dir inside the gallery dir)chmod 777 tmp
sh configure.sh
If everything went smoothly, you should see:
You are now in setup mode, which is *INSECURE*. Your Gallery installation can be configured by pointing your web browser to the URL to 'setup' in this directory. When you are done with your installation, don't forget to run the secure.sh script! % sh secure.sh
I used http://domainname.com/gallery/setup/phpinfo.php to determine that my DreamHost server had Apache 1.3.27 and PHP 4.3.5 installed at the time. This URL is accessible only when you have Gallery in setup mode.
Below are the required steps. You may also want to adjust some of the other settings at the same time. If this is your first time to install Gallery, I recommend sticking with just the required changes during the first pass. You can easily come back and change the other settings after you have gotten a basic Gallery install up and running.
More of the "Warning: exec() has been disabled for security reasons in ..." lines may appear. Or, you may see lines like:
Error: albumDir: /home/username/domainname.com/albums exists, but is not writeable by the webserver user. Try:Go to the gallery directory in an ssh client and add to the end of the gallery/.htaccess file the following line:
AddType php-cgi .php
Here are some simplified instructions for editing this file with the Emacs editor from within the gallery directory.
emacs .htaccess
AddType php-cgi .php
That should get rid of the exec() warnings. However, it may cause two more warnings (Apache ignoring .htaccess and magic quotes enabled) to appear on the system check page if you go back to it.
AddType php-cgi .php
to the end of the .htaccess file after
the lines that Gallery addedsh secure.sh
Everytime you re-run the configuration wizard on a version of Gallery older than 1.4, you will need to:
AddType php-cgi .php
" line to .htaccess after saving the config changesAll these issues were fixed when I upgraded to version 1.4. All you need to remember is to
run sh configure.sh
to put Gallery in setup mode and then run sh secure.sh
when you are done.
However, a fellow DreamHoster reported that she still had to add back the "AddType" line to .htaccess when she installed 1.4.1, so I recommend that you check the .htaccess file contents to be sure they're correct.
If you see the following error:
Warning: fopen(".../albums/an_album_name/album.dat.lock","a+")this means that one or more files or directories in your albums directory were somehow made to be non-writeable. You can fix this with:
chmod -R 775 /home/username/domainname.com/albums
If you see an error message like:
Warning: open(/tmp/sess_429f50b0887ae0f19e4a078a53f87565, O_RDWR) failed: Permission denied (13) in /home/.blah/username/domainname.com/gallery/session.php on line 51you have a stale PHPSESSID cookie. You need to delete it. If you use Mozilla for your web browser:
If you use Mozilla Firefox:
If you unfortunately still use Internet Explorer, bring up the Internet Options window, select the Privacy tab, click Edit..., scroll down until you find the cookies for your website, select the PHPSESSID cookie for your site, click Remove, and then download either the Mozilla web browser or Mozilla Firefox. You'll be happy you did.