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 [email protected], 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.