Hi,

Do not compile Mbuni 1.2.0 against Kannel 1.4.1 (see documentation). There are a couple of bugs in the mime module of kannel that will cause such crashes
On Dec 21, 2006, at 18:40, Ihab Tawfig wrote:

Hi
I am using mbuni 1.2.0 as VAS gateway with kannel 1.4.1 all went fine untill I tried to send image (or midi ) files where mbuni crashs with following log immediatly after the $content_file part :

2006-12-21 18:31:03 [3402] [4] DEBUG: Octet string dump ends.
2006-12-21 18:31:03 [3402] [4] PANIC: gwlib/octstr.c:1423: octstr_append: Assertion `ostr1 != NULL' failed. 2006-12-21 18:31:03 [3402] [4] PANIC: mmsbox(gw_panic+0xe6) [0x80874b6] 2006-12-21 18:31:03 [3402] [4] PANIC: mmsbox(octstr_append+0x64) [0x808ca44] 2006-12-21 18:31:03 [3402] [4] PANIC: mmsbox(octstr_format_append +0x35) [0x808d8b5]
2006-12-21 18:31:03 [3402] [4] PANIC: mmsbox [0x808837d]
2006-12-21 18:31:03 [3402] [4] PANIC: mmsbox(mime_entity_headers +0x1d) [0x808843d] 2006-12-21 18:31:03 [3402] [4] PANIC: mmsbox(parse_cgivars+0x30d) [0x806429d]
2006-12-21 18:31:03 [3402] [4] PANIC: mmsbox [0x8055ced]
2006-12-21 18:31:03 [3402] [4] PANIC: mmsbox [0x807dfe1]
2006-12-21 18:31:03 [3402] [4] PANIC: /lib/libpthread.so.0 [0xb8e433]
2006-12-21 18:31:03 [3402] [4] PANIC: /lib/libc.so.6(__clone+0x5e) [0xadaa1e]

my script is as follows :
<?php

$msisdn=$_REQUEST['msisdn'];
$shortcode=$_REQUEST['shortcode'];
if($msisdn){
include("includes/conn.inc");
$sql=mysql_query("select con_name ,con_type ,con_data from content where shortcode=$shortcode");
$row=mysql_fetch_array($sql);

$content_type=$row['con_type'];
$content_file=$row['con_data'];
$file_name=$row['con_name'];

$url="/cgi-bin/sendmms?username=user&password=pass&vasid=gawali";
$server="localhost";
$boundary="----boundary-border----";
$from="memee";
$subject="Enjoy+This+from+Mbuni";

$header="POST $url/ HTTP/1.0\r\n";
$header .="Host: $server\r\n";
$header .="Accept: */*\r\n";
$header .="Content-type: multipart/form-data ;boundary=\"--boundary- border--\"\r\n";

$data  =$boundary."\r\n";
$data .="Content-Disposition: form-data; name=\"to\"\r\n\r\n";
$data .=$msisdn."\r\n";
$data .=$boundary."\r\n";
$data .="Content-Disposition: form-data; name=\"from\"\r\n\r\n";
$data .=$from."\r\n";
$data .=$boundary."\r\n";
$data .="Content-Disposition: form-data; name=\"subject\"\r\n\r\n" ;
$data .=$subject."\r\n";
$data .=$boundary."\r\n";
$data .="Content-Disposition: form-data; name=\"content\"; filename='$file_name'\r\n";
$data .="Content-type: $content_type\r\n\r\n";

$data .=$content_file;
$data .=$boundary."\r\n";
$length=strlen($data);
$header .="Content-length: $length\r\n\r\n";

$fp = fsockopen($server, 10001);
       if (!$fp) {
    echo "ERROR: $errno - $errstr<br />\n";
} else {

       fputs($fp, $header.$data);
       while (!feof($fp)) {
        echo fgets($fp, 128);
    }
    }
       fclose($fp);
}
?>
Please note that $content_file is a binary file stored in mysql and it works fine with NowSms .
Please help as we have been to solve this  for almost week
Thanx in advance
_______________________________________________
Users mailing list
[email protected]
http://lists.mbuni.org/mailman/listinfo/users

_______________________________________________
Users mailing list
[email protected]
http://lists.mbuni.org/mailman/listinfo/users

Reply via email to