noheader on the user/frontend side

You should be sending your header(s)/processing the request before the template loads.

In fact, a hook was added specifically for this: template_redirect

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)