These are some install instructions for the UNL Event Publisher. I used the information on google code, and a LOT of help from Brett Bieber.

A little history. I work for The University of Montana and we are in the market for a new calendaring system. We wanted something that supported multiple calendars as well as the ability for someone managing one of the other calendars to be able to ‘promote’ events to the main calendar, upon approval of the main calendar manager. I’m installing this on Red Hat, but I have installed it before on Fedora 10.

PEAR

Install pear, I installed php-pear-1.4.9-4.el5.1.noarch

you should now be able to run the command ‘pear list’ to get a list of installed packages.

pear list

 

We need to set pear to accept packages marked as ‘beta’

pear config-set preferred_state beta

 

upgrade all of the packages in pear

sudo pear upgrade-all

 

‘discover’ the pear repositories

sudo pear channel-discover phpsavant.com

sudo pear channel-discover pear.unl.edu

 

install the mysql driver. This may be done already but it never hurts to make sure

sudo pear install MDB2_Driver_mysqli

 

install the calendaring application I got warnings about deprecated packages and ‘Failed to download pear/XML_DTD’ but things seemed to work ok.

sudo pear install --alldeps unl/UNL_EventPublisher

Application Setup

Create the mysql database at this point, you will need it for the next step.

 

pear run-scripts unl/UNL_UCBCN

  • I changed database options 2, 3 and 4 and left 1 and 5 as is.

 

pear run-scripts unl/UNL_UCBCN_Manager

  • I left the first bunch (1-3) of options as is
  • In the second bunch (1-2) I changed
    1. /var/www/html/manager – note that this is NOT the root of the webspace, it’s a folder in it (manager)
  • In the third bunch (1-3) I changed all.
    1. mysqli://<username>:<password>@localhost/<database>
    2. UMT Events
    3. umtevents

 

pear run-scripts unl/UNL_UCBCN_Frontend

  • In the first group (1-2) I left all options as is
  • In the second group (1-2) I changed both options
    1. /var/www/html – note that this IS the root of the webspace.
    2. vanilla

 

The next thing we need to do is download the template

cd /path/to/webroot/
mkdir ucomm
cd ucomm
wget ftp://wdn:1869@ucommdev.unl.edu/templatedependents.zip
unzip templatedependents.zip
rm templatedependents.zip

Cleanup

both times I installed the calendar I got this error when I tried to view it in the browser:

 

DB_DataObject Error: Connect failed, turn on debugging to 5 see why

I edited the index.php file at the root of the webspace and fixed the dsn and it fixed the problem, you will have to do this with manager/index.php as well.

 

Next I had to fix the privs in root of my webspace to give apache privs

chmod -R 775 /path/to/webroot/
chown -R :apache /path/to/webroot/

Authentication

We Use the Central Authenication Service (CAS) and there are two pieces that are needed to make it work.

  1. I have installed phpcas by downloading it and extracting it in the include path (Ubuntu is usually something like /usr/share/php/, Red hat is something like /usr/share/pear/)
  2. With Brett’s help i was able to create a pear package that has all of the CAS details for our server. you can download it and extract it to the same include path

The last step is to make the /manager/index.php actually use CAS replace the lines as follows


require_once ‘Auth.php’; //remove and replace with
require_once ‘UMT/Auth.php’;

$a = new Auth(‘DB’,array(‘dsn’=>’mysql://eventcal:eventcal@localhost/eventcal’),null,false); //remove and replace with
$a = UMT_Auth::PEARFactory(‘CAS’);

At this point I got an error and fixed it by installing php-xml-5.1.6-23.el5.i386

Fatal error: Class ‘DOMDocument’ not found in /usr/share/pear/CAS/domxml-php4-php5.php on line 60

Application Configuration

You will need an .htaccess file to make the url’s pretty and the shortnames work. you can go to the google code wiki page UNL_UCBCN_Frontend to find an example, you will need mod_rewrite to make these work.

I also edited the template files by replacing ‘@TEMPLATE@’ with <?php echo $this->template; ?> this will automatically fill in the path to some of the CSS & JS.

There are a handful of helpful CLI scripts that need to be checked out from their home on to do this go to your home directory (or where ever you want to put them) and run this:

svn checkout http://unl-event-publisher.googlecode.com/svn/UNL_UCBCN/trunk/scripts/ scripts

You will need to do at least one thing before you dive right in. First edit the file addSponsor.php and update the dsn to point at your database, i also had to change mysql:// to mysqli://. (it might not be a terrible idea to update all of them right away.) After the file is edited from the command line run: I used “The University Of Montana” as our default sponsor.

php addSponsor.php “Sponsor Name”

Helpful Links