Miscellaneous
  Home arrow Miscellaneous arrow Page 4 - Uma Getting Started Guide
Codewalker Forums 
  Tutorials  
Database Articles  
Miscellaneous  
Navigation Usability  
PEAR Articles  
Programming Basics  
Server Administration  
XML Tutorials  
  Reviews  
Database Book Reviews  
Linux Book Reviews  
Miscellaneous Reviews  
PHP Book Reviews  
PHP Software Reviews  
Server Admin Reviews  
SQL Tool Reviews  
  Code Gallery  
Content Management Code  
Contest Code  
Counters Code  
Database Code  
Date Time Code  
Discussion Board Code  
Email Code  
File Manipulation Code  
GUI Code  
Link Farm Code  
Miscellaneous Code  
Search Code  
Site Navigation Code  
User Management Code  
Forums Sitemap 
Download TestComplete 
JMSL Numerical Library 
IBM® developerWorks
Weekly Newsletter 
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
MISCELLANEOUS

Uma Getting Started Guide
By: Codewalkers
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 5 stars5 stars5 stars5 stars5 stars / 1
    2002-09-24

    Table of Contents:
  • Uma Getting Started Guide
  • What is Uma
  • Installation
  • Implementation
  • Services
  • Permissions
  • Conclusion

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT


    Uma Getting Started Guide - Implementation


    (Page 4 of 7 )

    Plugging Uma into your site is pretty easy, and it gets easier all the time. You need to have the following files in your PHP include path: Connection.class.php, DataObject.class.php, Utils.class.php, Uma.inc.php, config.php and authenticator.php. I suggest placing all of these files, other than the authenticator.php, outside of your web server's document root.

    Connection.class.php - Handles all MySQL PHP function calls.

    DataObject.class.php - Provides the common interface for database abstraction. Extends Connection.class.php.

    Uma.inc.php - provides all the classes that Uma needs to do its job. All of the classes extend DataObject. You have to include this file for any page that you wish to protect with Uma, or any page that you wish to have access to Uma's objects or session data.

    config.php - Provides all of the configuration options for Uma like database connection parameters, e-mail address for errors, text for error messages, etc. Dig around in here and become familiar with the configuration settings.

    authenticator.php - Include this file in any page you wish to protect with a Uma login. If the user is not authenticated, this file loads the login page. This is where you set the $permissionLevel required to access the page and the $serviceId corresponding the 'id' column of the service associated with this page.

    You will also need to have a login.php file that provides the login page. You can start by using the files I have included in the admin directory. Grab the login.php and the login.html.php and just modify the login.html.php file to give it your site's look and feel.

    You should take notice of the file called mepath.php. I use this file to set the location of my Uma files. If you look at index.php in the admin directory, you will see what I am doing.

    There is a line that looks like this:

    ini_set('include_path', @current(file('mepath.php')));

    This technique keeps me from having to hardcode the include_path in multiple files. Why not just edit the php.ini file? Often times I don't have access to modify the php.ini file. This is the best solution I have found so far to deal with the include path settings. I recommend using the mepath.php file, but you are free to set your include_path any way you chose.

    Although these files aren't necessarily required, you should have a loginerr.php and error.php file in case something bad happens, the user has some place to land. You can do some reporting and logging in the loginerr.php file. When getting started, copy the files I have in the admin directory.

    More Miscellaneous Articles
    More By Codewalkers


     

    MISCELLANEOUS ARTICLES

    - Stopping CSRF Attacks in Your PHP Applicatio...
    - Quick and Dirty AJAX Tutorial
    - Flickr Puzzle Mashup
    - The PAVISE of Security
    - Creating a CAPTCHA with PHP
    - Sending SMS Thru HTTP
    - The Postal Fix - Part 2
    - Adding Mail with Exim
    - The Postal Fix - Part 1
    - Create Your Own Custom API
    - Adding Drop Shadows with PHP
    - Writing a Basic Authentication System in PHP
    - Overlapping Images with GD
    - Using Sockets in PHP
    - Dynamic CSS with PHP





    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway
    Stay green...Green IT