ldap_search() problem

Hello all. As the title state I am having issues getting an LDAP search to work in PHP.

I am relatively handy with PHP, and am a complete n00b when it comes to LDAP. I am having a hard time understanding syntax for the search.

Anyways this is the code i have:

<?PHP
echo "LDAP query test<br />";
echo "Connecting...<br />";
$ds = ldap_connect("192.168.32.19","389");
ldap_set_option($ds, LDAP_OPT_REFERRALS, 0);
echo "Connect result is ".$ds."<br />";
if($ds){
echo "Binding...<br />";
$r = ldap_bind($ds);
echo "Bind result is ".$r."<br />";
echo "<br />";
echo "Searching for Sean Akers...<br />";
$s = ldap_search($ds,"stemilt.com","sn=Sean");
echo "Search result is ".$s."<br />";
echo "Number of entries returned is: ".ldap_count_entries($ds, $s)."<br />";
echo "<br />";
echo "Getting entries...<br />";
$info = ldap_get_entries($ds, $s);
echo "Data for ".$info["count"]." items returned:<br />";
 
for ($i=0; $i<$info["count"]; $i++){
echo "dn is: " . $info[$i]["dn"] . "<br />";
echo "first cn entry is: " . $info[$i]["cn"][0] . "<br />";
echo "first email entry is: " . $info[$i]["mail"][0] . "<br />";
}
echo "Closing connection...<br />";
ldap_close($ds);
}else{
echo "Unable to connect to LDAP server";
}
?>

when i echo the result of connect i get this: Resource id#1
when i echo the result of the bind i get this: 1
then i start the search
when i search for myself (Sean Akers) I get this:
Warning: LDAP: Unable to perform the search: Operations error in /var/www/html/foundation/CURRENT/it/test/ldap.php on line 16

So im not exactly sure what is going on, can anyone help me out? Id appreciate it! Thanks