10 November, 2008

Practical use of message queues

I stumbled on this post over at the flickr developers blog while chatting with Jo about web applications designed and built for "the cloud". An article earlier this week piqued my curiosity about message queues, and got me thinking about how they can be used to move processing tasks out of the way. I'd known already that minimizing those tasks within, let's say, a PHP script that builds a page can help your application scale or seem more responsive.

To do so, I've relied on cron jobs, but the main problem with that approach is either that your cron job runs when it has nothing to do, if you run it too frequently, or it has too much to do and you run the risk of one job starting while another is in progress and working with potentially the same data.

...click to continue reading.

18 August, 2008

Thinking of switch to PHP w/Fast CGI?

If you're contemplating switching to running PHP5 under FastCGI, to take advantage of apache's threaded worker model and improve your server's performance, think again.  If you're used to setting and overriding php values via .htaccess files or using php_value/php_flag in your virtual host directory, this is not supported with FastCGI.  You'll have to figure out how to set those values via some other means.  Some PHP ini directives can be set in your script directly, with ini_set, but others have to be set outside of it (register_globals for example).

...click to continue reading.

13 August, 2008

Troubleshooting connection problems with memcached

I was noticing today many apache segfaults on this server, and pretty high traffic loads at times. I haven't pinpointed the exact cause of high traffic, there are a couple candidates, but the apache segfaults seem to accompanied by the following PHP errors:

...click to continue reading.

22 February, 2008

Using OpenId for Authentication

Cal Evans wrote a straightforward and excellent tutorial on how to to use Zend_Auth and its OpenID adapter to authenticate users today.

...click to continue reading.

16 November, 2007

A comprehensive look at PHP5 DateTime

Don't expect to find it here, but Laughine Meme posted the most comprehensive one I could find.  You would think that with the introduction in 5.

...click to continue reading.

28 August, 2007

Don't abuse PHP's header function for redirects

PHP's Header function can come in quite handy when you're building your next greate web application.  Its powerful, but as a result, its tempting to misuse it to do even the simplest things, like permanent redirects.  Usually, its done like this:

// redirect /publications (this page) to real page (/documents)
Header("Location: /documents/");

One line of code, time to move on to the next task in your queue, right?

...click to continue reading.

3 May, 2007

Familiar PHP session poll

Hmm, why does this poll  look so familiar?  Oh yeah, the options to vote on are word for word the same as my post on

...click to continue reading.

13 March, 2007

Avoiding frustration with PHP Sessions

PHP's support for sessions make adding "state" to your web application super easy.  Bus because the illusion of state is maintained by storing a Session ID via a user's cookies, you might find yourself losing potentially productive hours chasing down bizarre client side bugs or opening up a potential security hole.

...click to continue reading.

3 October, 2006

Anti-Comment Spam recommendation: Akismet

I installed to Akismet this weekend, to deal with a new flood of
comment spam that had been getting by mod_security and my other measures. It literally took me 15
minutes to install, thanks to the libraries already
available for it. ...click to continue reading.

22 September, 2006

Debian, PHP5, and session garbage collection

Poking around, like you do on your server, I noticed that php session files weren't being deleted, even after a few days. Turns out, PHP's automatic garbase collection is disabled on Debian. Instead, its replaced by a cron script that cleans out the /var/lib/php5 directory, which is where sessions are saved by default.

...click to continue reading.
 1  2  3  4  5     »

Stats

  • 43 posts

My Bookmarks

Taxonomy Access Control | ChaseSagum.com

So why and when would you use this module for Drupal? Let’s say you wanted to give specific users access to edit certain pages on your website, and those certain pages only! Or, let’s say you just have a “premium” section of your site that you want people to register for an account for before they can access it! These are two classic examples of why you would need to use the TAC module.

Friday, Nov 21, 2008 at 05:41 AM

Taxonomy_access: Restrict user roles to access specific categories only | drupal.org

more docs on using taxonomy as an ACL

Friday, Nov 21, 2008 at 05:37 AM

Private forums in Drupal: Forum Access vs. Taxonomy Access vs. Taxonomy Access Control Lite | Lullabot

Drupal core tends to have an "all or nothing" approach to these issues. Either a particular role can access all content on the site, or they can access none of it. Either a particular role can administer all forums, or they can administer none of them. Luckily, though, Drupal provides a number of hooks so that contributed modules can add in their own robust access handling.

Friday, Nov 21, 2008 at 05:28 AM

WordPress %u203A Pods WordPress Plugins

mgibbs pods plugin for arbitrary content types in wordpress

Wednesday, Oct 8, 2008 at 07:24 PM

Mellow Morning Django vs Symfony

a good comparison of both frameworks - not too high level and includes code examples to illustrate points.

Thursday, Aug 28, 2008 at 05:35 PM

dompdf - The PHP 5 HTML to PDF Converter

recommended on DC-PHP

Friday, Aug 8, 2008 at 01:55 PM

More links