It would be really useful to see the actual request URI for these errors. You can add code to debugLogBacktrace() to include this in the log. The "correct" code is a bit long for this post, but you can adapt it from the ZenPhoto20 release where it has been present for a while.
It the first case, there is some issue with the initial establishment of the language. So when getHEMLMetaData calls getUserLocale() the latter thinks it needs to set the locale cookie, but it is too late in the process as the theme has already started output. (ZenPhoto20 no longer uses this flawed implementation of getUserLocale().)
The second error implies that parse_url() did not return a path item. I really don't know how that is possible, thus it would be nice to see the actual url that was used.