2011年8月31日星期三

Community News: Latest Releases from PHPClasses.org

Chris Jones' Blog: PHP 5.3.8 RPMs are on oss.oracle.com


Chris Jones has posted a quick note to his blog today about some new PHP packages that are available from Oracle of 5.3.8 (RPM) with one of the latest OCI8 extensions already included.



I've built PHP 5.3.8 RPM packages with various common extensions (and the latest OCI8 1.4.6) for Linux x64. They are downloadable at oss.oracle.com/projects/php/. These binaries might be useful for quick testing. They are unsupported.


He points to packages on the ULN site if you're looking for something a bit more stable. The OCI 1.4.6 version of the extension includes a few new features but was mostly a test suite update.

Liip Blog: 2-Step Verification with Google Authenticator and PHP


On the Liip blog there's a recent post talking about a tool Google offers to help you authenticate your users, a one-time passcode generator called Google Authenticator. The post talks about a PHP port of the same idea.



The main point about 2-step verification is that something else than your computer provides that token. If it's on your computer and that one gets stolen (or hacked into), it won't help much for the additional security. That's why you need a second device for those tokens. Some banks do that with SMS/Text Messages (Facebook, too), other give you special devices for that (eg. RSA keys) and the last group does it with your smartphone.


At the request of a client, they created a tool that did just this, but for PHP. As a result, they created the GoogleAuthenticator library that makes it easy to implement in your application. There's even an example of it in use. For more information about the Google Authenticator tool, see this page on Google Code.

Tutorialzine.com: AJAX-enabled Sticky Notes With PHP & jQuery


On the Tutorialzine.com site there's an interesting (though a bit older) tutorial showing you how to combine jQuery, PHP and some CSS+HTML to make a simple sticky note application complete with multiple note support and drag-and-drop abilities.



Today we are making an AJAX-enabled Sticky Note management system. It will give visitors the ability to create notes with a live preview, and move them around on the screen. Every movement is going to be sent to the back-end via AJAX and saved in the database.


They use the fancybox plugin for jQuery to make creating the notes a lot simpler. Included in the tutorial is all of the HTML, CSS, javascript and PHP you'll need to create the application (as well as plenty of description along the way). You can see a demo of it in action here or just download the source and dive right in.

2011年8月30日星期二

Community News: Latest PECL Releases for 08.30.2011

Latest PECL Releases:

Lorna Mitchell' Blog: PHP OAuth Provider: Access Tokens


Lorna Mitchell has posted the latest in her look at OAuth in PHP to her blog today, an introduction to access tokens - generating and handling them in your application.



I've been working with OAuth, as a provider and consumer, and there isn't a lot of documentation around it for PHP at the moment so I thought I'd share my experience in this series of articles. [...] This entry follows on from the ones about the initial requirements, how to how to handle request tokens, and authenticating users.


In this latest post, she talks about the three different types of tokens - consumer, request and verififier - and how to use them to locate a user in your app's users. Her code validates the request token and verifier against the database and, if successful, inserts the rest of the token information for the user.

Alessandro Nadalin's Blog: Behaviour what?


In a recent post to his blog Alessandro Nadalin looks at a different approach to development than the usual code-first, ask questions later style, behavior-driven development, and a tool that can help you follow this method - Behat.



Although this requirement is not mandatory, BDD's power is leveraged by using stories. It basically assumes that instead of focusing on tests, we should start our development process writing down a story that a parser can translate into a test (a customer cares about features, not tests) a programmer can implement in order to verify that our software respects that story.


He talks about installing Behat via PEAR, how it can integrate with Symfony (1.4) and an example of a sample story/test file that checks a few things against a basic page. He also points out an interesting and quite useful feature of Behat - outputting the tests in a HTML-formatted result that makes for easy reading by non-developers.