XMPPHP and Openfire - openfire

I'm a newbie to XMPP and I'm looking to basically connect the PHP to an OpenFire installation on my localhost.
This is a piece of code I found (hack and slash I know but I can't seem to wrap my head around this). Anyway code just simply sends a message:
<?php
include("xmpp.php");
//username = user without domain, "user" and not "user#server" - home is the resource
$conn = new XMPPHP_XMPP('my.server', 5222, 'username', 'password', 'home');
// Enables TLS - enabled by default, call before connect()!
$conn->useEncryption(true);
$conn->connect();
$conn->processUntil('session_start');
$conn->message('someguy#someserver.net', 'This is a test message!');
$conn->disconnect();
?>
My question is what should I replace my.server with ? Tried looking but I couldn't find anything
Also
Home is the resource
I have no idea what that means idea.
username and password ?
Is that of any user on my OpenFire?
I'm looking for more advice than complete solutions. Thanks For Anything. Oh And Happy New Year!

Actually you also know a little about Openfire ,so this is the key point .
In this case , Openfire is your IM Server and the php snippet is your IM client . Before you connect to your IM server you should make some configuration in Openfire admin console . As you said install Openfire locahost ,then start Openfire and visit in your browser http://localhost:9090/ , if you never do this step , this means you do not finish to setup Openfire . When you make configuration you will see the admin user setting and password and some other parameters . After this step , you can login to Openfire by your admin username and password .
If you want to more test user , pleas visit Openfire admin console again ,and click user tab to new more users .
my.server = localhost,
home = any string you like , this the resource in XMPP usually we use client application version like spark 2.0 or xmpphp3.8 .

Related

Problem authentication for the first time to Zeppelin Server web UI

I already installed Cloudera manager. After that, I add Zeppelin service and I start it.
I want to launch the Zeppelin Server Web UI and to authenticate with user=admin and password=admin but I didn't succeed. Error message: "The username and password that you entered don't match."
have you any idea please to unblock the situation?
Thanks.

Keycloak federation with LDAP fails to make the connection : Error! Error when trying to connect to LDAP. See server.log for details

I am trying to create a federated authentication using the Keycloak and following the steps mentioned here: Setup User Federation with Keycloak
I have been using the port 10389 instead of 389 mentioned in the document. Everything seems to be working fine until the step where I am making the connection from Keycloak to LDAP.
When I provide the Connection URL as ldap://localhost:10389 and click on the Test Connection then I get the error:
Error! Error when trying to connect to LDAP. See server.log for details
I am not sure what's wrong because when I check in the Apache Directory Studio there everything seems to be working fine for me and I am able to get all the users list etc. I am not sure why I am unable to make the connection from Keycloak to LDAP.
I tried the following things but nothing worked for me:
ldap://localhost:10389
localhost:10389
ldap://127.0.0.1:10389
ldap://localhost:389
Stopped the docker in the dashboard and started again.
After trying a lot I found the solution. Posting the answer as it can be useful to someone else in the future.
I was using the localhost and 127.0.0.1 which was not working. Finally, I checked the IP Address of my system using the terminal (for mac ipconfig) and tried that and it worked:
ldap://192.168.1.12:10389

Operations error : while querying ldap_search_ext_s in Objective-C

I am using ldap for user authentication as mentioned in this link.
http://www-archive.mozilla.org/directory/csdk-docs/writing.htm
Here I am getting "Operations error" while ldap_search_ext_s call. Can anyone tell me what changes I need to do in order to get the user information from Active Directory.
Note : I don't want to enter the dc name and password while binding. Since machines will be running under normal users account (domain users) which do not have admin credentials in domain.Please let me know how to do binding in this case also.
My machine details :
Mac Lion, 64 Bit.
I am trying to connect to Windows Active Directory.
Thanks,
Tausif.
You need to bind with a valid username and password when connecting to a Windows Active Directory server in most cases.
When you're performing your ldap_simple_bind_s(), the two NULL parameters need to be replaced - the first with the DN of the user that is performing the bind, the second with the password for that DN.
There's more link detail in this answer

Openfire database settings issue in mac

I have Openfire 3.7.1 installed on my Mac and have XAMPP installed aswell. I am having trouble configuring OpenFire. In the server settings I have given san-imac.local.lan as the domain name. The selected Standard database connection and picked MySql Database Driver. This is the databse URL jdbc:mysql://localhost:3306/test and given the username password of XAMPP phpmyadmin. But it says
A connection to the database could not be made. View the error message by opening the "/logs/error.log" log file, then go back to fix the problem.
First of all there is no such file in the /logs folder. What should I do to get this working and follow the procedures to get OpenFire up and running.
I need to build an app to connect to openfire for IM chatting like Gmail, Facebook, Yahoo using XMPP. If anybody could provide any guidance aswell, it will be very helpful.
Make Sure that your database is setup correctly including the name of your database, database username, and user's password. If you have this correctly configured then your opens ire should work just fine. Note that it will not accept if the database username has an empty password or not enough access rights to the database.
I hope that those hints will solve your problem.
check your password and username, I had the same error and it took me a while to figure out that I had my username wrong.
Resolved the issue.
log file is not getting created due to file write permission. To resolve this run OF server as follows
Run the openfire.sh file from terminal with sudo. This will start the OF with root access Now the error log file will be created.
My log file has error message as access denied to user #localhost. As I kept the user field blank in db connection page of openfire set up.
Keep the user field as root#localhost if u are using localhost.

How do I authenticate to view mongodb's http console?

I'm running a mongodb process with the following line:
/usr/bin/mongod --dbpath /var/db/mongo --journal
According to mongodb's docs:
http://www.mongodb.org/display/DOCS/Http+Interface
I should be able to access the http console with http://myhost:28017
When I attempt to access the page it asks for authentication.
According to the docs if security is configured I would need to authenticate. But after looking at mongodb.org/display/DOCS/Security+and+Authentication it seems clear to me I'm not using any authentication. I don't run the process with the --auth option, nor are there any users when I run a db.system.users.find() command.
What's going on here?
I have been able to reproduce this, and this is not the intended behavior. I have filed https://jira.mongodb.org/browse/SERVER-4601 The fix version is 2.1.1
Thank you for bringing this to our attention!
In the meantime, there are two work-arounds:
1) Enter the credentials for authentication in the browser pop-up window
2) Remove all user credentials from each of your DBs (including admin) using db.system.users.remove()
Either of these should allow you to view the http console.
Greetings Brain,
i am using mongo V 2.4.6 and its on default port 27017, its http console is enabled by default but when you try to access from Network it ask for password and i dont know why as i am new to this and dont know the exact reason. by i have a way to access it.
Create a tunnel to your mongo Server and when you access, it wont ask for password. and if you are using putty.
enter host name
go to ssh on left menu options and click +
Than Click on tunnel
in Source port type 28017
in destination type localhost colon port 28017(sorry dont know how to write http url in localhost here in my post)
not click open and provide ssh username and password
now open browser on PC from where you are doing ssh .Type localhost and port 28017
and Boom its accessible and wont ask for username and password. hope it work for you, let me know if u need any help.