Seminar Installation

These scripts and files are licensed under the bsd license. Please see for more information.

This set of scripts was developed for use in keeping track of our seminar listings. We had a problem in that every department kept track of their own listings separately, and it was difficult to find information about what was going on. These scripts make it easier to keep track of events by keeping everything at one site.

Unfortunately, I originally wrote the script with the idea of just using it at our site. This means that I did not think about documenting the installation until the end. I also did not think about making scripts to help automate the installation. A minimal set of guidelines for installation can be found in the file named "INSTALLATION."

Installation Instructions:

  1. The scripts make use of perl. You will need to install perl as well as some modules. The scripts assume that perl can be found at /usr/bin/perl.
  2. You need to install the following modules:


    The correct way to install the modules depends on what system your are using. For example, to install Date::Calc on FreeBSD you should change to the /usr/ports/devel/p5-Date-Calc directory and type in the following command:
    make install clean

    On some other systems you might use the following command:
    perl -MCPAN -e "install Date::Calc"
  3. You will also have to install mysql. Again, the way to install mysql will depend on what system you are using.
  4. You will also have to install apache.
  5. You will have to decide on a directory to install these files. The directory will be used by apache and the files should be treated as cgi scripts. For example, if you want to put the files in your home cgi-bin directory, you need something like this in one of your apache configuration files:

    <IfModule mod_perl.c>
    <Directory /home/*/public_html/perl>
    SetHandler perl-script
    PerlHandler Apache::PerlRun
    Options -Indexes ExecCGI
    PerlSendHeader On

    You will need to restart your web server after you make changes to the conf files.
    Untar the set of scripts into your chosen directory:

    cd the/directory/youve/chosen
    tar -xzf /location/of/seminar-1.0.tar.gz

    Note that this will include three important subdirectories:

    These subdirectories are used by the scripts and are assumed to be subdirectories of the directory where you choose to put the scripts. You will need to create a database that will be used by the scripts. To do this change to the "mysql" subdirectory. Edit the file createDB.sql. Everywhere you see the string "[USER]" replace it with the user that you want to use to access the database. Everywhere you see the string "[PASSWORD]" replace it with the password that you want to use.

    Once you change the file start up mysql and execute the file:

    source createDB.sql;

    This will create a database called "Seminar" with the given username and password. This database will be accessed by the scripts. You should not see any error messages when you run the script. You now have to configure the database. In the "mysql" directory there is a file called create.sql. Edit the file and make any changes that you think are appropriate for your installation. In particular search for the string "[PRIMARY USER]" and replace it with your email address. The initial password is "bubba" which you should remember. You can change it later from the web pages once it is all set up and working correctly.

    Pay particualr attention to the section defining the genericVariables table. It contains the default variables that are used throughout the pages. You should change the URL's defined in that section to reflect your local situation. (Pay particular attention to the location of your sendmail script which is defined in this section.)

    Be careful about being too cavalier changing other parts of the file. You could accidentally break something!

    When you have the file set up you need to start up mysql using the database that you created in the previous step using the username and password you defined in createDB.sql:

    mysql --user=[USER] --password=[PASSWORD] Seminar

    At the prompt enter the command:

    source create.sql;

    You should not see any error messages.
  6. You will need to edit the file in the main driectory. You will have to specify the username and password for the database. Near the top of the file in a subroutine called "new" there is a variable called $user and $pw. Change these variables to match the values you defined in the file createDB.sql.
  7. At this point everything should be set. Try running display.cgi from the command line. It should work without any problems. If you see an error then it could be

    1. The perl program is not where it thinks it might be, /usr/bin/perl. If not, either change the first line in the file or try creating a symbolic link from the actual location to /usr/bin/perl.
    2. Your mysql database may not be running. Make sure that it has been started.
    3. It cannot connect to the database. Check that mysql is configured to allow a connection. Make sure that the database name, the username, and the passwords are all correct. Make sure that you have the necessary modules.

    Next, try to access the web page. If you are having trouble bringing your web pages up then you could be having trouble with your apache configuration. Check your error log to see what it says. Keep in mind that apache has strict requirements for cgi files user and group ownerships. (See for more information.)

    If you are having difficulties then I am sorry about that. I know how frustrating this can be. You can try to contact me, but this is not my highest priority so you may not get prompt, accurate information from me. Again, I know that is not what you want to hear, but I did not originally plan on making this available.
  8. If everything looks okay it is time to customize your site. The files that are displayed all come from the template directory. The best thing to do is to view the source in your web browser. Each of the files includes comments that indicate the name of the file being used.

    For example, the file used to generate the top of each page is called header.template. It has a comment at the very top of the file:

    <!-- Start template/header.template -->

    and another comment at the bottom:

    <!-- end template/header.template -->

    This way you know the name of the file where the text you are interested in can be found. I tried to keep the html as simple as possible so hopefully this is not too much of a hurdle. Also be aware that I use the HTML::Template module so you should be familiar with it when editing the file. The man pages with HTML::Template are very good, in my opinion of course.

    The only exception to this is the style.css file. It is located in the same place as the scripts. You can edit this file to get the colors and overall feel more to your liking, but I prefer the scarlet and white of dear old Union College!

Creative Commons License
This work is licensed under a Creative Commons Attribution 2.5 License.
Original code developed by Kelly Black. Logo