I very much doubt that PHP is the source of your problems although I would note that we are now up to 5.2.11 and/or 5.3.2!!
I've never even heard of SANDF (South African National Defence Force according to Wikipedia - maybe not ) so I doubt I can much more help. The usual rants and raves apply though. Make sure you are allocating enough memory. If you are going into swap you are dead in the water.