Linksys Activity Logger - LAL Web Installation


Home
Project Status/History
Documentation
LAL Logger
Source Installation

Logger Usage
Command Line Options
Temporary PHP Access

LAL Web
Installation
FAQ
Download
Screen Shots
Special Thanks



SourceForge Logo

Installing LAL Web (optional)


LAL Web is a web based, PHP way to display data logged in the database.  This is convenient for remote monitoring, for those not familiar with SQL, etc.  It requires minimum setup and is easy to configure.  However, it is not required to use LAL Logger - only use it if you would like convenient web based access to the data.

Recommendations:  Please make every effort to secure your web server and database.  Limit who can access the server, use SSL, and apply appropriate patches as they are made available.  Some effort has been made to make the application secure, however there is no guarantee that it is perfect.  This project has been done as a personal project, with the average user/home user in mind, not for critical business use.  Updates will be made as appropriate to improve security as time permits and as the application is made more complete.

Requirements

The following items are required in order to install and use LAL Web.  None of the listed items are optional.  Installation and configuration of the listed requirements will not be included here, please refer to the appropriate documentation that comes with that item, or many of the excellent web pages available online.

Web Server:  Any web server capable of supporting PHP should work.  LAL Web has been developed using the Apache web server.

PHP:  LAL Web is a collection of PHP scripts, so PHP is a requirement.  Be sure that a simple PHP page works first before installing LAL Web.  It's easier to configure and test each individual piece before trying to make the whole thing work in one shot.

ADODB:  LAL Web is capable of using different kinds of databases.  In order to be able to use one set of scripts for all supported databases, ADODB is used.  ADODB is a database abstraction layer that allows us to use the same API no matter what database we are using - it handles the specifics to the database being used.

JpGraph:  LAL Web has the ability to create graphs.  In order to use this functionality it is required that you download and install JpGraph.  This is a free (for non-commercial use) graphing library that can produce very good looking charts.  As time permits, LAL Web will gradually take advantage of the capabilities JpGraph provides.  Please take the time to try the sample graphs provided with JpGraph to ensure that everything is properly installed and working.

Installation

Installation of LAL Web itself is easy to do.  Simply follow the steps listed below after downloading the latest version.

1.  Uncompress and untar the downloaded file, which will create a subdirectory containing all of the files the application needs, along with a few other files (documentation, etc.):
gunzip -c lal_web.v0.1.tar.gz | tar xvf -
2.  Copy the '.php' and '.html' files as well as the 'graphics' directory into a location that your web server can access them for display - for Apache this will be in the 'htdocs' subdirectory.  You will probably want to create a a subdirectory to copy all of these files to (we're using 'linksysactivity' in our example):
cd lal_web.v01
cp *.php /opt/apache/htdocs/linksysactivity
cp *.html /opt/apache/htdocs/linksysactivity
cp -r graphics /opt/apache/htdocs/linksysactivity
3.  Edit the top of the 'lalinclude.php' file.  The top portion of this file contains the only items you need to customize for your particular setup.  The section containing configuration settings you must make are clearly marked - do not edit anything else or you may break the application!

adodbPath:  This is the actual, physical path to the ADODB software that you installed.  This is not the path you would use to access it via a web URL.  For example, if the software is installed in '/opt/apache/htdocs/adodb', then you would set this variable equal to that same path.

jpgraphPath:  This is the actual, physical path to the JpGraph software that you installed.  This is not the path you would use to access it via a web URL.  For example if the software is installed in '/opt/apache/htdocs/jpgraph', then you would set this variable equal to that same path.

databaseType:  Uncomment out the appropriate line, and make sure you comment out any unneeded lines in this part.  If you are using an Oracle database, use the 'oci8' line.  If you are using MySQL, use the 'mysql' line.

databaseName:  Set this variable equal to the name of the database to connect to.  If you are using MySQL, the installation instructions used the sample name 'linklogger' - which is what you would use.  If you are using Oracle, use the database alias name as it appears in the tnsnames.ora file (or your $ORACLE_SID environment variable value).

databaseHost:  Uncomment out the appropriate line, and make sure you comment out any unneeded lines in this part.  For oracle, use the '' line (no value).  For MySQL users you will use the 'localhost' line.
4.  That's it!  Try connecting to the web server.  In our example, we would connect to 'http://192.168.1.1/linksysactivity/'.  At this point it should prompt us with a login page, where we can use a database account that has the proper privileges to access our table.  Once you have properly logged in, you will be presented with a new page allowing you to select what you want to do.

Problems

If you experience problems, there are a few things you can do.  First, make sure your web server is functioning properly.  Then make sure simple PHP scripts can run.  After that, make sure that you have installed ADODB and JpGraph properly (try any included samples to make sure they are working).  Next, make sure you have made the proper settings in the 'lalinclude.php' file.  Finally, make sure that the user account you are using has the proper access rights to the LAL Logger database table.