Hello all,
        I am using kannel with a php application (some web pages) and somethimes
messages are not sent due to this error:
2002-07-08 16:58:13 [2] DEBUG: HTTP: Creating HTTPClient for `127.0.0.1'.
2002-07-08 16:58:16 [1] DEBUG: HTTP: Destroying HTTPClient area 0x80dc000.
2002-07-08 16:58:16 [1] DEBUG: HTTP: Destroying HTTPClient for `127.0.0.1'.

My application makes a socket connection to kannel and does something like
this:
$fp = fsockopen($SmsServer, 13013);
sleep(1); /* One second delay, otherwise it never works on normally run  */
socket_set_blocking($fp,1); /* wait for response on fgets()*/
if ($fp)
        { // Send HTTP request
        $SmsDataUrl =
"?username=$SmsUser&password=$SmsPass&to=".$Dest[$i]['GSM']."&text=$msg";
        $header = "GET /cgi-bin/sendsms".$SmsDataUrl." HTTP/1.0\r\nAccept:
*/*\r\n\r\n";
        fputs($fp, $header);
        // Get the response
        $response="";
        while(!feof($fp))
        $response .= fgets($fp, 128);
        fclose($fp);
        }
else {print "Error connecting";}

The GET command is correctly passed as:
GET /cgi-bin/sendsms?username=test&password=test&to=123456."&text=Test
as seen with tcpdump.

It all works when I run the script in debug mode (step by step), but when I
run the script normally, I receive that error from kannel and $fp result to
be EOF (closed).

I cannot figure out what is going on. It could be an apache/php problem, but
it does not give to me any error.

Thanks for any help.

Stefano Baronio


Reply via email to