Category Archives: PHP

Daemonize PHP (properly)

There is often a need when building a website to automate background processes, for example: Sending emails: many sites don’t immediately connect to an SMTP server when a user fires off an email request, but rather store the email in … Continue reading

Posted in Linux, PHP | Tagged , , , , | Leave a comment

Programmatically set environment for Symfony project

I have recently been working on a web project built on Symfony 1.4. There are a team of developers, each has their own installation and we had the problem whereby each needed their own particular configuration settings. Symfony allows for … Continue reading

Posted in PHP | Tagged , , , , , , | Leave a comment

Multitasking: PHP in parallel

Update: I have recently solved the issue of multitasking in PHP with a standalone application, The Fat Controller, which handles multitasking for you. Read more here. Like most websites, periodically sends out an e-newsletter to its user-base.    This is … Continue reading

Posted in C, PHP | Tagged , , , , | 1 Comment

Spinning command line cursor in Java and PHP

Update: I have created an updated article which describes a multithreaded approach in Java Spinning command line cursor in Java I think I must be really bored this morning, I can’t believe I’m actually blogging this, but it might be … Continue reading

Posted in Java, PHP | Tagged , , , , , | 2 Comments

Transparent aggregation in PHP5

The other day a Ruby developer was extolling the virtues of Ruby on Rails to me, in particular the use of “acts_as_” to make a class magically include all the behaviour from another. It isn’t inheritance, the relationship isn’t “is … Continue reading

Posted in Object oriented programming, PHP | Tagged , , , , , , , | 5 Comments

PEAR Cache_Lite – efficient group cleaning

After using PEAR Cache_Lite for a while, we began to notice that as traffic increased the web servers spent more and more time thrashing their discs. On closer inspection we noticed that the servers were pretty much constantly parsing the … Continue reading

Posted in PHP | Tagged , , , , , , , , , | Leave a comment

PEAR Cache_Lite – preventing stampeding

The PEAR Cache_Lite package is an excellent caching system; lightweight and fast, however when put into use on a high-traffic website a few issues came to light. The first problem we hit was stampeding. What’s stampeding? Stampeding is the situation … Continue reading

Posted in PHP | Tagged , , , , , , , | 3 Comments