php

A collection of PHP scripts for OpenSSO

Before I get too far away from this code, I wanted to present my examples related to PHP and OpenSSO in a more logical order than the way in which I originally posted them. To that end, here is my collection of PHP/OpenSSO tutorials, showing how a PHP application can manually interact with an OpenSSO server in a single sign-on, identity-management world:

The PHP "headers already sent" error message

Still in my early days working with PHP, I've learned that it's really easy to generate the dreaded "headers already sent" error message. If for some reason you actually want to generate this error message intentionally, I've learned that all you have to do is try to send HTML body content (any non-header content) before calling the header() or setcookie() methods, and you'll get that PHP error message right away.

PHP redirect - How to send a redirect with PHP

PHP redirection FAQ: How can I redirect a user in a PHP script?

I've been working with OpenSSO a lot lately (Sun's open source identity management product), and one thing you see right away is that they redirect the user's browser a lot during the login process. During a typical login process a user will attempt to access a protected page; an OpenSSO agent will redirect the user's browser to the OpenSSO login page; and after a successful login they redirect you back to the protected resource.

The link popularity of OpenSSO, WebSeal, and web tools

I've been working on a single sign-on project lately, evaluating both OpenSSO and IBM's trio of TIM, TAM, and WebSeal, and I noticed that Google has only 32,000 links to real WebSeal resources. By contrast, even as a young open source project, OpenSSO already has over 100,000 links.

Out of curiosity, I decided to google a variety of web languages and tools, and here are my search results:

OpenSSO and PHP - A simple PHP script to retrieve OpenSSO identity information

Here's a simple PHP program I wrote to test how PHP works with OpenSSO, specifically how it works with OpenSSO identity information.

I saved this file with the name info.php, then put it in a directory on my Apache web server that is protected by an OpenSSO login policy. To access this page, I enter the URL for the page in my browser and try to access it, with the URL being something like this:

Is there a package manager for PHP?

PHP FAQ: Is there a package manager for PHP?

Answer: Yes, PEAR (the PHP Extension and Application Repository) is what you need. As the website describes it, "PEAR is a framework and distribution system for reusable PHP components."

Here's an example of how I used PEAR to install the HTTP_Request library, showing both what I typed, and the output from PEAR as it performed the installation.

Syndicate content