Detect syntax errors in multiple PHP files with xargs

With the Command Line Interpreter for PHP (most of the time called php-cli or php5-cli), you can check if one single file contains syntax errors by simply calling php5 -l file.php The problem with that is, if you have many…

More Details
Xhprof + PHP5.4 + Ubuntu + Chamilo 1.10dev

(Read the update below before starting to copy-paste) To install Xhprof on PHP5.4 on Ubuntu (assuming you’ve already got PHP5.4 from Andrej or somewhere safe) in order to measure the load of Chamilo 1.10 dev (you need to have a…

More Details
Drupal 7 + HTTPS + Nginx + Varnish + Apache + Boost + APC + Securepages + Drupal

If you happen to develop large sites in Drupal, you might fall upon a case like this one, where different servers (namely at least one reverse proxy and one web server) interact, causing a series of chain reactions every time…

More Details
The Drupal 6 bootstrap easy debug

Just as a self reminder, and because I don’t fancy too much looking into the Drupal core for debugging, here is a short explanation of how the Drupal 7 bootstrap mechanism works. First of all, a bootstrap mechanism is a…

More Details
PHP FastCGI hangs

Just as a self reminder, this blog post explains why php-cgi might hang/stop silently when your load increases, and how to fix it, where it explains (in short) that fast-cgi should have the parameter PHP_FCGI_MAX_REQUESTS should equal 1000 or more…

More Details
HOWTO Build your own binaries of PHP Xapian bindings for Debian

Due to a licensing issue, the PHP bindings for Xapian were removed from Debian Squeeze. See http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=513796 for more information about this. Though, it is not really hard to build your own package from source. Here is how: sudo apt-get…

More Details
Memcache(d) to store PHP sessions

Edit: as of July 2014, there is a recent article discussing the use of php5-memcache instead of php5-memcache to store sessions on this blog. There are many posts around on the web about using memcached to store sessions data on…

More Details
Installing php-imagick on CentOS 5

For some reason I find myself having to work with CentOS a lot these days. I hate to say I hate something, but I can’t help saying I don’t like CentOS at all. Its packaging system is just so inconsistent…

More Details
My personal best apt-get command to install a LAMP dev server on Ubuntu

This command is to be improved progressively… sudo apt-get install apache2 libapache2-mod-php5 mysql-server mysql-client php5-mysql php5-xcache php5-gd php5-xdebug screen phpmyadmin php5-imagick mercurial git php-pear php5-dev

More Details
PHPEclipse + Xdebug + Firefox

There’s a short but great article about setting up PHPEclipse with Xdebug here: http://bogdan-albei.blogspot.com/2010/06/php-remote-debugging-with-xdebug-and.html I really don’t want to forget this one!

More Details