Category Archives: PHP
PHP has taken the web world by storm – here I discuss my tips and experiences with it, as well as the PHP Extension Library, PEAR.
Finally, A Great HTML Parser for PHP
I’m blown away by the PHP Simple HTML DOM Parser. It’s like Beautiful Soup, the Python HTML/XML parser, but for PHP and has some nice jQuery-like syntax. It also seems just incredibly fast, but maybe that’s also because I’m better at … Continue reading
Trouble Installing PECL’s uploadprogress On OS X – MAMP?
Note – this assumes you are running MAMP on a Mac. For this I’m using Leopard 10.5.8. All you want to do is get this installed so you can have fancy upload bars in your Drupal 7 installation. So you … Continue reading
Put Your 404 Page to Work with URL Splitting
If you launch a new version of a site and the URL structure changes – you can certainly handle most of that with an htaccess file and a 301 Redirect command. But sometimes, as I’ve found at least, this isn’t … Continue reading
How to Fix Minify Error: !FAIL: environment : PHP/server does not auto-HTTP-encode content
So you’ve setup PHP Minify and think you’re a good citizen for making your site zippier. You run the tests in min_unit_tests and all pass, except for the last one: !FAIL: environment : PHP/server does not auto-HTTP-encode content (1 of … Continue reading
Fix: Drupal Site Redirects to p3p0.com
I recently helped a client fix a particularly sneaky site hack. While this pertains to Drupal – similar attacks have been reported in Joomla, or any other PHP based site. The fix here may help still – you’ll just need … Continue reading
Pear DB and “DB Error: already exists” On Insert
Note that this post relates to using a MySQL database in conjunction with the PEAR DB module, or any other PEAR module that depends on DB – like DB_TABLE (which I’ve been enjoying). You might run into this error if … Continue reading