server(); // special case for binary attributes: // we must go read the data from the file. if( $is_binary_val ) { $file = $_FILES['new_value']['tmp_name']; $f = fopen( $file, 'r' ); $binary_value = fread( $f, filesize( $file ) ); fclose( $f ); $new_value = $binary_value; } $new_entry = array( $attr => $new_value ); $add_result = @ldap_mod_add( $ds, $dn, $new_entry ); if( ! $add_result ) { echo $_SESSION['header']; echo "