This blog post provides detailed instructions on how to download and setup Jaxl 2.0 for quick XMPP application development using PHP. We will also see how to run XMPP bots using Jaxl command line utility (now available by just typing jaxl on the terminal).
The development version of Jaxl is hosted here at Github, have fun cloning the source code with Git. If you are not familar with Git just use the download button to get a tarball.
Warning: the development source code is only intended for people that want to develop Jaxl or absolutely need the latest features still not available on the stable releases.
Extract the downloaded tarball and enter source directory. The available build.sh file will help us installing Jaxl library at a preferred location on our system. Type ./build.sh help to view help instructions:
/var/log/jaxl.log is default log file for Jaxl applications and /var/run/jaxl.pid saves the process id (pid) of running Jaxl instances.
Now that we have setup Jaxl on our system, lets verify package installation by firing jaxl command line utility on the terminal:
If you get “Missing ini file” message, you have successfully verified package installation. This message is shown when current working directory doesn’t have jaxl.ini file, which is required by Jaxl cli utility before it can connects to a jabber server.
2946 is the process id of current running Jaxl instance. Same value can be found inside /var/run/jaxl.pid. Also tail the Jaxl log file for debug information:
[[XMPPSend]] tells us that following XMPP packet was send by the Jaxl instance running with pid 2946. Also, total 123 bytes were transmitted over the socket.
Proceed to Writing your first command line bot using Jaxl for detailed explanation of the sample echobot application or if you are interested in building real-time web applications read Setup and Demo of Jaxl boshchat application
Jaxl lib actually doesn’t know what is it talking to… as far as it’s all XMPP, jaxl should work with Tigase too..
A dumb question. I used to host my bots on Imified.com. Now that the site is closing down, I need to create my own bots. Jaxl looks promising to me.
Can you guide me how to start and read a level where a user can interact directly with my bot in Gtalk??
I will recommend not to use v2.x any more. v3.x is faster and have a lot more goodies compared to v2.x
Using jaxl we are able to create and delete users in ejabberd server. But now we moved to tigase server as xmpp server, add and delete now not working. We are getting SASL authentification error. When i changed authType’=>’PLAIN’
I have Windows 7 with XAMPP Server. I try with Jaxl send message. I set correct value in app/sendMessage.php. I set correct path for Log and Pid Path [what do you need it?] in core/jaxl.class.php [maybe it’s not the best way], refresh page and … nothing happens, I not receive any messages.
Jaxl is good project, but It should be OS platform-independent and user should not be exposed to compile project. I’m tried run one of the example codes and I’m obtain some errors, look:
i think these are minor errors which user should obviously be able to solve looking at the log content.
However a future release will target to throw more user understandable error/warning to ease out first experience with library.
Not sure why message got truncated – probably there’s a limit on the size of a post. Anyhow, if any body has any suggestion on the above issue please let me know and if required I can send them my jaxl.ini and jaxl.log for review.
I am using JAXL 2.1.1. I have installed it following the procedure described in the blog above. I then tried the echobot.php for getting online presence information from facebook. However, the program is getting halted after the following steps:
Could anyone please tell me what’s going wrong here? I have tried this also for gtalk server and the result is same. Thanks in advance.
Hi Nil, What version of Jaxl are you using. Can you open an issue here with all related files attached so that i can help you out.
I downloaded your package, extracted it to some location on my server, edited echobot.php with correct gtalk info and ran echobot.php in my browser.
Whilst I thank you for the library you’ve developed the documentation, and instructions are a little poor.
There is no build.sh in the latest release, so people following this tutorial like myself are left hanging until you respond to us. Please update your blog as to why there is no build.sh and what we should do to install it.
Jaxl v 2.1.2-rc1 removes build.sh from distribution. Users should now simply download/extract/include and start writing XMPP applications now.
Download/extract and include v 2.1.2-rc1 which removes build.sh dependency. Kindly let me know how it goes.
You can use Net_DNS package from PEAR repository. Since it is not supported on windows, i didn’t made it as a dependency inside Jaxl core.
Hi I m trying to setup jaxl on windows but i don’t find any help for that. The link u mention is broken.
Sigh. Yet another client. I’m trying to set up a XMPP chat HOST. I’m using a web hosting site. I do not have shell access. I cannot run the chat system as a background process. I had my site hosting company open the necessary ports already. I can do the latest PHP and Perl programs, scripted or pre-compiled. I’m working with a private group with sensitive data and I can’t go through a third party host. Obviously submitting any such website for “pre-approval” is out of the question. Is there any use I can get out of your library for such a project?
Using Jaxl for web based chat applications doesn’t require you to run any background process. All you need is a web server and jabber server.
Kindly let me know the domain you want to run chat widget upon and we can work out a possible solution for it. 🙂
I am not sure how you are trying to implement Jaxl on your system? What is your system configuration? What are the exact steps that you followed? What do you see inside jaxl.log, which can probably help us debug your problem in detail.
Every single example application works out on linux/windows, you probably are missing out the basic clue somewhere… 🙂
look I tried this guide http://abhinavsingh.com/blog/2010/08/facebook-chat-connect-with-x-facebook-platform-using-jaxl-2-0/ several times in diffrents ways and I dont understand what am i doing wrong that it ain’t works:S
You need to go through a bunch of tutorials (http://code.google.com/p/jaxl/#Documentation_for_Jaxl_Users) before you can get any of them started…
/app directory contains 4 sample application in respective sub-directories. Documentations will help you with how to set them up and run on your own servers…
sorry for the dump question but i upload everything to the server by the FTP, I entered to the apps and nothing you can see: http://akamaor.com/test/jaxl/app/
Was that a joke? 😉 Seriously you can find 4 working example: echobot (command line application), component bot (cli app) and 2 Bosh applications (one for peer-2-peer chat and another for MUC chat) under downloaded /app folder…
Here is a direct link.. http://github.com/abhinavsingh/JAXL/tree/master//app/ Do let me know if you face any difficulty in getting started with Jaxl
i dont understand this jaxl platform, I mean there is not finish application that i can use and test to see how it’s work and learn from it?
Surely some developers have already requested for the same. I am planning for a post this coming weekend, explaining JAXL setup on windows server.