I am not a big fan of whey. Obviously it is a dairy product, so immediately I would suggest avoiding it. Also, I would recommend researching the history of whey -- it was once, if I understand correctly, a waste product of the dairy industry.
In terms of the phlegm issue... this is, I believe, because the body responds to foreign proteins (and the other less pleasant ingredients) by treating them as antigens (by producing antibodies.) In other words, your body view whey as an attack, which it then tries to defend against...
I would strongly suggest that whey is not an appropriate food and should be avoided. There are much better sources of protein.. and ones that our bodies are highly adapted at processing.