Salve ragazzi, sto cercando di realizzare un'applicazione PHP con il dbms MonetDB. Dopo aver integrato le librerie di connessione col nuovo dbms mi sto imbattendo in un warning sulla funzione socket_read

// decode the header and get the requested amount of data
function mapi_read($socket=NULL) {
# get the first 2 bytes
if ( ($header = socket_read($socket, 2)) == FALSE) {
$last_error = socket_strerror(socket_last_error());
exit();
}
$data = "";


$chunk_size = ((ord($header[1]) << 7) | (ord($header[0]) >> 1));
// keep reading until we have everything
while (strlen($data) < $chunk_size) {
$data .= socket_read($socket, $chunk_size - strlen($data));
}




while ((ord($header[0]) & 1) == 0 ) {
if ( ($header = socket_read($socket, 2)) == FALSE) {
$last_error = socket_strerror(socket_last_error());
exit();
}

Warning: socket_read() expects parameter 1 to be resource, null given in C:\xampp\htdocs\phpmyolapmonetdb\php_mapi.inc on line 421

sarebbe questa riga: if ( ($header = socket_read($socket, 2)) == FALSE)
Sapete darmi qualche consiglio?
Ciao a tutti. vi ringrazio in anticipo