I had a similar problem and at the end the immobilizer was blocked.
I disconnected the Battery for a while reconnected and it seemed to work.
I also tried locking with one door open then unlocking and closing it again with doors closed. 5read this on WWW, don’t exactly know what did it but it is working for now.
I’ll be back it is does it again. Never had a problem with my C5 for over 6 years still original battery too.
Patrick
October 2008