On installing php as cgi and reinstalling Elgg the avatar and file upload problems have been soved. I thought it might be useful to understand a bit more about php as cgi. Apparently php normally runs as an apache module. Anyway, clues to what it is all about can be found at:
What’s the difference between running PHP as a cgi or as a module …