Heroku上的PHP Facebook应用程序 - 应用程序错误检查日志

时间:2013-09-04 09:49:37

标签: php git heroku facebook-apps

我已经构建了一个PHP Web应用程序,以使一个Facebook应用程序在我的托管公司(000webhost,cpanel.madeinosting.com)和我的localhost中的所有权限都工作,但它们都没有提供免费的HTTPS托管所以我应该上传PHP Heroku的脚本所以我在网上阅读了turtorials后采取了以下步骤:

1 - 下载并安装了heroku和GitBash。

2 - 使用cd GitBlash命令导航到/ C /目录。

3 - 使用heroku login登录。

4 - 运行以下命令heroku create

5 - 使用git remote -v验证我的git配置中的遥控器。

6使用下面的命令

将heroku克隆到目录/ c / app_name /
git clone git@heroku.com:app_name.git -o heroku  

7 - 使用git remote验证了heroku在我的遥控器中。

8-I打开目录C:/ app_name /

9-将文件夹中创建的文件移动到另一个目录,以备将来需要时使用。

10 - 添加了应用程序文件。

11-在GitBlash中导航到目录/ C / app_name /

12-PWD显示/ C / app_name(主)/。

13-Committed并添加了更改。

14 - 然后我使用git push heroku master将代码推送到heroku。

所以在那之后,我得到了一切正常,我在浏览器中打开页面,发现此错误: THe error sown in my browser
从现在起12个小时,所以我认为可能需要一些时间来更新或提交服务器中的插件。

但现在仍然收到同样的错误。

信息:

OS : Windows 7 Ultimate
URL of the error: https://android-arabia.herokuapp.com/
Database:No use of a database.
But: My application request a link using Curl from the same site and another domain.  

日志:

heroku logs --app android-arabia
2013-09-03T17:32:22.471100+00:00 heroku[web.1]: Unidling
2013-09-03T17:32:26.267602+00:00 heroku[web.1]: Starting process with command `s
h boot.sh`
2013-09-03T17:32:27.547006+00:00 app[web.1]: Launching apache
2013-09-03T17:32:28.413622+00:00 heroku[web.1]: State changed from starting to u
p
2013-09-03T17:32:29.553678+00:00 app[web.1]: [Tue Sep 03 17:32:28 2013] [notice]
 Apache/2.2.25 (Unix) PHP/5.3.27 configured -- resuming normal operations
2013-09-03T17:32:30.554897+00:00 app[web.1]: [Tue Sep 03 17:32:29 2013] [error]
server reached MaxClients setting, consider raising the MaxClients setting
2013-09-03T17:32:59.539181+00:00 heroku[router]: at=error code=H12 desc="Request
 timeout" method=GET path=/ host=android-arabia.herokuapp.com fwd="212.28.231.20
9" dyno=web.1 connect=4ms service=30000ms status=503 bytes=0
2013-09-03T17:33:00.600773+00:00 app[web.1]: 10.10.22.179 - - [03/Sep/2013:17:32
:59 +0000] "GET /App.php?country=Lebanon&oem=Samsung HTTP/1.1" 200 20953
2013-09-03T17:33:00.600773+00:00 app[web.1]: 10.42.134.214 - - [03/Sep/2013:17:3
2:29 +0000] "GET / HTTP/1.1" 200 416
2013-09-03T17:33:32.217129+00:00 heroku[router]: at=error code=H12 desc="Request
 timeout" method=GET path=/ host=android-arabia.herokuapp.com fwd="212.28.231.20
9" dyno=web.1 connect=1ms service=30000ms status=503 bytes=0
2013-09-03T17:33:32.338578+00:00 heroku[router]: at=error code=H12 desc="Request
 timeout" method=GET path=/App.php?country=Lebanon&oem=Samsung host=android-arab
ia.herokuapp.com fwd="50.16.99.74" dyno=web.1 connect=2ms service=30000ms status
=503 bytes=0
2013-09-03T17:33:32.643141+00:00 app[web.1]: 10.93.89.126 - - [03/Sep/2013:17:33
:02 +0000] "GET / HTTP/1.1" 200 416
2013-09-03T17:33:32.643141+00:00 app[web.1]: 10.38.41.231 - - [03/Sep/2013:17:33
:32 +0000] "GET /App.php?country=Lebanon&oem=Samsung HTTP/1.1" 200 20953
2013-09-03T17:32:59.863480+00:00 heroku[router]: at=error code=H12 desc="Request
 timeout" method=GET path=/App.php?country=Lebanon&oem=Samsung host=android-arab
ia.herokuapp.com fwd="50.16.99.74" dyno=web.1 connect=3ms service=30010ms status
=503 bytes=0
2013-09-03T18:34:50.652287+00:00 heroku[web.1]: Idling
2013-09-03T18:34:55.336281+00:00 heroku[web.1]: Stopping all processes with SIGT
ERM
2013-09-03T18:34:58.333670+00:00 heroku[web.1]: Process exited with status 0
2013-09-03T18:34:58.346148+00:00 heroku[web.1]: State changed from up to down
2013-09-03T21:25:47.358481+00:00 heroku[web.1]: State changed from down to start
ing
2013-09-03T21:25:47.358177+00:00 heroku[web.1]: Unidling
2013-09-03T21:25:50.973383+00:00 heroku[web.1]: Starting process with command `s
h boot.sh`
2013-09-03T21:25:51.922959+00:00 app[web.1]: Launching apache
2013-09-03T21:25:52.959003+00:00 app[web.1]: [Tue Sep 03 21:25:51 2013] [notice]
 Apache/2.2.25 (Unix) PHP/5.3.27 configured -- resuming normal operations
2013-09-03T21:25:52.992962+00:00 heroku[web.1]: State changed from starting to u
p
2013-09-03T21:25:53.959369+00:00 app[web.1]: [Tue Sep 03 21:25:52 2013] [error]
server reached MaxClients setting, consider raising the MaxClients setting
2013-09-03T21:26:24.417019+00:00 heroku[router]: at=error code=H12 desc="Request
 timeout" method=GET path=/ host=android-arabia.herokuapp.com fwd="212.28.231.20
9" dyno=web.1 connect=1ms service=30000ms status=503 bytes=0
2013-09-03T21:26:24.531102+00:00 heroku[router]: at=error code=H12 desc="Request
 timeout" method=GET path=/App.php?country=Lebanon&oem=Samsung host=android-arab
ia.herokuapp.com fwd="174.129.154.0" dyno=web.1 connect=1ms service=30000ms stat
us=503 bytes=0
2013-09-03T21:26:24.970568+00:00 app[web.1]: 10.238.128.189 - - [03/Sep/2013:21:
26:24 +0000] "GET /App.php?country=Lebanon&oem=Samsung HTTP/1.1" 200 16410
2013-09-03T21:26:24.970568+00:00 app[web.1]: 10.32.241.162 - - [03/Sep/2013:21:2
5:54 +0000] "GET / HTTP/1.1" 200 416
2013-09-03T21:26:25.005751+00:00 app[web.1]: [Tue Sep 03 21:26:24 2013] [error]
[client 10.238.128.189] PHP Warning:  Invalid argument supplied for foreach() in
 /app/www/App.php on line 707
2013-09-03T21:26:58.500178+00:00 heroku[router]: at=error code=H12 desc="Request
 timeout" method=GET path=/App.php?country=Lebanon&oem=Samsung host=android-arab
ia.herokuapp.com fwd="174.129.154.0" dyno=web.1 connect=1ms service=30001ms stat
us=503 bytes=0
2013-09-03T21:26:59.011913+00:00 app[web.1]: 10.137.6.225 - - [03/Sep/2013:21:26
:58 +0000] "GET /App.php?country=Lebanon&oem=Samsung HTTP/1.1" 200 16410
2013-09-03T21:26:59.011913+00:00 app[web.1]: 10.224.55.156 - - [03/Sep/2013:21:2
6:28 +0000] "GET / HTTP/1.1" 200 416
2013-09-03T21:26:59.049602+00:00 app[web.1]: [Tue Sep 03 21:26:58 2013] [error]
[client 10.137.6.225] PHP Warning:  Invalid argument supplied for foreach() in /
app/www/App.php on line 707
2013-09-03T21:26:58.413769+00:00 heroku[router]: at=error code=H12 desc="Request
 timeout" method=GET path=/ host=android-arabia.herokuapp.com fwd="212.28.231.20
9" dyno=web.1 connect=3ms service=30006ms status=503 bytes=0
2013-09-03T21:27:44.568547+00:00 heroku[router]: at=error code=H12 desc="Request
 timeout" method=GET path=/ host=android-arabia.herokuapp.com fwd="212.28.231.20
9" dyno=web.1 connect=2ms service=30000ms status=503 bytes=0
2013-09-03T21:27:45.038211+00:00 app[web.1]: 10.38.59.5 - - [03/Sep/2013:21:27:1
4 +0000] "GET / HTTP/1.1" 200 416
2013-09-03T21:27:45.038211+00:00 app[web.1]: 10.137.6.225 - - [03/Sep/2013:21:27
:44 +0000] "GET /App.php?country=Lebanon&oem=Samsung HTTP/1.1" 200 16410
2013-09-03T21:27:45.089033+00:00 app[web.1]: [Tue Sep 03 21:27:44 2013] [error]
[client 10.137.6.225] PHP Warning:  Invalid argument supplied for foreach() in /
app/www/App.php on line 707
2013-09-03T21:27:44.658339+00:00 heroku[router]: at=error code=H12 desc="Request
 timeout" method=GET path=/App.php?country=Lebanon&oem=Samsung host=android-arab
ia.herokuapp.com fwd="174.129.154.0" dyno=web.1 connect=2ms service=30005ms stat
us=503 bytes=0
2013-09-03T21:30:54.101996+00:00 heroku[router]: at=error code=H12 desc="Request
 timeout" method=GET path=/ host=android-arabia.herokuapp.com fwd="212.28.231.22
4" dyno=web.1 connect=2ms service=30001ms status=503 bytes=0
2013-09-03T21:30:54.194088+00:00 heroku[router]: at=error code=H12 desc="Request
 timeout" method=GET path=/App.php?country=Lebanon&oem=Samsung host=android-arab
ia.herokuapp.com fwd="174.129.154.0" dyno=web.1 connect=1ms service=30001ms stat
us=503 bytes=0
2013-09-03T21:30:54.206207+00:00 app[web.1]: 10.224.67.136 - - [03/Sep/2013:21:3
0:24 +0000] "GET / HTTP/1.1" 200 416
2013-09-03T21:30:55.207257+00:00 app[web.1]: 10.38.41.231 - - [03/Sep/2013:21:30
:54 +0000] "GET /App.php?country=Lebanon&oem=Samsung HTTP/1.1" 200 16410
2013-09-03T21:30:55.238066+00:00 app[web.1]: [Tue Sep 03 21:30:54 2013] [error]
[client 10.38.41.231] PHP Warning:  Invalid argument supplied for foreach() in /
app/www/App.php on line 707
2013-09-03T22:30:57.280743+00:00 heroku[web.1]: Idling
2013-09-03T22:31:01.917523+00:00 heroku[web.1]: Stopping all processes with SIGT
ERM
2013-09-03T22:31:05.430916+00:00 heroku[web.1]: State changed from up to down
2013-09-03T22:31:05.418933+00:00 heroku[web.1]: Process exited with status 0
2013-09-04T07:58:08.625548+00:00 heroku[web.1]: Unidling
2013-09-04T07:58:08.625548+00:00 heroku[web.1]: State changed from down to start
ing
2013-09-04T07:58:12.316167+00:00 heroku[web.1]: Starting process with command `s
h boot.sh`
2013-09-04T07:58:13.151366+00:00 app[web.1]: Launching apache
2013-09-04T07:58:14.152760+00:00 app[web.1]: [Wed Sep 04 07:58:13 2013] [notice]
 Apache/2.2.25 (Unix) PHP/5.3.27 configured -- resuming normal operations
2013-09-04T07:58:14.252494+00:00 heroku[web.1]: State changed from starting to u
p
2013-09-04T07:58:15.152991+00:00 app[web.1]: [Wed Sep 04 07:58:14 2013] [error]
server reached MaxClients setting, consider raising the MaxClients setting
2013-09-04T07:58:17.679928+00:00 heroku[router]: at=error code=H18 desc="Request
 Interrupted" method=GET path=/ host=android-arabia.herokuapp.com fwd="212.28.23
1.146" dyno=web.1 connect=0ms service=0ms status=503 bytes=0 sock=client
2013-09-04T07:58:47.825169+00:00 heroku[router]: at=error code=H12 desc="Request
 timeout" method=GET path=/App.php?country=Lebanon&oem=Samsung host=android-arab
ia.herokuapp.com fwd="54.226.104.73" dyno=web.1 connect=4ms service=30000ms stat
us=503 bytes=0
2013-09-04T07:58:48.193857+00:00 app[web.1]: 10.32.241.162 - - [04/Sep/2013:07:5
8:17 +0000] "GET / HTTP/1.1" 200 416
2013-09-04T07:58:49.193963+00:00 app[web.1]: 10.228.10.140 - - [04/Sep/2013:07:5
8:47 +0000] "GET /App.php?country=Lebanon&oem=Samsung HTTP/1.1" 200 20953
2013-09-04T07:58:51.662084+00:00 heroku[router]: at=error code=H12 desc="Request
 timeout" method=GET path=/ host=android-arabia.herokuapp.com fwd="212.28.231.20
6" dyno=web.1 connect=6ms service=30000ms status=503 bytes=0
2013-09-04T07:59:18.333057+00:00 heroku[router]: at=error code=H12 desc="Request
 timeout" method=GET path=/App.php?country=Lebanon&oem=Samsung host=android-arab
ia.herokuapp.com fwd="54.226.104.73" dyno=web.1 connect=1ms service=30000ms stat
us=503 bytes=0
2013-09-04T07:59:19.207534+00:00 app[web.1]: 10.62.147.42 - - [04/Sep/2013:07:58
:48 +0000] "GET / HTTP/1.1" 200 416
2013-09-04T07:59:19.207534+00:00 app[web.1]: 10.92.239.244 - - [04/Sep/2013:07:5
9:18 +0000] "GET /App.php?country=Lebanon&oem=Samsung HTTP/1.1" 200 20953
2013-09-04T09:01:32.816902+00:00 heroku[web.1]: Idling
2013-09-04T09:01:37.951686+00:00 heroku[web.1]: Stopping all processes with SIGT
ERM
2013-09-04T09:01:41.180894+00:00 heroku[web.1]: Process exited with status 0
2013-09-04T09:01:41.193352+00:00 heroku[web.1]: State changed from up to down
2013-09-04T09:09:03.442371+00:00 heroku[web.1]: Unidling
2013-09-04T09:09:03.442720+00:00 heroku[web.1]: State changed from down to start
ing
2013-09-04T09:09:07.889867+00:00 heroku[web.1]: Starting process with command `s
h boot.sh`
2013-09-04T09:09:08.673078+00:00 app[web.1]: Launching apache
2013-09-04T09:09:09.729135+00:00 app[web.1]: [Wed Sep 04 09:09:08 2013] [notice]
 Apache/2.2.25 (Unix) PHP/5.3.27 configured -- resuming normal operations
2013-09-04T09:09:09.849462+00:00 heroku[web.1]: State changed from starting to u
p
2013-09-04T09:09:10.729406+00:00 app[web.1]: [Wed Sep 04 09:09:09 2013] [error]
server reached MaxClients setting, consider raising the MaxClients setting
2013-09-04T09:09:41.509085+00:00 heroku[router]: at=error code=H12 desc="Request
 timeout" method=GET path=/ host=android-arabia.herokuapp.com fwd="212.28.231.20
6" dyno=web.1 connect=2ms service=30001ms status=503 bytes=0
2013-09-04T09:09:41.639965+00:00 heroku[router]: at=error code=H12 desc="Request
 timeout" method=GET path=/App.php?country=Lebanon&oem=Samsung host=android-arab
ia.herokuapp.com fwd="54.226.205.19" dyno=web.1 connect=5ms service=30002ms stat
us=503 bytes=0
2013-09-04T09:09:41.796768+00:00 app[web.1]: 10.62.147.42 - - [04/Sep/2013:09:09
:41 +0000] "GET /App.php?country=Lebanon&oem=Samsung HTTP/1.1" 200 20953
2013-09-04T09:09:41.796768+00:00 app[web.1]: 10.87.135.145 - - [04/Sep/2013:09:0
9:11 +0000] "GET / HTTP/1.1" 200 416
2013-09-04T09:09:48.502654+00:00 heroku[router]: at=info method=GET path=/favico
n.ico host=android-arabia.herokuapp.com fwd="212.28.231.206" dyno=web.1 connect=
1ms service=3ms status=404 bytes=209
2013-09-04T09:09:48.801115+00:00 app[web.1]: 10.90.247.124 - - [04/Sep/2013:09:0
9:48 +0000] "GET /favicon.ico HTTP/1.1" 404 209
2013-09-04T09:09:48.813459+00:00 app[web.1]: [Wed Sep 04 09:09:48 2013] [error]
[client 10.90.247.124] File does not exist: /app/www/favicon.ico
2013-09-04T09:48:09.513348+00:00 heroku[router]: at=error code=H12 desc="Request
 timeout" method=GET path=/ host=android-arabia.herokuapp.com fwd="212.28.231.20
6" dyno=web.1 connect=1ms service=30001ms status=503 bytes=0
2013-09-04T09:48:09.627045+00:00 heroku[router]: at=error code=H12 desc="Request
 timeout" method=GET path=/App.php?country=Lebanon&oem=Samsung host=android-arab
ia.herokuapp.com fwd="54.226.205.19" dyno=web.1 connect=2ms service=30001ms stat
us=503 bytes=0
2013-09-04T09:48:10.648318+00:00 app[web.1]: 10.191.63.167 - - [04/Sep/2013:09:4
7:39 +0000] "GET / HTTP/1.1" 200 416
2013-09-04T09:48:10.648318+00:00 app[web.1]: 10.38.113.76 - - [04/Sep/2013:09:48
:09 +0000] "GET /App.php?country=Lebanon&oem=Samsung HTTP/1.1" 200 20953
2013-09-04T10:07:07.744088+00:00 heroku[router]: at=error code=H12 desc="Request
 timeout" method=GET path=/ host=android-arabia.herokuapp.com fwd="117.253.171.1
15" dyno=web.1 connect=3ms service=30000ms status=503 bytes=0
2013-09-04T10:07:07.908090+00:00 heroku[router]: at=error code=H12 desc="Request
 timeout" method=GET path=/App.php?country=Lebanon&oem=Samsung host=android-arab
ia.herokuapp.com fwd="54.226.205.19" dyno=web.1 connect=1ms service=30001ms stat
us=503 bytes=0
2013-09-04T10:07:08.485621+00:00 app[web.1]: 10.40.37.199 - - [04/Sep/2013:10:06
:37 +0000] "GET / HTTP/1.1" 200 416
2013-09-04T10:07:08.485621+00:00 app[web.1]: 10.90.247.124 - - [04/Sep/2013:10:0
7:07 +0000] "GET /App.php?country=Lebanon&oem=Samsung HTTP/1.1" 200 20885
2013-09-04T10:07:11.621488+00:00 heroku[router]: at=info method=GET path=/favico
n.ico host=android-arabia.herokuapp.com fwd="117.253.171.115" dyno=web.1 connect
=1ms service=3ms status=404 bytes=209
2013-09-04T10:07:12.199996+00:00 app[web.1]: [Wed Sep 04 10:07:11 2013] [error]
[client 10.40.35.190] File does not exist: /app/www/favicon.ico
2013-09-04T10:07:12.487373+00:00 app[web.1]: 10.40.35.190 - - [04/Sep/2013:10:07
:11 +0000] "GET /favicon.ico HTTP/1.1" 404 209
2013-09-04T10:22:15.875247+00:00 heroku[router]: at=error code=H12 desc="Request
 timeout" method=GET path=/ host=android-arabia.herokuapp.com fwd="212.28.231.14
6" dyno=web.1 connect=1ms service=30045ms status=503 bytes=0
2013-09-04T10:22:16.007017+00:00 heroku[router]: at=error code=H12 desc="Request
 timeout" method=GET path=/App.php?country=Lebanon&oem=Samsung host=android-arab
ia.herokuapp.com fwd="54.226.205.19" dyno=web.1 connect=1ms service=30000ms stat
us=503 bytes=0
2013-09-04T10:22:16.727517+00:00 app[web.1]: 10.208.205.247 - - [04/Sep/2013:10:
21:45 +0000] "GET / HTTP/1.1" 200 416
2013-09-04T10:22:16.727517+00:00 app[web.1]: 10.10.91.12 - - [04/Sep/2013:10:22:
16 +0000] "GET /App.php?country=Lebanon&oem=Samsung HTTP/1.1" 200 20953
2013-09-04T10:36:22.648854+00:00 heroku[router]: at=error code=H12 desc="Request
 timeout" method=GET path=/ host=android-arabia.herokuapp.com fwd="212.28.231.20
6" dyno=web.1 connect=1ms service=30002ms status=503 bytes=0
2013-09-04T10:36:22.754379+00:00 heroku[router]: at=error code=H12 desc="Request
 timeout" method=GET path=/App.php?country=Lebanon&oem=Samsung host=android-arab
ia.herokuapp.com fwd="54.226.205.19" dyno=web.1 connect=1ms service=30001ms stat
us=503 bytes=0
2013-09-04T10:36:22.902242+00:00 app[web.1]: 10.4.221.99 - - [04/Sep/2013:10:36:
22 +0000] "GET /App.php?country=Lebanon&oem=Samsung HTTP/1.1" 200 20953
2013-09-04T10:36:22.902242+00:00 app[web.1]: 10.91.10.65 - - [04/Sep/2013:10:35:
52 +0000] "GET / HTTP/1.1" 200 416

请指教。

谢谢你的努力。

1 个答案:

答案 0 :(得分:0)

请在您的php文件中查看警告;

Invalid argument supplied for foreach() in /app/www/App.php on line 707