Code Monkey home page Code Monkey logo

php-jabber-rpc's People

Contributors

misterion avatar pr0head avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

php-jabber-rpc's Issues

{error,account_unprivileged} always crashed.

i am runing with ejabberd 15.11 and use the code below:

include_once '/data/home/yzhang/Home/www/public/ejabberd/rpc/vendor/autoload.php';

$rpc = new \GameNet\Jabber\RpcClient([
    'server' => 'http://42.96.194.60:4560',
    'host' => 'coopens.com',
    'debug' => true,
]);

$rpc->checkAccount('zyf');

but it just crash a error:

A problem '{error,account_unprivileged}' occurred executing the command check_account with arguments

and i have test python code success:

server_url = 'http://42.96.194.60:4560'
server = xmlrpclib.ServerProxy(server_url)

EJABBERD_XMLRPC_LOGIN = {'user': 'zyf', 'server': 'coopens.com', 'password': '123456'} # , 'token': 'k1iTItUPDgH9NB4yTFYyTttRtNIlHjyV'

def ejabberdctl(command, data):
    fn = getattr(server, command)
    return fn(EJABBERD_XMLRPC_LOGIN, data)

result = ejabberdctl('register', {'user':'ggeo224', 'host':'coopens.com', 'password':'gogo11'})
print result

it seems to have login with admin account to run this function in advance.
i dont know how to deal with it,who can help me?

Creating User

I am using the following code

require_once __DIR__.'/vendor/autoload.php';
// use \GameNet;

    $rpc = new \GameNet\Jabber\RpcClient([
        'server' => 'http://127.0.0.1:4560',
        'host' => 'lakki.com',
        'debug' => false,
    ]);

    //Create 2 new users with name `Ivan` and `Petr` with password `someStrongPassword`
    $rpc->createUser('Ivan', 'someStrongPassword');

When I'm trying to excute the script I was getting following error

Argument 1 passed to fXmlRpc\Transport\HttpAdapterTransport::__construct() must be an instance of Http\Message\MessageFactory, instance of Ivory\HttpAdapter\CurlHttpAdapter given, called in /var/www/html/php-jabber-rpc/lib/GameNet/Jabber/RpcClient.php on line 140 and defined in /var/www/html/php-jabber-rpc/vendor/lstrojny/fxmlrpc/src/fXmlRpc/Transport/HttpAdapterTransport.php on line 39

What is wrong in my script??

Unknow call

I always get this error while calling register, as

Error -112 Unknown call: {call,check_account, [{

which works fine from command line ejabberdctl.

Fatal Exception

i am using this

$rpc = new \GameNet\Jabber\RpcClient([
'server' => 'http://192.168.200.17:4560',
'host' => 'lanetteam.com',
'debug' => false,
]);

$username='user4'; $contacts = $rpc->getRoster($username);

I am getting this below error. What may be the issue?

Fatal error: Uncaught exception 'RuntimeException' with message 'Error execution command 'get_roster'' with parameters array ( 'user' => 'user4', 'host' => 'lanetteam.com', ). Response: ' in /var/www/html/ejabber/vendor/gamenet/php-jabber-rpc/lib/GameNet/Jabber/RpcClient.php:96 Stack trace: #0 /var/www/html/ejabber/vendor/gamenet/php-jabber-rpc/lib/GameNet/Jabber/Mixins/RosterTrait.php(63): GameNet\Jabber\RpcClient->sendRequest('get_roster', Array) #1 /var/www/html/ejabber/index.php(14): GameNet\Jabber\RpcClient->getRoster('user4') #2 {main} thrown in /var/www/html/ejabber/vendor/gamenet/php-jabber-rpc/lib/GameNet/Jabber/RpcClient.php on line 96

Problems with create user

I'm getting issues using the latest ejabberd when creating a user.
The error I'm seeing is the following:

2016-11-06 21:49:45.803 [warning] <0.344.0>@ejabberd_xmlrpc:process:225 wrong options format for ejabberd_xmlrpc: register 2016-11-06 21:49:45.804 [warning] <0.344.0>@ejabberd_xmlrpc:build_fault_response:421 Error -116 Required attribute 'user' not found: []

Any ideas what could be causing this?

Thanks,

PHP Fatal error: Uncaught exception 'RuntimeException'

hello every I am using php-jabber-rpc with ejabberd ejabberd 16.01.
My source code looks as followed:

require 'vendor/autoload.php';

$rpc = new \GameNet\Jabber\RpcClient([
'server' => 'http://192.168.0.100:4560',
'host' => 'esfam.auf.org',
'username' => 'admin',
'password' => 'pessek&12',
'debug' => true,
]);
$rpc->createUser('Ivan', 'someStrongPassword');

But I have the following error:
PHP Fatal error: Uncaught exception 'RuntimeException' with message 'Error execution command 'register'' with parameters array (\n 0 => \n array (\n 'user' => 'admin',\n 'server' => 'http://192.168.0.100:4560',\n 'password' => 'pessek&12',\n ),\n 1 => \n array (\n 'host' => 'esfam.auf.org',\n 'user' => 'Ivan',\n 'password' => 'someStrongPassword',\n ),\n). Response: ' in /var/www/html/php-jabber-rpc/vendor/gamenet/php-jabber-rpc/lib/GameNet/Jabber/RpcClient.php:183\nStack trace:\n#0 /var/www/html/php-jabber-rpc/vendor/gamenet/php-jabber-rpc/lib/GameNet/Jabber/Mixins/UserTrait.php(64): GameNet\Jabber\RpcClient->sendRequest('register', Array)\n#1 /var/www/html/php-jabber-rpc/index.php(15): GameNet\Jabber\RpcClient->createUser('Ivan', 'someStrongPassw...')\n#2 {main}\n thrown in /var/www/html/php-jabber-rpc/vendor/gamenet/php-jabber-rpc/lib/GameNet/Jabber/RpcClient.php on line 183

When I check my ejabberd log I have the following entries:

[warning] <0.623.0>@ejabberd_xmlrpc:build_fault_response:386 Error -118
A problem '{error,invalid_account_data}' occurred executing the command register with arguments
[{host,<<"esfam.auf.org">>},
{user,<<"Ivan">>},
{password,<<"someStrongPassword">>}
]

Could someone help me ? I dont know what's wrong with my settings.

Thanks a lot.

Fatal Exception

I am using this
$rpc = new \GameNet\Jabber\RpcClient([
'server' => 'http://localhost:5222',
'host' => 'localhost',
'debug' => true,
]);

//Create 2 new users with name `Ivan` and `Petr` with password `someStrongPassword`
$rpc->createUser('Ivan', 'someStrongPassword');

I am getting this below error. What may be the issue?

Fatal error: Uncaught exception 'RuntimeException' with message 'Error execution command 'register'' with parameters array ( 'host' => 'localhost', 'user' => 'Ivan', 'password' => 'someStrongPassword', ). Response: <stream:stream xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' id='714372684' from='localhost' version='1.0'>stream:error/stream:error/stream:stream' in /var/www/first/vendor/gamenet/php-jabber-rpc/lib/GameNet/Jabber/RpcClient.php:96 Stack trace: #0 /var/www/first/vendor/gamenet/php-jabber-rpc/lib/GameNet/Jabber/Mixins/UserTrait.php(64): GameNet\Jabber\RpcClient->sendRequest('register', Array) #1 /var/www/first/vendor/aaa.php(10): GameNet\Jabber\RpcClient->createUser('Ivan', 'someStrongPassw...') #2 {main} thrown in /var/www/first/vendor/gamenet/php-jabber-rpc/lib/GameNet/Jabber/RpcClient.php on line 96

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.