Thursday, May 16, 2013

Register for Free Online Mini MBA New Batch

If you are unable to view this mailer Click here

logo-mybskool
Register today for the FREE Online Mini MBA
Register today for the FREE Online Mini MBA
Offered by India's premier Online B-School, myBskool.com, the 100-Day Free Online Mini MBA is an interactive and collaborative program that can give you a quick foundation in current business practices. Enrol today to quickly understand the nuances of effective business management.
Subjects Covered:
Fundamentals of Accounting   |   Essentials of Business Communication   |   Managing Human Resource   |  
Principles of Marketing   |   Business Strategy
Why Enrol for Free Online Mini MBA?

Complete Online Course – No Classes to Attend

Anytime, Anywhere Learning

Access through PC, Tablet, Smart Phone

Video Lectures delivered by Management Gurus

Exhaustive Study Materials

Relevant Industry Oriented Curriculum

24/7 Student Support

Online Assignments

Online Flexible Examinations Pattern

Fully collaborative features for interaction and social learning

Letter of completion will be awarded to all students on course completion.

click here to unsubscribe.
Our mailing address is:
groupox

Sunday, April 21, 2013

Your mobile recharge is on us

If you are unable to view this mailer Click here

Hey.....

We have decided to take care of your mobile bills

Crazy it may sound but YESSS... its TRUE

You just PLAY & have FUN, we will take care of the rest.

Earnings on every single attempt

CHECK it out yourself
 
  CLAIM JOINING BONUS NOW  
 To stop receiving these emails please click here to unsubscribe.

Thursday, September 11, 2008

Google Code FAQ - Using PHP/MySQL with Google Maps








Using PHP/MySQL with Google Maps




This tutorial is intended for developers who are familiar with
PHP/MySQL, and want to learn how to use Google Maps with a MySQL
database. After completing this tutorial, you will have a Google Map
based off a database of places. The map will differentiate between two
types of places—restaurants and bars—by giving their
markers distinguishing icons. An info window with name and address
information will display above a marker when clicked.



The tutorial is broken up into the following steps:





Creating the table


When you create the MySQL table, you want to pay particular
attention to the lat and lng attributes.
With the current zoom capabilities of Google Maps, you should only
need 6 digits of precision after the decimal. To keep the storage
space required for our table at a minimum, you can specify that the
lat and lng attributes are floats of size
(10,6). That will let the fields store 6 digits after the decimal,
plus up to 4 digits before the decimal, e.g. -123.456789 degrees.
Your table should also have an id attribute to serve as
the primary key, and a type attribute to distinguish
between restaurants and bars.


Note: This tutorial uses location data that
already have latitude and longitude information needed to plot
corresponding markers. If you're trying to use your own data that
don't yet have that information, use a batch geocoding service to
convert the addresses into latitudes/longitudes. Some sites make the
mistake of geocoding addresses each time a page loads, but doing so
will result in slower page loads and unnecessary repeat geocodes. It's
always better to hardcode the latitude/longitude information when
possible. This link contains a good list of geocoders:
http://groups.google.com/group/Google-Maps-API/web/resources-non-google-geocoders


If you prefer interacting with your database through the
phpMyAdmin interface, here's a screenshot of the table creation.





If you don't have access to phpMyAdmin or prefer using SQL
commands instead, here's the SQL statement that creates the table. phpsqlajax_createtable.sql:


CREATE TABLE `markers` (
 
`id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY ,
 
`name` VARCHAR( 60 ) NOT NULL ,
 
`address` VARCHAR( 80 ) NOT NULL ,
 
`lat` FLOAT( 10, 6 ) NOT NULL ,
 
`lng` FLOAT( 10, 6 ) NOT NULL ,
 
`type` VARCHAR( 30 ) NOT NULL
) ENGINE = MYISAM ;



Populating the table


After creating the table, it's time to populate it with
data. Sample data for 10 Seattle places are provided below. In
phpMyAdmin, you can use the IMPORT tab to import various file
formats, including CSV (comma-separated values). Microsoft Excel and
Google Spreadsheets both export to CSV format, so you can easily
transfer data from spreadsheets to MySQL tables through
exporting/importing CSV files.


Here's the sample data in CSV format. phpsqlajax_data.csv:


Pan Africa Market,"1521 1st Ave, Seattle, WA",47.608941,-122.340145,restaurant
Buddha Thai & Bar,"2222 2nd Ave, Seattle, WA",47.613591,-122.344394,bar
The Melting Pot,"14 Mercer St, Seattle, WA",47.624562,-122.356442,restaurant
Ipanema Grill,"1225 1st Ave, Seattle, WA",47.606366,-122.337656,restaurant
Sake House,"2230 1st Ave, Seattle, WA",47.612825,-122.34567,bar
Crab Pot,"1301 Alaskan Way, Seattle, WA",47.605961,-122.34036,restaurant
Mama
's Mexican Kitchen,"2234 2nd Ave, Seattle, WA",47.613975,-122.345467,bar
Wingdome,"1416 E Olive Way, Seattle, WA",47.617215,-122.326584,bar
Piroshky Piroshky,"1908 Pike pl, Seattle, WA",47.610127,-122.342838,restaurant

Here's a screenshot of the import options used to transform this
CSV into table data:




If you'd rather not use the phpMyAdmin interface, here are the SQL
statements that accomplish the same results. phpsqlajax_data.sql:


INSERT INTO `markers` (`name`, `address`, `lat`, `lng`, `type`) VALUES ('Pan Africa Market', '1521 1st Ave, Seattle, WA', '47.608941', '-122.340145', 'restaurant');
INSERT INTO
`markers` (`name`, `address`, `lat`, `lng`, `type`) VALUES ('Buddha Thai & Bar', '2222 2nd Ave, Seattle, WA', '47.613591', '-122.344394', 'bar');
INSERT INTO
`markers` (`name`, `address`, `lat`, `lng`, `type`) VALUES ('The Melting Pot', '14 Mercer St, Seattle, WA', '47.624562', '-122.356442', 'restaurant');
INSERT INTO
`markers` (`name`, `address`, `lat`, `lng`, `type`) VALUES ('Ipanema Grill', '1225 1st Ave, Seattle, WA', '47.606366', '-122.337656', 'restaurant');
INSERT INTO
`markers` (`name`, `address`, `lat`, `lng`, `type`) VALUES ('Sake House', '2230 1st Ave, Seattle, WA', '47.612825', '-122.34567', 'bar');
INSERT INTO
`markers` (`name`, `address`, `lat`, `lng`, `type`) VALUES ('Crab Pot', '1301 Alaskan Way, Seattle, WA', '47.605961', '-122.34036', 'restaurant');
INSERT INTO
`markers` (`name`, `address`, `lat`, `lng`, `type`) VALUES ('Mama\'s Mexican Kitchen', '2234 2nd Ave, Seattle, WA', '47.613975', '-122.345467', 'bar');
INSERT INTO
`markers` (`name`, `address`, `lat`, `lng`, `type`) VALUES ('Wingdome', '1416 E Olive Way, Seattle, WA', '47.617215', '-122.326584', 'bar');
INSERT INTO
`markers` (`name`, `address`, `lat`, `lng`, `type`) VALUES ('Piroshky Piroshky', '1908 Pike pl, Seattle, WA', '47.610127', '-122.342838', 'restaurant');



Outputting XML with PHP


At this point, you should have a table named markers
filled with sample data. You now need to write some PHP statements to
export the table data into an XML format that our map can retrieve
through asynchronous JavaScript calls. If you've never written PHP to
connect to a MySQL database, you should visit
php.net and read up
on mysql_connect, mysql_select_db, my_sql_query, and mysql_error.


Note: Some tutorials may suggest actually writing
your map page as a PHP file and outputting JavaScript for each marker
you want to create, but that technique can be problematic. By using
an XML file as an intermediary between our database and our Google
Map, it makes for a faster initial page load, a more flexible map
application, and easier debugging. You can independently verify the
XML output from the database and the JavaScript parsing of the
XML. And at any point, you could even decide to eliminate your
database entirely and just run the map based on static XML files.


First, you should put your database connection information in a
separate file. This is generally a good idea whenever you're using PHP
to access a database, as it keeps your confidential information in a
file that you won't be tempted to share. In the Maps API forum, we've
occasionally had people accidentally publish their database connection
information when they were just trying to debug their XML-outputting
code. The file should look like this, but with your own database
information filled in. phpsqlajax_dbinfo.php:


<?
$username
="username";
$password
="password";
$database
="username-databaseName";
?>

Using PHP's domxml functions to output XML


Check your configuration or try initializing a
domxml_new_doc() to determine if your server's PHP has
dom_xml functionality on. If you do have access to
dom_xml functions, you can use them to create XML nodes,
append child nodes, and output an XML document to the screen. The
dom_xml functions take care of subtleties such as
escaping special entities in the XML, and make it easy to create XML
with more complex structures.


In the PHP, first initialize a new XML document and create the
"markers" parent node. Then connect to the database, execute a
SELECT * (select all) query on the markers table,
and iterate through the results. For each row in the table (each location), create a new XML node with the
row attributes as XML attributes, and append it to the parent node. Then dump the XML to the screen.



Note: If your database contains international characters or you otherwise need to force UTF-8 output, you can use utf8_encode on the outputted data.


The PHP file that does all that is shown below. phpsqlajax_genxml.php:


<?php
require("phpsqlajax_dbinfo.php");

// Start XML file, create parent node
$doc
= domxml_new_doc("1.0");
$node
= $doc->create_element("markers");
$parnode
= $doc->append_child($node);

// Opens a connection to a MySQL server
$connection
=mysql_connect (localhost, $username, $password);
if (!$connection) {
  die
('Not connected : ' . mysql_error());
}

// Set the active MySQL database
$db_selected
= mysql_select_db($database, $connection);
if (!$db_selected) {
  die
('Can\'t use db : ' . mysql_error());
}

// Select all the rows in the markers table
$query
= "SELECT * FROM markers WHERE 1";
$result
= mysql_query($query);
if (!$result) {
  die
('Invalid query: ' . mysql_error());
}

header
("Content-type: text/xml");

// Iterate through the rows, adding XML nodes for each
while ($row = @mysql_fetch_assoc($result)){
 
// ADD TO XML DOCUMENT NODE
  $node
= $doc->create_element("marker");
  $newnode
= $parnode->append_child($node);

  $newnode
->set_attribute("name", $row['name']);
  $newnode
->set_attribute("address", $row['address']);
  $newnode
->set_attribute("lat", $row['lat']);
  $newnode
->set_attribute("lng", $row['lng']);
  $newnode
->set_attribute("type", $row['type']);
}

$xmlfile
= $doc->dump_mem();
echo $xmlfile
;

?>

Using PHP's echo to output XML


If you don't have access to PHP's dom_xml functions,
then you can simply output the XML with the echo
function. When using just the echo function, you'll need
to use a helper function (e.g. parseToXML)
that will correctly encode a few special entities (<,>,",') to be XML friendly.


In the PHP, first connect to the database and execute the
SELECT * (select all) query on the markers table. Then
echo out the parent markers node, and iterate through the
query results. For each row in the table (each location), you need to
echo out the XML node for that marker, sending the name and address
fields through the parseToXML function first in case
there are any special entities in them. Finish the script by echoing
out the closing markers tag.



Note: If your database contains international characters or you otherwise need to force UTF-8 output, you can use utf8_encode on the outputted data.


The PHP file that does all this is shown below. phpsqlajax_genxml2.php:


<?php
require("phpsqlajax_dbinfo.php");

function parseToXML($htmlStr)
{
$xmlStr
=str_replace('<','<',$htmlStr);
$xmlStr
=str_replace('>','>',$xmlStr);
$xmlStr
=str_replace('"','"',$xmlStr);
$xmlStr
=str_replace("'",''',$xmlStr);
$xmlStr
=str_replace("&",'&',$xmlStr);
return $xmlStr;
}

// Opens a connection to a MySQL server
$connection
=mysql_connect (localhost, $username, $password);
if (!$connection) {
  die
('Not connected : ' . mysql_error());
}

// Set the active MySQL database
$db_selected
= mysql_select_db($database, $connection);
if (!$db_selected) {
  die
('Can\'t use db : ' . mysql_error());
}

// Select all the rows in the markers table
$query
= "SELECT * FROM markers WHERE 1";
$result
= mysql_query($query);
if (!$result) {
  die
('Invalid query: ' . mysql_error());
}

header
("Content-type: text/xml");

// Start XML file, echo parent node
echo
'<markers>';

// Iterate through the rows, printing XML nodes for each
while ($row = @mysql_fetch_assoc($result)){
 
// ADD TO XML DOCUMENT NODE
  echo
'<marker ';
  echo
'name="' . parseToXML($row['name']) . '" ';
  echo
'address="' . parseToXML($row['address']) . '" ';
  echo
'lat="' . $row['lat'] . '" ';
  echo
'lng="' . $row['lng'] . '" ';
  echo
'type="' . $row['type'] . '" ';
  echo
'/>';
}

// End XML file
echo
'</markers>';

?>

Using PHP's DOM functions to output XML



First, check your configuration and make sure you are using PHP5. If you aren't, then use one of the previous techniques.



In PHP, first initialize a new XML document and create the "markers" parent node. Then connect to the database, execute a SELECT *
(select all) query on the markers table, and iterate through the
results. For each row in the table (each location), create a new XML
node with the row attributes as XML attributes, and append it to the
parent node. Then dump the XML to the screen.



Note: If your database contains international characters or you otherwise need to force UTF-8 output, you can use utf8_encode on the outputted data.



The PHP file that does all that is shown below:


<?php  

require("phpsqlajax_dbinfo.php");

// Start XML file, create parent node

$dom
= new DOMDocument("1.0");
$node
= $dom->createElement("markers");
$parnode
= $dom->appendChild($node);

// Opens a connection to a MySQL server

$connection
=mysql_connect (localhost, $username, $password);
if (!$connection) {  die('Not connected : ' . mysql_error());}

// Set the active MySQL database

$db_selected
= mysql_select_db($database, $connection);
if (!$db_selected) {
  die
('Can\'t use db : ' . mysql_error());
}

// Select all the rows in the markers table

$query
= "SELECT * FROM markers WHERE 1";
$result
= mysql_query($query);
if (!$result) {  
  die
('Invalid query: ' . mysql_error());
}

header
("Content-type: text/xml");

// Iterate through the rows, adding XML nodes for each

while ($row = @mysql_fetch_assoc($result)){  
 
// ADD TO XML DOCUMENT NODE  
  $node
= $dom->createElement("marker");  
  $newnode
= $parnode->appendChild($node);  
  $newnode
->setAttribute("name",$row['name']);
  $newnode
->setAttribute("address", $row['address']);  
  $newnode
->setAttribute("lat", $row['lat']);  
  $newnode
->setAttribute("lng", $row['lng']);  
  $newnode
->setAttribute("type", $row['type']);
}

echo $dom
->saveXML();

?>

Checking that XML output works


Call this PHP script from the browser to make sure it's producing
valid XML. If you suspect there's a problem with connecting to your
database, you may find it easier to debug if you remove the line in
the file that sets the header to the text/xml content
type, as that usually causes your browser to try to parse XML and may
make it difficult to see your debugging messages.



If the script is working correctly, you should see XML output like this. phpsqlajax_expectedoutput.xml:


<markers>
<marker name="Pan Africa Market" address="1521 1st Ave, Seattle, WA" lat="47.608940" lng="-122.340141" type="restaurant"/>
<marker name="Buddha Thai & Bar" address="2222 2nd Ave, Seattle, WA" lat="47.613590" lng="-122.344391" type="bar"/>
<marker name="The Melting Pot" address="14 Mercer St, Seattle, WA" lat="47.624561" lng="-122.356445" type="restaurant"/>
<marker name="Ipanema Grill" address="1225 1st Ave, Seattle, WA" lat="47.606365" lng="-122.337654" type="restaurant"/>
<marker name="Sake House" address="2230 1st Ave, Seattle, WA" lat="47.612823" lng="-122.345673" type="bar"/>
<marker name="Crab Pot" address="1301 Alaskan Way, Seattle, WA" lat="47.605961" lng="-122.340363" type="restaurant"/>
<marker name="Mama's Mexican Kitchen" address="2234 2nd Ave, Seattle, WA" lat="47.613976" lng="-122.345467" type="bar"/>
<marker name="Wingdome" address="1416 E Olive Way, Seattle, WA" lat="47.617214" lng="-122.326584" type="bar"/>
<marker name="Piroshky Piroshky" address="1908 Pike pl, Seattle, WA" lat="47.610126" lng="-122.342834" type="restaurant"/>
</markers>



Creating the map


Once the XML is working in the browser, it's time to move on to
actually creating the map with JavaScript. If you have never created a
Google Map, please try some of the basic examples in the documentation
to make sure you understand the basics of creating a Google Map.


Loading the XML file


To load the XML file into our page, you can take advantage of the
API function GDownloadURL. GDownloadURL is
a wrapper for the XMLHttpRequest that's used to request
an XML file from the server where the HTML page resides. The first
parameter to GDownloadURL is the path to your
file—it's usually easiest to have the XML file in the same
directory as the HTML so that you can just refer to it by filename.
The second parameter to GDownloadURL is the function
that's called when the XML is returned to the JavaScript.


Note: It's important to know that
GDownloadURL is asynchronous—the callback function
won't be called as soon as you invoke GDownloadURL. The
bigger your XML file, the longer it may take. Don't put any code after
GDownloadURL that relies on the markers existing
already—put it inside the callback function instead.


In the callback function, you need to find all the "marker"
elements in the XML, and iterate through them. For each marker element
you find, retrieve the name, address, type, and lat/lng attributes
and pass them to createMarker, which returns a marker
that you can add to the map.


GDownloadUrl("phpsqlajax_genxml.php", function(data) {
 
var xml = GXml.parse(data);
 
var markers = xml.documentElement.getElementsByTagName("marker");
 
for (var i = 0; i < markers.length; i++) {
   
var name = markers[i].getAttribute("name");
   
var address = markers[i].getAttribute("address");
   
var type = markers[i].getAttribute("type");
   
var point = new GLatLng(parseFloat(markers[i].getAttribute("lat")),
                            parseFloat
(markers[i].getAttribute("lng")));
   
var marker = createMarker(point, name, address, type);
    map
.addOverlay(marker);
 
}
});

Creating custom icons


You can use the GIcon class to define custom icons
which can later be assigned to the markers. Start by declaring two
GIcon objects—iconBlue and iconRed—and define
their properties.


Warning: You may get away with specifying fewer
properties than in the example, but by doing so, you run the risk of
encountering peculiar errors later.


You then create an associative array which associates each
GIcon with one of your type strings: 'restaurant' or
'bar.' This makes the icons easy to reference later when you create
markers from the XML.


    var iconBlue = new GIcon(); 
    iconBlue
.image = 'http://labs.google.com/ridefinder/images/mm_20_blue.png';
    iconBlue
.shadow = 'http://labs.google.com/ridefinder/images/mm_20_shadow.png';
    iconBlue
.iconSize = new GSize(12, 20);
    iconBlue
.shadowSize = new GSize(22, 20);
    iconBlue
.iconAnchor = new GPoint(6, 20);
    iconBlue
.infoWindowAnchor = new GPoint(5, 1);

   
var iconRed = new GIcon();
    iconRed
.image = 'http://labs.google.com/ridefinder/images/mm_20_red.png';
    iconRed
.shadow = 'http://labs.google.com/ridefinder/images/mm_20_shadow.png';
    iconRed
.iconSize = new GSize(12, 20);
    iconRed
.shadowSize = new GSize(22, 20);
    iconRed
.iconAnchor = new GPoint(6, 20);
    iconRed
.infoWindowAnchor = new GPoint(5, 1);

   
var customIcons = [];
    customIcons
["restaurant"] = iconBlue;
    customIcons
["bar"] = iconRed;

Creating markers & info windows


You should have all your marker creation code in a
createMarker function. You can retrieve the appropriate
GIcon by using the type as the key for the associative
array that was globally defined, and pass that into the
GMarker constructor. Then, construct the HTML that you
want to show up in the info window by concatenating the name, address,
and some tags to bold the name.


Tip: Some tutorials instruct you to store
HTML-formatted descriptions in your database, but doing so means you
then have to deal with escaping HTML entities, and you'll be bound to
that HTML output.
By waiting until you've retrieved each attribute separately in the
JavaScript, you are free to play around with the HTML on the client
side and can quickly preview new formatting.



After constructing the HTML string, add an event listener to the marker so that when clicked, an info window is displayed.


function createMarker(point, name, address, type) {
 
var marker = new GMarker(point, customIcons[type]);
 
var html = "<b>" + name + "</b> <br/>" + address;
 
GEvent.addListener(marker, 'click', function() {
    marker
.openInfoWindowHtml(html);
 
});
 
return marker;
}

Putting it all together


Here's the web page that ties the markers, icons, and XML together.
When the page loads, the load function is called. This
function sets up the map and then calls
GDownloadUrl. Make sure your GDownloadUrl is
passing in the file that outputs the XML and that you can preview that
XML in the browser.


The HTML code is below the map (phpsqlajax_map.htm). Happy coding!





<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
 
<head>
   
<meta http-equiv="content-type" content="text/html; charset=utf-8"/>
   
<title>Google Maps AJAX + MySQL/PHP Example</title>
   
<script src="http://maps.google.com/maps?file=api&v=2&key=ABQIAAAAjU0EJWnWPMv7oQ-jjS7dYxTPZYElJSBeBUeMSX5xXgq6lLjHthSAk20WnZ_iuuzhMt60X_ukms-AUg"
           
type="text/javascript"></script>
   
<script type="text/javascript">
   
//<![CDATA[

   
var iconBlue = new GIcon();
    iconBlue
.image = 'http://labs.google.com/ridefinder/images/mm_20_blue.png';
    iconBlue
.shadow = 'http://labs.google.com/ridefinder/images/mm_20_shadow.png';
    iconBlue
.iconSize = new GSize(12, 20);
    iconBlue
.shadowSize = new GSize(22, 20);
    iconBlue
.iconAnchor = new GPoint(6, 20);
    iconBlue
.infoWindowAnchor = new GPoint(5, 1);

   
var iconRed = new GIcon();
    iconRed
.image = 'http://labs.google.com/ridefinder/images/mm_20_red.png';
    iconRed
.shadow = 'http://labs.google.com/ridefinder/images/mm_20_shadow.png';
    iconRed
.iconSize = new GSize(12, 20);
    iconRed
.shadowSize = new GSize(22, 20);
    iconRed
.iconAnchor = new GPoint(6, 20);
    iconRed
.infoWindowAnchor = new GPoint(5, 1);

   
var customIcons = [];
    customIcons
["restaurant"] = iconBlue;
    customIcons
["bar"] = iconRed;

   
function load() {
     
if (GBrowserIsCompatible()) {
       
var map = new GMap2(document.getElementById("map"));
        map
.addControl(new GSmallMapControl());
        map
.addControl(new GMapTypeControl());
        map
.setCenter(new GLatLng(47.614495, -122.341861), 13);

       
GDownloadUrl("phpsqlajax_genxml.php", function(data) {
         
var xml = GXml.parse(data);
         
var markers = xml.documentElement.getElementsByTagName("marker");
         
for (var i = 0; i < markers.length; i++) {
           
var name = markers[i].getAttribute("name");
           
var address = markers[i].getAttribute("address");
           
var type = markers[i].getAttribute("type");
           
var point = new GLatLng(parseFloat(markers[i].getAttribute("lat")),
                                    parseFloat
(markers[i].getAttribute("lng")));
           
var marker = createMarker(point, name, address, type);
            map
.addOverlay(marker);
         
}
       
});
     
}
   
}

   
function createMarker(point, name, address, type) {
     
var marker = new GMarker(point, customIcons[type]);
     
var html = "<b>" + name + "</b> <br/>" + address;
     
GEvent.addListener(marker, 'click', function() {
        marker
.openInfoWindowHtml(html);
     
});
     
return marker;
   
}
   
//]]>
 
</script>
 
</head>

 
<body onload="load()" onunload="GUnload()">
   
<div id="map" style="width: 500px; height: 300px"></div>
 
</body>
</html>




Friday, January 25, 2008

Problem with Client / server sample application with Opendiameter


dear friends
i am a newlearner of open diameter software
i have installed the open diameter - i version and i did not have any problem
in installation.
now when i run client/server sample applications in /libdiameter i am getting
out put something like this


(10534|3086493392) Starting diameter core
(10534|3086493392)             Product :
(10534|3086493392)             Version : 0
(10534|3086493392)           Vendor Id : 0
(10534|3086493392)  Vendor Specific Id : (10534|3086493392)      Vendor=--- ---
(10534|3086493392)  Vendor Specific Id : (10534|3086493392)      Vendor=--- ---
(10534|3086493392)          Dictionary :
(10534|3086493392)            Identity :
(10534|3086493392)               Realm :
(10534|3086493392)          TCP Listen : 0
(10534|3086493392)         SCTP Listen : 0
(10534|3086493392)   Watch-Dog timeout : 0
(10534|3086493392)            Use IPv6 : 0
(10534|3086493392) Re-transmission Int : 0
(10534|3086493392)    Max Re-trans Int : 0
(10534|3086493392)    Recv Buffer Size : 2048
(10534|3086493392) Dumping Peer Table
(10534|3086493392)      Expire Time 0
(10534|3086493392)                Peer : Host = , Port = 16, TLS = 1
(10534|3086493392)                Peer : Host = , Port = 16, TLS = 1
(10534|3086493392)                Peer : Host = , Port = 16, TLS = 1
(10534|3086493392)                Peer : Host = , Port = 16, TLS = 1
(10534|3086493392)  Dumping Route Table
(10534|3086493392)            Exp Time : 0
(10534|3086493392)              Route  : Realm = , Action = 0, Redirect-Usage
= 0
(10534|3086493392)                       Application Id=0, Vendor=0
(10534|3086493392)                          Server = , metric = 0
(10534|3086493392)      Default Route
(10534|3086493392)              Route  : Realm = , Action = 0, Redirect-Usage
= 0
(10534|3086493392)                       Application Id=0, Vendor=0
(10534|3086493392)                          Server = , metric = 0
(10534|3086493392)            Max Sess : 0
(10534|3086493392)  Auth Stateful Auth : stateless
(10534|3086493392)     Auth Session(T) : 0
(10534|3086493392)    Auth Lifetime(T) : 0
(10534|3086493392)       Auth Grace(T) : 0
(10534|3086493392)       Auth Abort(T) : 0
(10534|3086493392)     Acct Session(T) : 0
(10534|3086493392)    Acct Interim Int : 0
(10534|3086493392)      Acct Real-Time : 0
(10534|3086493392)           Debug Log : disabled
(10534|3086493392)           Trace Log : disabled
(10534|3086493392)            Info Log : disabled
(10534|3086493392)         Console Log : disabled
(10534|3086493392)          Syslog Log : disabled
terminate called without an active exception
Aborted




i cannot see anything set in the output.
i have used the xml file called libdiameter/config/agent.local.xml and the structure
is like this




<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE configuration SYSTEM "configuration.dtd">
<configuration>
  <general>
     <product>Open Diameter</product>
     <version>1</version>
     <vendor_id>0</vendor_id>

 <supported_vendor_id>0</supported_vendor_id>
     <supported_vendor_id>1</supported_vendor_id>
     <auth_application_id>1</auth_application_id>
     <auth_application_id>2</auth_application_id>
     <auth_application_id>10000</auth_application_id>
     <auth_application_id>20000</auth_application_id>
     <acct_application_id>3</acct_application_id>
     <acct_application_id>4</acct_application_id>
     <vendor_specific_application_id>
         <vendor_id>31</vendor_id>
         <auth_application_id>1</auth_application_id>
     </vendor_specific_application_id>
     <vendor_specific_application_id>
         <vendor_id>41</vendor_id>
         <acct_application_id>6</acct_application_id>
     </vendor_specific_application_id>
  </general>
  <parser>
     <dictionary>config/dictionary.xml</dictionary>
  </parser>
  <transport_mngt>
     <identity>proxy.inter     mediate.net</identity>
     <realm>intermediate.net</realm>
     <tcp_listen_port>1812</tcp_listen_port>
     <sctp_listen_port>1813</sctp_listen_port>
     <use_ipv6>0</use_ipv6>
     <watchdog_timeout>4</watchdog_timeout>
     <reconnect_interval>30</reconnect_interval>
     <reconnect_max>3</reconnect_max>
     <request_retransmission_interval>10</request_retransmission_interval>
     <max_request_retransmission_count>3</max_request_retransmission_count>
     <receive_buffer_size>2048</receive_buffer_size>
     <advertised_hostname>agent1.isp.net</advertised_hostname>
     <peer_table>
         <expiration_time>1</expiration_time>
         <peer>
             <hostname>server.isp.net</hostname>
             <port>1811</port>
             <tls_enabled>0</tls_enabled>
         </peer>
         <peer>
             <hostname>nas.access1.net</hostname>
             <port>1811</port>
             <tls_enabled>0</tls_enabled>
         </peer>
         <peer>
             <hostname>nas.access2.net</hostname>
             <port>1811</port>
             <tls_enabled>0</tls_enabled>
         </peer>
         <peer>
             <hostname>nas.access3.net</hostname>
             <port>1811</port>
             <tls_enabled>0</tls_enabled>
         </peer>
     </peer_table>
     <route_table>
         <expire_time>0</expire_time>
         <route>
            <realm>access1.net</realm>
            <role>0</role>
            <redirect_usage>0</redirect_usage>
            <application>
               <application_id>0</application_id>
               <vendor_id>0</vendor_id>
               <peer_entry>
                   <server>nas.access1.net</server>
                   <metric>2</metric>
               </peer_entry>
            </application>
            <application>
               <application_id>1</application_id>
               <vendor_id>0</vendor_id>
               <peer_entry>
                   <server>nas.access1.net</server>
                   <metric>2</metric>
               </peer_entry>
               <peer_entry>
                   <server>nas2.access1.net</server>
                   <metric>4</metric>
               </peer_entry>
               <peer_entry>
                   <server>nas3.access1.net</server>
                   <metric>5</metric>
               </peer_entry>
            </application>
         </route>
         <route>
            <realm>access2.net</realm>
            <role>1</role>
            <redirect_usage>6</redirect_usage>
            <application>
               <application_id>1</application_id>
               <vendor_id>0</vendor_id>
               <peer_entry>
                   <server>nas.access2.net</server>
                   <metric>2</metric>
               </peer_entry>
            </application>
         </route>
         <route>
            <realm>access3.net</realm>
            <role>0</role>
            <redirect_usage>0</redirect_usage>
            <application>
               <application_id>0</application_id>
               <vendor_id>6</vendor_id>
               <peer_entry>
                   <server>nas.access3.net</server>
                   <metric>2</metric>
               </peer_entry>
               <peer_entry>
                   <server>nas2.access3.net</server>
                   <metric>4</metric>
               </peer_entry>
               <peer_entry>
                   <server>nas3.access3.net</server>
                   <metric>5</metric>
               </peer_entry>
            </application>
            <application>
               <application_id>1</application_id>
               <vendor_id>0</vendor_id>
               <peer_entry>
                   <server>nas.access3.net</server>
                   <metric>2</metric>
               </peer_entry>
               <peer_entry>
                   <server>nas2.access3.net</server>
                   <metric>4</metric>
               </peer_entry>
               <peer_entry>
                   <server>nas3.access3.net</server>
                   <metric>5</metric>
               </peer_entry>
            </application>
         </route>
         <default_route>
            <realm>access1.net</realm>
            <role>0</role>
            <redirect_usage>0</redirect_usage>
            <application>
               <application_id>0</application_id>
               <vendor_id>0</vendor_id>
               <peer_entry>
                   <server>nas.access1.net</server>
                   <metric>4</metric>
               </peer_entry>
          </application>
 </transport_mngt>
  <session_mngt>
     <max_sessions>10000</max_sessions>
     <auth_sessions>
        <stateful>1</stateful>
        <session_timeout>30</session_timeout>
        <lifetime_timeout>360</lifetime_timeout>
        <grace_period_timeout>30</grace_period_timeout>
        <abort_retry_timeout>20</abort_retry_timeout>
     </auth_sessions>
     <acct_sessions>
        <session_timeout>30</session_timeout>
        <interim_interval>5</interim_interval>
        <realtime>1</realtime>
     </acct_sessions>
  </session_mngt>
  <log>
     <flags>
        <debug>enabled</debug>
        <trace>enabled</trace>
        <info>enabled</info>
     </flags>
     <target>
        <console>enabled</console>
        <syslog>enabled</syslog>
     </target>
  </log>
</configuration>




http://www.tutorialsforu.info - Free Online tutorials
http://www.onlineforu.info - Huge Wallpaper Collection
:::: Google Partner Projects ::::