Half of that sounds completely extraterrestrial to me, I am afraid.
"Иметь где жить" by itself is stylistically atrocious, and "у него не было где жить" borders agrammaticality.
That's all right, there might be many reasons for this, from a genuine difference between your grammar and that of other Russian speakers (which is normal) to trying to analyse the construction using a descriptively inadequate (or even wrong) framework, such as the grammar we learn at school, cf. the no split infinitive-type "rules" of English. Have you looked these expressions up in a search engine? It often happens to me that what looked bewildering out of context starts looking absolutely fine when context is sufficient.
"У меня есть где жить" is already somewhat problematic, since, undoubtedly, the default way to convey that idea in everyday speech is "мне есть где жить", with the dativus commodi ("(to) me (there) is where (to) live").
These two expressions mean different things. "У меня́ есть где жить" is a possessive expression equal to "я имею где жить, у меня есть жильё". The other example refers to having no ability to find a living accomodation. This is why examples like "в Новгороде у меня нет где жить" mean "у меня́ нет кварти́ры в Но́вгороде" and could be uttered by anyone who has no apartment there, while "мне не́где жить" (notice the preference of
негде over
нет где, while being as strongly dispreferred in a possessive construction with
у меня) doesn't work that well with a space adjunct, and when used so can be interpreted to mean "I don't have enough space to live there", e.g. "льву в э́той кле́тке не́где жить", while "у льва́ в этой кле́тке нет где жить" sounds absurd, as if it doesn't have an apartment in the cage.