Fixed!
2010-12-25 @ 23:21:24
Looks like I fixed the PHP code on my website just in time to get a post in for 2010.
Post of the Year
2009-12-09 @ 23:12:37
Whoa, 2009 is almost over and I haven't posted a single thing.
Hey
2008-02-03 @ 15:01:48
This update thing still works.
Summary of Cubs Opening Day
2007-04-11 @ 21:42:44
I got snow in my nachos and they lost.
New Job!
2007-03-16 @ 11:47:55
I guess I have a new job now. I start the 26th.
Gift Wrapping Lesson 1: DVD
2006-12-03 @ 16:38:27
First, find a nice clean area to begin wrapping your gift. I am using the floor of my room.
image1
Find the wrapping paper of your choice and your favorite roll of duct tape, proceed to wrap the gift in its first layer.
image2
Next, we use a piece of bubble wrap along with clear packaging tape, not duct tape, since we don't want to hide the pretty bubbles. This is to make sure the gift is not damaged. Many people are sneaky and like to shake their gifts before Christmas to try to determine what's inside.
image3
image4
The next step is to place the gift into a suitable box. This is also a good time to get rid of random garbage laying around in your room. I've added some plastic and random papers. Think of these as bonus gifts or getting someone else to throw away your trash.
image5
And place the gift inside.
image6
It would be a shame if the package accidentally opened before Christmas. Get your duct tape and properly secure the package.
image7
image8
Next, we neatly cut a sheet of wrapping paper for the beautiful outer layer.
image9
Just 2 hours later, a beautiful, professional looking, wrapped present. Someone is going to be awfully happy!
image10
The final touch, a custom, hand created gift tag.
image11
Basic Security with the Zend Framework
2006-04-01 @ 17:42:31
I have a "secret project" that I'm working on. I'm being cutting edge and using the new Zend Framework. One thing I needed to figure out was an easy way to add some security to the admin portion of the site. As far as I know, the Zend Framework does not currently provide this functionality built in. The method I'm using (someone who knows more about security might say this is completely wrong, feel free to tell me why this is no good...) is to create my own Controller object. Any of the controllers in my project that I want to be secure such as the 'AdminController' will extend my custom Security Controller.

abstract class Security_Controller_Action extends Zend_Controller_Action 
{
    protected $filterPost;
    protected $view;
        
    function __construct() 
    {
        // generic stuff used in all my controllers
        $this->filterPost = new Zend_InputFilter($_POST);
        $this->view = new Zend_View();
        
        // check if the user has sent authentication values
        if( !isset( $_SERVER['PHP_AUTH_USER'] ) )
        {
           // they havent. so ask them to, or reject them if they hit cancel
           header('WWW-Authenticate: Basic realm="MySite"');
           header('HTTP/1.0 401 Unauthorized');
           echo 'Please go away. Thanks.';
           exit;
        }
        else 
        {
            // the user has sent authentication values, so
            // check the username and password sent in with stored
            // values in a database or hardcoded values in this case
            if( $_SERVER['PHP_AUTH_USER'] != "user" || $_SERVER['PHP_AUTH_PW'] != "pass" )
            {
                header('HTTP/1.0 401 Unauthorized');
                echo 'Please go away. Thanks.';
                exit;
            }
        }
    }
}

and then for any of your 'secure' sections, have the Controller extend the Security_Controller_Action class.

Zend::loadClass('Security_Controller_Action');
Zend::loadClass('Zend_View');

class AdminController extends Security_Controller_Action 
{

}


Fatal error: Call to undefined function session_is_registered() in /virtual/users/e11095-11687/web/counter.php on line 12