8 Apr 2010
1 Apr 2010
30 Mar 2010
There is a surprising amount of confusion about XSS and SQL injection among the PHP programmers I've worked with. Here are some common ways to do it right and to do it wrong.
26 Mar 2010
I'm surprised by how many developers aren't familiar with encryption. Many say to me that encryption is md5 and sha1.
Applications often need one-way encryption and two-way encryption. There are also public/private key encryption schemes like pgp which are not as commonly used in web applications.
25 Mar 2010
I've had some colorful interviews lately. It brought to mind a lot of DON'Ts in Interviews and Resumes. I capitalize DON'T because everyone should know these basic rules.
12 Mar 2010
Yesterday I was playing Flash games with my 5 year old on our Ubuntu desktop. As you may know, Flash support on Linux is dismal. Specifically I was using the Adobe plugin on Firefox 3.6 in Ubuntu 9.10 with a powerful NVIDIA GeForce 9600-series graphics card and a speedy Intel Core2 Duo. We played games on flonga.com.
Here are some of the problems that made games unplayable:
27 Oct 2009
Handling a paste from a Word document into a browser-based WYSIWYG editor is a pain in the butt. I'm using CKEDITOR, which does have a built-in tool for stripping Word's nasty HTML, but it doesn't work well. I also had no success using PHP's HTMLPurifier, htmLawed or Tidy alone.
22 Oct 2009
21 Oct 2009
I developed the following php function after writing
trim($path,'/') too many times. It took me a lot of iterations to pass all the unit tests, but it works with URI and file paths for all OSs. It goes as far as to account for the strange possibility of a path containing an escaped slash. It runs pretty quickly--less than twice as long as a simple use of join:
19 Oct 2009
After writing my last article about using apache's RewriteCond to work with multiple codebases on localhost, a coworker pointed out a far simpler method using apache VirtualHosts.
On my dev machine, I'm lazy about server admin and just use wamp. To work with multiple codebases below is my simple and easy configuration.