Visualizzazione dei risultati da 1 a 2 su 2

Discussione: PHP con MONETDB

  1. #1

    PHP con MONETDB

    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

  2. #2
    gli passi una variabile $socket che è nulla... quando richiami quella funzione mapi_read assicurati che $socket sia una risorsa (socket) aperto e funzionante
    IP-PBX management: http://www.easypbx.it

    Old account: 2126 messages
    Oldest account: 3559 messages

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved.