Posts

osx - Kamailio installation error on MAC 10.9, what is this error? -

i trying install kamailio 4.1 on mac os10.9 command: make cfg; make all; make install but see on terminal, through: mkdir -p /usr/local/etc/kamailio/ /bin/sh: -c: line 1: syntax error: unexpected end of file make: *** [install-cfg] error 2 what error? missing else? please guide me correct way achieve objective. not clear provided log messages, expect file system privileges. need run 'make install' via sudo (or privileged user can create directory /usr/local/etc/kamailio/). i use kamailio on mac os x few years now. apart of installing libraries via mac ports various modules, runs smooth.

parsing - How do you parse and process HTML/XML in PHP? -

how can 1 parse html/xml , extract information it? native xml extensions i prefer using 1 of native xml extensions since come bundled php, faster 3rd party libs , give me control need on markup. dom the dom extension allows operate on xml documents through dom api php 5. implementation of w3c's document object model core level 3, platform- , language-neutral interface allows programs , scripts dynamically access , update content, structure , style of documents. dom capable of parsing , modifying real world (broken) html , can xpath queries . based on libxml . it takes time productive dom, time worth imo. since dom language-agnostic interface, you'll find implementations in many languages, if need change programming language, chances know how use language's dom api then. a basic usage example can found in grabbing href attribute of element , general conceptual overview can found @ domdocument in php how use dom extension has been covered exte...

php - SLIM Separating out route from function using TWIG -

if want separate out route function best way still need use($app,$twig) $app->get('/app(/:date(/:time))', function ($date = null,$time = null) use ($app,$twig) { //do stuff using twig }); $app->run(); new route, function function app(... $app->get('/app(/:date(/:time))', 'app'); edit 1 - next try using class give `undefined variable: twig' $actions = new actions($app, $twig); $app->get('/app(/:date(/:time))', [$actions, 'app']); $app->run(); class actions { protected $app, $twig; public function __construct($app, $twig) { $this->app = $app; $this->twig = $twig; } public function app($date = null,$time = null) { // print_r($:date); // data using date time $template = $twig->loadtemplate('template.php'); echo $template->render(array( ........ )); } } $appfunc = funct...

php - Cannot able to access class function in different file -

index.php <?php include 'foo.php'; ?> <div id="middle_containe_cr" style="background-color:#f0f0ff"> <form method="post" action="actionpage.php" enctype="multipart/form-data"> <table cellspacing="30px" style="padding-left:25%"> <tr> <td colspan="2" align="center" style="font:caption" > hi <form method="post" action="actionpage.php" enctype="multipart/form-data"> <table cellspacing="30px" style="padding-left:25%"> <tr> <td colspan="2" align="center" style="font:caption" > hi <?php $blobj=new foo(); $userdetails=$blobj->samplefunction($userid); echo $userdetails->name; ?> </td> </tr> <tr> <td width="299">userid</td> <td width="302"><?php echo $userid; ?></td...

android - Unable to register in the Registration(Table not getting inserted) -

i have tried create registration , login page.but when trying register,the field values not getting inserted.this code mainactivity.java package com.example.login1; import android.support.v7.app.actionbaractivity; import android.support.v7.app.actionbar; import android.support.v4.app.fragment; import android.app.activity; import android.content.context; import android.content.intent; import android.database.cursor; import android.database.sqlite.sqlitedatabase; import android.os.bundle; import android.view.layoutinflater; import android.view.menu; import android.view.menuitem; import android.view.view; import android.view.viewgroup; import android.view.view.onclicklistener; import android.widget.button; import android.widget.edittext; import android.widget.toast; import android.os.build; public class mainactivity extends activity implements onclicklistener { button mlogin; button mregister; edittext muname; edittext mpassword; dbhelper db = null; ...

android - Quickblox pricing confusion based on plans -

want build demo app in android p2p video chat; after looking @ quickblox plan pricing realized not explained @ all. my question if wanted have 1:1 live video chatting on app, free tier allow 20 seconds of video chatting before throttling or cutting off users? can customize api allow direct p2p video connection in conjunction using stun/turn servers?

accessing other php script resources/variables -

well, searching while , couldn't find solution or workaround accessing other php script. i have script running in cli , u guessed socket server, , of course have variables, objects, arrays, etc... i need debug file without need of printing/ echoing variables script itself, know can kinda messy , long run end increasing file size commented , unwanted line of codes, took time clean later on. , plus need make sort of command line interface server in future. so question there way read or debug script variables script running in cli instance? ( can included instance other values/variables) in addition, can run specific function outside of script? use reflections ? i tried _session cannot access while server running. in c# or java can. i don't know if it's possible, suggest other solution "inspecting" variables in running script. use db store logs current operation , it's variables. managed config written in db write logs or important ones, di...