Archive for August 9th, 2006
PHP Developer - August 9th, 2006
Permissions in Unix-based systems have become one of the standard models for development all over the world. They’re simple to learn and use while being extremely powerful at the same time. In this new article from PHPBuilder.com today, they bring this power to the realm of PHP with bitmasks.
Bitmasking is a very useful method to emulate Unix-style file permissions (read/write/execute for example). What’s nice about a PHP implementation is that you can configure your own bitmasks and use them for any kind of permissions in your scripts and applications. The implementation is relatively simple as well.
They start by defining a few of the permission levels (add/delete/denied) in PHP constants before showing the bitMask() function you can use to check a user’s permissions. They also include some simple pseudo-code to show how it’s used. For more information, check out the complete article here.
Continue Reading ·
PHP Developer - August 9th, 2006
On PHPHacks.com, there’s a new tutorial that covers a a use for PHP that’s not utilized nearly enough - working with it on the command line, shell scripting.
As most of us already know, PHP is the best language for developing dynamic web pages available today. Not many people are aware that it can be used as a shell scripting language as well. While PHP as a shell script isn’t as robust as Bash or Perl it does have definite advantages, especially if you’re like me and are more proficient in PHP than you are in Perl.
The requirements for using PHP as a shell language is that you must compile PHP as a CGI binary instead of as an Apache module. There are certain security issues related to this so please refer to the PHP Manual when doing so.
The author shows a simple example first, just outputting information. He also demonstrates how to grab the input parameters and how to read in from the command line interactively (both single lines and multiple).
Continue Reading ·
PHP Developer - August 9th, 2006
On the ThinkPHP blog today, there’s a new post that looks at using the Selenium Javascript library to test your applications, ensuring that the input methods are all up to snuff.
Testing software whilst ongoing development seems to be a boring job containing a lot of reoccurring tasks. As a reaction on all this effects we need to add more testing. So what do we do? We use a person to click through the application, using its features as he or she thinks they are intended to use.
In the end we need another expert in the team for a boring reoccurring task, finding bugs that are easy to find and most times, simple to resolve. Did i say simple task, reoccurring? Why not use a Software for the click-around testing in our application to check if it still does what it needs to do ?
The testing tool of choice for them is Selenium, a Javascript library to perform the clicks and put into input fields data to check your application’s functionality. They describe the three kinds of test suites (links to their descriptions) and show what a simple automated test would look like. There’s even a link to a tutorial from IBM on the topic.
They step through the process of creating the test (no code) and show how to store them in CVS (as well as talk about a few “dirty tricks” they found out along the way).
Continue Reading ·
Dev Shed - August 9th, 2006
Has your career as PHP developer led you to learn more about the most popular design patterns If it has then this series may help you get a better grounding in them. Welcome to the second installment of the series Introducing Visitor Objects in PHP 5. Made up of three articles this series introduces the key points of how to apply the visitor pattern in PHP and emphasizes the practical side of the topic by walking you though copious hands-on examples….
(Advertisement) Protect your software for the entire lifecycle. Only Unified Software Protection from SafeNet gives you complete security from the development stage through fast and flexible licensing, to distribution and beyond. Lock down your software– click for a free whitepaper on securing software revenue.
Continue Reading ·
PHP Developer - August 9th, 2006
PHPit.net has posted a new book review today covering a new one from Packt Publishing and by Marc Delisle - “Mastering phpMyAdmin for Effective MySQL Management” (so much for short names).
Although not strictly a PHP book, it’s still very valuable to any PHP developer, because phpMyAdmin is often an important part of development, especially during the early stages of database design. phpMyAdmin is the de facto MySQL database tool, and this book will take you through everything phpMyAdmin has to offer. Read on to learn more about this book.
The review starts with aon overview of the various chapters - from the introduction, to the installation, an interface overview, and using and exporting your data, and much more.
His opinion overall is that the book provides more than enough information for both beginner and advanced developers to find what they need about phpMyAdmin.
Continue Reading ·