(这是我的第一个问题,所以请原谅我的下流)
我有一个来自DigitalOcean的Ubuntu,我已经安装并运行了Openfire。我试图使用XMPPHP发送警报,但它不发送消息。
我的守则:
include("../XMPPHP/XMPP.php");
$conn = new XMPPHP_XMPP('***.***.***.***', 5222, 'alert', 'password', 'xmpphp', '***.***.***.***', $printlog=false, $loglevel=XMPPHP_Log::LEVEL_INFO);
$conn->useEncryption(false);
$conn->connect();
$conn->processUntil('session_start');
$conn->presence("Ya, I'm online","available","aim.***.***.***.***");
$conn->message('user@***.***.***.***', "Whoah!");
$conn->disconnect();错误:致命错误:第86行/var/www/html/XMPPHP/Log.php中超过30秒的最大执行时间
更详细的日志
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我在CentOS上安装了同样的代码,但是我现在的设置是在Ubuntu上。不知道这会不会有什么区别。我收到加密失败的错误,所以它被禁用了。
如果我没有在脚本中禁用它,我就会得到这个错误
[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到目前为止,我只知道它连接,身份验证,然后启动会话,当它出现时,它就被卡住了。我尝试过许多端口、服务器名称等的变体。
Ubuntu: 12.04.5 LTS PHP: 5.3.10 Openfire: 3.9.3
不知道该去哪里做什么。请告诉我怎样才能解决这个问题。
提前谢了。
发布于 2015-01-26 15:33:52
$conn->存在(“Ya,I‘s online","available","aim...*.*****");
我不需要服务器地址中的AIM部分。
现在一切都很好。
https://stackoverflow.com/questions/26248960
复制相似问题