Skip navigation

Tag Archives: php

Drupal 6 uses different methods for saving taxonomy for different taxonomy types.

For multiple select based taxonomy:


$nodeObj->taxonomy = array(2=>array(15,19));


nodeOb['taxonomy']['2'] = [15,19]

For tags based taxonomy:


$nodeObj->taxonomy = array(
  'tags' => array(

Nginx fastcgi cache with php-fpm can be a super fast of serving WordPress Mu.

Nginx WordPress Mu FastCgi_Cache Conf Rewrites are an interesting thing to get set up because of the cookie situation. You also don’t want to have wp-admin php files cached either. Read More »

There is an issue with Drupal 6 menu router rebuild which causes Drupal to time out with 404 pages or internal 500.

The following fix worked for me:

Install Drupal Tweaks, increase php memory, and mysql recommendations etc

Download the following patches:

From command line copy patches to your root drupal directory.

cd to your root drupal directory and then apply the patches. Each time you will be asked where the file is for the patch and the actual path to the files to be patched will be provided in the command line. Just copy and paste each file path as presented into the prompt.

cp *.patch /home/drupal_directory/
cd /home/drupal_directory/
patch < no-router-blob-317775-56-D6.patch
patch < lock-251792-163-D6.patch

|--- includes/ (revision 7577)
|+++ includes/ (working copy)
File to patch: includes/

So in the above text you can see it gives you the path ‘includes/’. Just copy and paste that to where it says ‘File to patch:’. For each file it will provide you the correct path to the file assuming you are in the drupal root directory.

The final thing to do is to cp the file which is created to includes/

I read this article on php-fpm init script but it didn’t have one.

You can use the php-fpm init.d script below. You need to change the variables at the start for your bin, conf, and pid to suit your set up.  PHP-FPM works great with Nginx.

Not sure if WordPress will format this script right so you can get as a text file here:

Read More »

Joomla 1.5 has an interesting quirk with Placehere Content Item Module.

Read More »

A simple tutorial on how to obtain geo coordinates with php and the Google Maps API.

Read More »

Update: Do not use this config for php.  Instead use php-fpm with xcache or apc.

To configure Nginx to load balance multiple FastCgi servers use this type of configuration:

upstream servercom {

location ~ \.php$ {
fastcgi_pass servercom;
fastcgi_param SCRIPT_FILENAME /var/www/htdocs$fastcgi_script_name;
include /etc/nginx/fastcgi.conf;

Read More »

How to create an extract arrays in PHP.

Read More »

These code samples for the Ebay Trading API include some PHP.

Read More »

Here is the PHP Accelerator Toolkit for eBay – Trading API Edition.

Read More »