Well this took me a while to find the problem, so I'm posting in case someone else runs in to this.
$sr = ldap_search($ds, "cn=me", "(objectclass=*)");
$entry = ldap_first_entry($ds, $sr);
do {
// do other stuff
$sr = "something else now";
$values = ldap_get_values($ds, $entry, "attirib1");
// do other stuff
} while ($entry = ldap_next_entry($ds, $entry));
If you change the search resource $sr to something else even though it's not used again it will kill the page it'll be a blank page and if you view the code you'll get different things depending on something no idea what.
This kepted happening I had forgotten I had used $sr so I was using it again and it would just not show the page whenever I used ldap_get_values, if this is a feature it would be nice to know. I haven't seen it happen with other functions.