Zenphoto

From SME Server
Jump to navigationJump to search
Edit-find-replace.png Not reviewed:
This howto or contrib has not been reviewed and might contain code that could harm your installation. For more information on the review process have a look at the Development Review page.


ZenPhoto

I recently looked for a simple photo gallery and stumpled across ZenPhoto whcih seemed a nice replacement for the abandoned https://wiki.contribs.org/Gallery3

http://www.zenphoto.org/

https://github.com/zenphoto/zenphoto

It was a simple install and easy to use.

Installation

First a few dependencies are required but note that ImageMagick on CentOS 6 is too old so you can just get along with the gd library

For GD support

yum --enablerepo=epel install php-gd


Important.png Note:
For ImageMagick you need ImageMagick php-pecl-imagick but the versions in EPEL are not modern enough.

I believe you can install the latest version using the remi repo - https://wiki.contribs.org/Remi but you may need to use SCL and upgrade PHP to v 5.4 but I have not tested this. ImageMagick can then be enabled in the admin panel later.


OK, now we need to create an install directory, download zenphoto and untar (or clone it from git)

Before you run the installer I suggest you create a DB and user with phpmyadmin - easier than trying to do it in ZenPhoto

You may need some of the following to aid install

OpenBase/TmpDir issues

db accounts setprop {youribay} PHPBaseDir /home/e-smith/files/ibays/{youribay}/html/:/tmp/
db accounts setprop {youribay} PHPUploadDir /home/e-smith/files/ibays/{youribay}/html/tmp/
db accounts show {youribay}

PHPBaseDir=/home/e-smith/files/ibays/{youribay}/html/:/tmp/ PHPUploadDir=/home/e-smith/files/ibays/{youribay}/html/tmp/

signal-event ibay-modify

You may want to upload the file limits - I used something like this

config setprop php PostMaxSize 100M
config setprop php UploadMaxFilesize 15M
config setprop php MaxExecutionTime 180
expand-template /etc/php.ini
service httpd-e-smith restart


config show php
php=service
   AllowUrlFopen=Off
   MaxExecutionTime=180
   MemoryLimit=256M
   PostMaxSize=100M
   UploadMaxFilesize=15M
   status=enabled

Make sure the directory is at least www:shared

Run setup and follow the instructions.

Usage

Admin

Login to the admin page

If you installed direct to your Primary ibay:

https://{yourserver.com}/zp-core/admin.php

Add in required plugins - note the more you install the more likely things will break !

If you have installed ImageMagick then enable it in Options, Images.

General

There are two types of album. Standard and Dynamic.

Standard allows uploads via the web interface

Dynamic allows uploads via ftp to a directory and the system will automatically manage them


Notes

Install letsencrypt and make the site https only

I could not seem to get the mod rewrite to work correctly