Job postings for the past week:
January 30, 2010
January 29, 2010
Ryan Mauger has a new post today looking at how to combine the Tidy extension for PHP and Firebug with a Zend Framework application to keep your HTML neat and valid with a handy bit of feedback for debugging.
With Zend Framework there is an easy way to ensure that you always create valid HTML in your applications. This involves the use of a simple Front Controller Plugin, and the php Tidy component. [...] So you can use tidy for filtering user input, what about using it to effectivly clean my documents and ensure my output is always valid?
He starts off with the pieces of the puzzle you’ll need – the front controller plugin for the Zend Framework application, using the Tidy extension to filter your HTML and combining the two to make a dispatchShutdown() call to make the transformations. Firebug comes in to help with logging the issues Tidy found so you can correct them.
Rob James has a new post looking at configuring Apache to run Tomcat and PHP together so you can have both Java and PHP apps running through the same Apache frontend.
Here is the scenario; you have a project that requires hosting a single website in a single web domain, but you have a mix of PHP applications and Java (or in my instance, GRAILS) applications that you need to run. [...] The problem is, that there is no good documentation to help you do this, so here I go!
His example sets up a site that will load static pages, run PHP applications, handle Java application requests without missing a beat. He starts from the very beginning – installing OpenSSH, vsftpd, MySQL, Apache, Java and Tomcat – all from packages on a Ubuntu linux installation. To connect Tomcat with Apache, you’ll need to use the mod_proxy Apache module and configure the Tomcat server to listen on the right port.
With the release of Pirum, I’m really excited to see two public PEAR channels that aim to make PEAR a standard to deploy and manage your applications and libraries. One is PEARhub and the other is PEAR Farm. I think I’m gonna stick with PEAR Farm for a while, so this blog entry focuses on things I noticed when I first played with it. [...] A lot of people mistake these new channels for the wrong thing. They think that this will eventually replace PEAR. I don’t think it will – ever.
He shows how to get the PEAR Farm libraries installed (via the PEAR installer) and how to set up your project with the pearfarm command-line tool. He also offers a few “gotchas” and tips to help you with a few of the issues he saw along the way. You can get an idea of the end result by looking at Till’s PEAR Farm page.
In a recent post to his blog Joey Rivera looks at using the Zend_paginator component with Twitter and APC to create a cachable, paged view of a set of Twitter API results.
I’m going to focus more on Zend_Paginator and Zend_Rest_Client to access Twitters API since I’ve already created a post on Zend_Cache. Normally, I would use Zend_Service_Twitter to access the twitter service but it still seems to require authentication to retrieve a users timeline where only protected users should require authentication.
He includes all of the needed code including the bootstrap.ini file and his own custom Twitter service class that grabs the timeline of the given user and calls the REST interface to grab the latest posts and caches them to a file.
PHPBuilder.com has a new article from Jason Gilmore on security in command-line applications posted today and what you can do to help protect your scripts from unwanted system command access.
In this tutorial, I’ll show you how to securely execute a variety of system-based commands via a PHP script, demonstrating how to build web applications that can tightly integrate with both the operating system and third-party software.
He mentions the proper filtering of input strings (user input), how it can protect your and your application as well as a few examples of using the PHP execution functions (like exec or passthru) and how to apply the shell escaping commands (like escapeshellarg) as a first layer of security.
Brian Swan has a new post to his MSDN blog today with a list of ten great Microsoft+PHP references (including one or two that don’t belong to Microsoft!)
As I’ve learned (and continue to learn) PHP and Microsoft technologies, I’ve found some very helpful resources on the web. But, they are sometimes hard to find, and they certainly aren’t usually found in one place. So, before I begin drilling into some of the things I suggested in my first post, I thought I’d take a stab at consolidating the resources that I’ve found to be especially helpful.
Sites included in the list are things like:
Popular posts from PHPDeveloper.org for the past week:
- Zend Framework By Examples: Handling dates and times (Zend_Date)
- David Abdemoulaie’s Blog: bundle-phu – minify, bundle, and compress your js/css in Zend Framework
- PHPBuilder.com: Compose a MVC Paradigm for PHP with Symfony
- Site News: Job Postings for the week of 01.17.2010
- Community News: Zend Framework Documentation Now Version Specific
- Java.Sys-con.com: Why Do ‘Cool Kids’ Choose Ruby or PHP to Build Websites Instead of Java?
- Don Raman’s Blog: Call for testing a critical fix in WINCACHE RTW 1.0
- Arniie’s Blog: The Zend journey that cheated me out of a decent certification!
- Chris Renner’s Blog: Gerrymandered Code: Extending Zend_Registry to globalize session vars
- Ibuildings techPortal: Tips for PHP Date and Time Functions
January 28, 2010
If you’re a NetBeans user and have been frustrated by it’s default handling of non-PHP extension files as PHP, you should check out this new post from Sachin Khosl on digimantra.com on how to fix the issue.
You love coding in Netbeans and you find it pretty uneasy when it does not function the way you want it to. That was the same with me when I started development in drupal and I was unable to associate the .module as PHP in my favorite editor Netbeans. However with little play around with options I was able to associate .module files as PHP file in Netbeans IDE. So for doing so follow [these] steps.
You can change the setting for plenty of different extensions (and add your own custom ones) in the Options under the Miscellaneous section’s Files tab. Check out this screenshot to see the location.
In a project she’s been working on Lorna Mitchell was frustrated with something the CodeIgniter framework does natively – escape SQL statements done through the databaase layer’s “select()” method. Thankfully, there was a simple fix to turn this behavior off.
I’ve been getting increasingly impatient with its tendency to try to escape my SQL code for me – this is a really useful default feature but it seems to assume I don’t know what I’m doing and so it puts backticks all over perfectly acceptable SQL code, very annoying!
Thanks to a reply on twitter from damiangostomski to her frustrations she found the optional second parameter you can give the “select()” method, a boolean that tells it whether or not to escape the query (it’s mentioned here) for those that were wondering.