Stefano Baronio wrote:
> 
> 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.

I'm not aware of existing php socket connection problems. Maybe you
can try to use php's openfile function with the URL, which is
obviously an easier way to pass a GET request to an HTTP server, see
> 
> Thanks for any help.
> 
> Stefano Baronio

--
F�r weitere Fragen stehe ich Ihnen gerne telefonisch
oder via E-Mail zur Verf�gung.

Mit freundlichen Gr��en


Stipe Tolj
Department Management
Technology Center & Research Lab

-- Hope to see you at my presentations:

   "Virtual Server solution for Linux using FreeVSD" 
   at O'Reilly Open Source Convention 2002,
   Sheraton San Diego Hotel and Marina, San Diego, CA. USA
   July 22-26, 2002 

[EMAIL PROTECTED]
-------------------------------------------------------------------
Wapme Systems AG

Vogelsanger Weg 80
40470 D�sseldorf

Tel: +49-211-74845-0
Fax: +49-211-74845-299

E-Mail: [EMAIL PROTECTED]
Internet: http://www.wapme-systems.de
-------------------------------------------------------------------
wapme.net - wherever you are

Reply via email to