title: XMPPHP to Openfire
body: <p>(This is my first ever question so please excuse the noobness)</p>
  
  <p>I have  a Ubuntu VPS from DigitalOcean that I have Openfire installed and running. I'm trying to use XMPPHP to send alerts but it doesn't send the message.</p>
  
  <p>My Code:</p>
  
  <pre><code>include("../XMPPHP/XMPP.php");
  $conn = new XMPPHP_XMPP('***.***.***.***', 5222, 'alert', 'password', 'xmpphp', '***.***.***.***', $printlog=false, $loglevel=XMPPHP_Log::LEVEL_INFO);
  $conn-&gt;useEncryption(false);
  $conn-&gt;connect();
  $conn-&gt;processUntil('session_start');
  $conn-&gt;presence("Ya, I'm online","available","aim.***.***.***.***");
  $conn-&gt;message('user@***.***.***.***', "Whoah!");
  $conn-&gt;disconnect();
  </code></pre>
  
  <p>Error: Fatal error: Maximum execution time of 30 seconds exceeded in /var/www/html/XMPPHP/Log.php on line 86</p>
  
  <p>More Detailed Logs</p>
  
  <pre><code>1412738973 [INFO]: Connecting to tcp://***.***.***.***:5222 1412738973 [INFO]: Attempting Auth... 
  1412738973 [INFO]: Trying DIGEST-MD5 (available : DIGEST-MD5,PLAIN) 1412738973 [INFO]: Auth success! 
  1412738973 [INFO]: Bound to alert@***.***.***.***/xmpphp 1412738973 [INFO]: Session started Fatal error: Maximum execution time of 30 seconds exceeded in /var/www/html/XMPPHP/Log.php on line 86
  </code></pre>
  
  <p>I have this same code working just fine on Openfire installed on CentOS at work but my current setup is on Ubuntu. Not sure if that would make a difference. I was getting encryption failed error so it's been disabled.</p>
  
  <p>If I don't disable it in the script, I get this error</p>
  
  <pre><code>[INFO]: Starting TLS encryption Warning: stream_socket_enable_crypto(): SSL: crypto enabling timeout in /var/www/html/XMPPHP/XMPP.php on line 525 Fatal error: Maximum execution time of 30 seconds exceeded in /var/www/html/XMPPHP/XMLStream.php on line 466
  </code></pre>
  
  <p>All I know so far is that it connects, authenticates then starts the session and on presence it gets stuck. I have tried many variations of ports, server names etc</p>
  
  <p>Ubuntu: 12.04.5 LTS
  PHP: 5.3.10
  Openfire: 3.9.3</p>
  
  <p>Not sure where to go or what to do. Please advise as to what I can try to resolve this issue.</p>
  
  <p>Thanks so much in advance.</p>