How to install ZenPhoto on DreamHost: A Guide!

Easy Installation of ZenPhoto on DreamHost
±±±±±±±±

- Log in to DreamHost control panel (do this first, as it takes a few mins to set up)
- Click on goodies -> mysql and create a db
- Whilst in the control panel go to domains -> manage domains, under the web hosting column, click [Edit].
When the page loads tick the box next to PHP5, and click the "Change fully hosted settings now!" button.

The effects will take a few minutes to propagate in your web server (5 to 10 mins). be patient! in the mean time:
- Download the latest version of zenphoto from zenphoto.org and unzip it
- Connect to your webserver
- Create a new folder, such as 'photos' and upload the unzipped files to it
- Go to http://www.yoursiteurl.com/the_folder_you_put_it_in/zen/setup.php to check that everything has been uploaded.

Follow the instructions on the page, whilst also reading these instructions! There are some changes you need to make!
- (1) In your ftp client move to the 'zen' folder and rename config.php.example to config.php
Open the config.php file and edit it, changing the details to their appropriate values, IMPORTANT!:
------
$conf['mysql_host'] = "localhost"; // Probably won't need to change this.
------
as a Dreamhost user, you DO have to change this, as Dreamhost holds the databases on a different server, so therefor change it to database_name.site_name.com
- (2) Change the RewriteBase from '/zp' to '/your_folder_name'
- (3) Change the permissions on the 'albums' and 'cache' folders to 777, as per the instructions
- (4) Refresh the page you had open earlier: http://www.yoursiteurl.com/the_folder_you_put_it_in/zen/setup.php logging in and click 'Go!'

Congratulations, you just got zenphoto working :)

I installed a new copy of ZP to test the installation instructions of my new ZP theme, Stoppeddesign, which you can look at here and download here, enjoy! ;D
«1

Comments

  • Sweet, testing now :-D
  • Still got exactly the same problem...

    I'm at http://www.tonguengroove.co.uk/zenphoto/

    Have changed rewrite base to /zenphoto, chmodded to 777, switched to php5.

    None of the links work and there's no styling at all.... have I missed something stupid :-?
  • Are you using DreamHost? I know your main site is, but DreamHost is American and doesnt host .co.uk (I know because I've looked), you can only point .co.uk's towards them?

    Other than that, not really sure.. to me, it looks like htaccess isnt setup properly?
    have you changed your RewriteBase in the .htaccess to /zenphoto?
  • Yeah I'm hosted with Dreamhost, I've just changed the DNS settings for a domain I registered in the UK....

    My .htaccess is changed, it looks like this:

    `# !!! Change this to the absolute path !!!

    RewriteBase /zenphoto`
  • Really not sure, I tried the guide above again and it worked for me. Maybe its beacause Im installing ZP again on the same account for some reason? Maybe search the forum and see if anyone else has had the same problem?
  • Not sure if it's because I've got 4 domains hosted on my space. Argghh.
  • trisweb Administrator
    In addition to this fix, you may also need to manually change the WEBPATH constant. Put this line somewhere in config.php:

    `define('WEBPATH','/zenphoto')`

    This is a rather dumb bug that might get fixed soon.

    I'm stickying this thread since Dreamhost installations seem to be a common problem.
  • Sweet, define('WEBPATH','/zenphoto') has fixed the problem.

    With the addition of this it is actually a 2 step install.

    Without it it was a a major headache, but seeing as this is a beta that's cool with me :-D
  • trisweb Administrator
    Yep, I knew it... [bonks head on wall for stupid bug]. It'll be fixed soon.
  • dude are you helping program zenphoto?

    big up! it's a nice gallery tool, one of the best, i spent months looking for something that could work as nicely as flickr and i think you're pretty darn close now...
  • I was having a similar problem as 3stripe, as in the gallery would load, but there was no theme, and problem with links, so I added
    define('WEBPATH','/zenphoto')

    And now I have an error
    Parse error: parse error, unexpected T_VARIABLE in /...userroot.../zenphoto/zen/config.php on line 17

    Also, I'm using Zenphoto 1.0.1b if that changes anything. The config.php did say that web_path was no longer needed though.
  • Fixed using help from the path errors thread.
  • I just wanted to thank you for this. I tried to install a few weeks ago and gave up. There was just a few little things that I needed to play around with to get it to work. It's good to note that when you say /zenphoto you mean /name_of_folder_you_created (mine is /gallery for instance). Sounds basic but Dreamhost is the most complicated server I've ever tried to work with.

    Thanks!
  • THANK YOU! - wow... that was almost very frustrating.
  • trisweb Administrator
    Everyone should upgrade to the newest version 1.0.2 if still having problems with dreamhost. Pathing issues should be all but gone :)
  • bensp Member
    amazing, thanks trisweb :)
  • Thanks!
  • First question when trying to fix someone's computer:
    Is it plugged in?

    First question when trying to fix a someone's website:
    Is it hosted by Dreamhost?

    Haha.
  • Sheeeesh! I've done all these things and I still can't get it work. 'Bout ready to give it up. Just because I am a Dreamhost customer this is impossible? Doesn't seem right.

    Do NEED to be running PHP5...
    `When the page loads tick the box next to PHP5..`
    ...to run Zenphoto. I have been with Dreamhost for awhile now and have set up two different pieces of blog software on their servers and have never had this much of a problem.

    (I can't even use the forum tags it seems. I put the "code" in "backticks" but no....) (They mean `stuff you want to look like code`, not actual HTML tags -trisweb)
  • trisweb Administrator
    I've been on dreamhost for some time now as well (had to take advantage of just having that space around) and I actually had NO problems setting up Zenphoto. I don't know what all the fuss is about, frankly.

    The only thing you have to get right is the MySQL configuration, since they use a server that's not localhost. That's ALL I had to do differently.

    I just tried switching to PHP4, and my root album worked fine, but the one at `/zenphoto` had to have its WEBPATH set to `/zenphoto` in zp-config.php.

    So, to recap:

    PHP5 is recommended, and requires only that you use the mysql server url they give you.

    PHP4 Also works (using the same mysql server), but you have to set the WEBPATH constant to the relative path. The SERVERPATH is fine.
  • I have had mixed results on two different Dreamhost accounts with Zenphoto installation. Here's a summary...

    Let's call site 1 "www.something.com" Zenphoto installation worked perfectly. Not a single problem. This site was used as a proof of concept test platform for WordPress/Zenphoto/Zenpress integration.

    Let's call site 2 "www.something.dreamhosters.com" This is where I really want to set things up, however Zenphoto will not install here. WordPress and even Gallery2 (bloatware!) installed without difficulty and could communicate with the database on the server residing at mysql.something.dreamhosters.com.

    The primary problem on Site 2 is that Zenphoto setup keeps showing the "MySQL Error: Could not connect to the database server."

    As far as I can tell, I've tried every possible trick in these forums. The database location, login, and password are clearly listed in the MySQL admin section and entered into the zp-config.php file.

    I'm praying for another fix, because I spent many hours modifying code to make things integrate between these different apps.

    Have I missed something totally obvious or is there a problem with Dreamhost?
  • @DStens

    I'm on Dreamhost, have installed many different test and production Zenphoto environments and have had no problems with any of them. Early on I found I had to apply the path stuff above to get things working, but after 1.0.5, I've had no trouble.

    I have PHP 5 and FastCGI running on mine.

    And when you show the example for "dreamhosters", is this for a subdomain arrangement? I don't think I've ever played with a dreamhost subdomain arrangement before, and I'm not sure how that would be configured. Anybody else have a guess? It may be the database connection in the subdomain is being referenced incorrectly.

    I don't think it's Zenphoto the code. It's probably something in the .htaccess, database setup, or zp-config. Can we see your zp-config maybe - edited for passwords of course?

    ;)
  • OK... I've got PHP5. Just enabled fastcgi. I'll know in a few minutes if that helped.In the meantime, here's the edited mysql part of the zp-config.php file...

    $conf['mysql_user'] = "as_listed_in_DH_manage_mysql_section";
    $conf['mysql_pass'] = "as_listed_in_DH_manage_mysql_section";
    $conf['mysql_host'] = "mysql.something.dreamhosters.com"; // Won't need to change this 90% of the time.
    $conf['mysql_database'] = "zenphoto";

    // If you're sharing the database with other tables, use a prefix to be safe.
    $conf['mysql_prefix'] = "";

    .... and yes I've tried various combinations of the following...

    define('WEBPATH', '/zenphoto');
    define('SERVERPATH', '/home/.nipper/someone/something.dreamhosters.com/zenphoto');

    ....

    Here's a snip from the .htaccess file

    # htaccess file for zenphoto

    # NOTE: Change the RewriteBase below to the absolute path to your zenphoto directory.

    <IfModule mod_rewrite.c>

    RewriteEngine On
  • Solved!

    Earlier I enabled fastcgi, but that didn't seem to help.

    In the Dreamhost Manage mySQL section I created a new user for the zenphoto database and modified the zp-config.php file... a step which was not necessary on Site1 which was mentioned earlier.

    I also recommented the...
    define('WEBPATH', '/zenphoto');
    define('SERVERPATH', ... section and maintained connectivity.

    So that's my observation. Hope this helps someone.
  • After doing all the steps here and having no luck, I found something interesting: My initial MySQL password was one that was case sensitive (had uppercase and lower case) and had special characters (!@#$%^&;*(), and ZenPhoto would not connect to my database... after changing my mysql password to one that did not include either, I was able to login. Not sure if it was case sensitivity or the $ that was in my password, but it works like a champ now that I changed it.
  • Just as a note, these instructions really don't apply to Dreamhost installs of Zenphoto any more. I haven't been using them for months.

    As for the password thing, that may be something Tristan can answer.
  • trisweb Administrator
    Probably the $ sign in the password -- if in a "double-quoted string" PHP looks for variables starting with the dollar sign. Using the password in 'single quotes' would make it work just fine.

    I'll update the default config file to use single quotes.

    And I agree with Craig, Zenphoto seems to install and run normally on dreamhost without any special requirements.

    Though I've only tested on PHP5 recently - their PHP4 install may still have problems.
  • Hmmmm...I am back again. Now with a different problem. When I attempt to upload a set of photos utilizing a ZIP archive I get this error:

    Fatal error: Call to undefined function zip_open() in /home/.catilda/dan_imal/ohdanny.net/photo/zen/functions.php on line 166
  • trisweb Administrator
    And this is on Dreamhost? Seems they don't have the zip library for PHP. You can search for 'zip' on the forums, others have been able to replace it with a PHP version.
  • Tis true. No ZIP library on Dreamhost.

    Their reply to weather or not they have it:

    This is correct. We do not have the zip library installed for php as we
    run a very streamlined php installation on shared hosting servers such as
    the one you are on. If you like you can install your own custom php build
    and include libraries/modules/extensions not available in the DreamHost
    provided build. This page explains how:

    http://wiki.dreamhost.com/index.php/Installing_PHP5


    I will have to have a look at the forums and at the page indicated in their email and give it a go myself.
Sign In or Register to comment.