Ah, the eternal question: What is the perfect D&D party? Ask this question to 10 different D&D players, and you'll get 10 different answers. For this thread, I'll assume that by "ideal" you mean a party that's well-rounded and will be able to handle most challenges its put up against.
In 3.0, I'd go with...
Fighter
Rogue
Cleric
Wizard
In 3.5e, I'd go with...
Barbarian
Rogue
Cleric
Wizard
Mostly the same, anyways. The only change being that the fighter is replaced with the barbarian, since barbarians are deadlier melee combatants than fighters in 3.5e.