Php <;b>;致命错误</b>;:未捕获异常';例外情况';带有消息';未能连接到api.twitter.com端口443:连接超时';

Php <;b>;致命错误</b>;:未捕获异常';例外情况';带有消息';未能连接到api.twitter.com端口443:连接超时';,php,codeigniter,twitter,Php,Codeigniter,Twitter,我正在从事一个Codeigniter项目,在该项目中,我使用twitter api库获取twitter数据。在我更换服务器之前,它工作得很好,但在更换服务器之后,它产生了以下错误。我不知道问题出在哪里 <b>Fatal error</b>: Uncaught exception 'Exception' with message 'Failed to connect to api.twitter.com port 443: Connection timed out' in

我正在从事一个Codeigniter项目,在该项目中,我使用twitter api库获取twitter数据。在我更换服务器之前,它工作得很好,但在更换服务器之后,它产生了以下错误。我不知道问题出在哪里

<b>Fatal error</b>:  Uncaught exception 'Exception' with message 'Failed to connect to api.twitter.com port 443: Connection timed out' in /my/project/path/myProject/application/ws/libraries/TwitterAPIExchange.php:297
Stack trace:
#0 /my/project/path/myProject/application/ws/controllers/alldata.php(247): TwitterAPIExchange-&gt;performRequest()
#1 /my/project/path/myProject/application/ws/controllers/alldata.php(40): Alldata-&gt;fetch_tweets('1', Array)
#2 [internal function]: Alldata-&gt;index()
#3 /my/project/path/myProject/system/core/CodeIgniter.php(359): call_user_func_array(Array, Array)
#4 /my/project/path/myProject/index.php(188): require_once('/home/develnik/...')
#5 {main}
thrown in <b>/my/project/path/myProject/application/ws/libraries/TwitterAPIExchange.php</b> on line <b>297</b><br />
致命错误:未捕获异常“exception”,在/my/project/path/myProject/application/ws/libraries/TwitterAPIExchange.php:297中显示消息“未能连接到api.twitter.com端口443:连接超时”
堆栈跟踪:
#0/my/project/path/myProject/application/ws/controllers/alldata.php(247):TwitterAPIExchange-performRequest()
#1/my/project/path/myProject/application/ws/controllers/alldata.php(40):alldata-fetch_tweets('1',数组)
#2[内部函数]:Alldata-index()
#3/my/project/path/myProject/system/core/CodeIgniter.php(359):调用用户函数数组(数组,数组)
#4/my/project/path/myProject/index.php(188):需要_一次('/home/develnik/…)
#5{main}
在第297行的/my/project/path/myProject/application/ws/libraries/TwitterAPIExchange.php中抛出

请检查您的cPanel端口是否已打开,有时它显示已打开,但实际上未打开。您可以在cPanel的健康检查和监视部分查看端口详细信息。

在新服务器上打开端口443,如果它在amazon上,请确保您定义了安全组correctly@DanielKrom:它已经打开,而且不在amazonWell上,那么您对服务器做了哪些更改-服务器代码,或者服务器机器-有点不清楚。@St0fF已将服务器从Godday更改为Bluehost