1

I have my own prosody server setup and can connect to it via a windows XMPP client. The server has two accounts on it, and I can connect as both of them and exchange messages between them (I am using the built-in client in Mozilla Thunderbird).

I have a Virtualhost configured on the server ("domain.com").

I am now trying to connect to the server via PHP as one of the accounts and send a message to the other. I have chosen JAXL to do that.

    $client = new JAXL(array(
        'jid' => 'username',
        'host' => 'domain.com',
        'pass' => 'mylongcomplicatedpassword',
        'auth_type' => 'SCRAM-SHA-1',
        'log_level' => JAXLLogger::DEBUG,
        'log_path' => './jaxl.log',
        'strict' => false,
    ));
    $client->start();

Note the format of 'jid'. This results in an error "This server does not serve username".

If I change the jid to username@domain.com, I get instead "Invalid username."

If I add

$client->require_xep(array('0114'));

before the start(), I get a "This server does not serve... ". in both formats of the JID.

What could be wrong? This is running on PHP 7.1 and the latest versions of JAXL and prosody.

uncovery
  • 794
  • 5
  • 19
  • Hi! I have the very same issue here and working on this for several hours :( Did you find a solution? Thanks! – Guybrush May 22 '18 at 01:45
  • 1
    @Guybrush: No. I finally gave up and I am using a perl script now. See here: https://github.com/uncovery/xmpp_error/blob/master/xmpp.pl – uncovery May 23 '18 at 06:45
  • Ok, thank you for the tip! But realy hope someone answer your question, see many people with same issue in my researchs. And there are very few or none information online about this subject (at least I can't find). – Guybrush May 23 '18 at 20:53

0 Answers0