我正在尝试使用PHP在Heroku上开发一个Facebook应用程序。我设置了默认的Heroku Facebook应用程序,它在生产服务器上运行正常。我在Facebook上设置了另一个应用程序作为本地测试应用程序,并将URL设置为http://profanitytracker.localhost。我将此URL设置为Apache VirtualHost并放入开发应用程序的App ID和Secret。当我尝试在本地运行我的应用程序时,出现HTTP 500错误。
以下是我在浏览器中看到的内容......
The website encountered an error while retrieving http://profanitytracker.localhost/?state=4109e82dd75dc7a224c2b01bbb3d2c7b&code=AQC26Ff9DZBhbT2cd4Zc-0KTNDsIooYzmEKVM_YTWxKYX3RF4V389qHBGUuH4_3PnUIOyXBYFmq7GKPK_b2bskYNLkj7aWHnOQHQI1NxmklZRCIuaUZA0nYfsEhJDDhxUmaYG0DICIRgrM_S3bWuN69VGOZSWqWlsA0ioyGh1ufa5-8Nd9LhSm6iREV54miQmgU#_=_. It may be down for maintenance or configured incorrectly.
HTTP Error 500 (Internal Server Error): An unexpected condition was encountered while the server was attempting to fulfill the request.
以下是Apache服务器日志中出现的错误......
[Sun Jan 15 17:35:53 2012] [error] [client 127.0.0.1] PHP Notice: Undefined index: HTTP_X_FORWARDED_PROTO in /var/www/profanitytracker/index.php on line 4
[Sun Jan 15 17:35:53 2012] [error] [client 127.0.0.1] PHP Notice: Undefined index: HTTP_X_FORWARDED_PROTO in /var/www/profanitytracker/AppInfo.php on line 36
[Sun Jan 15 17:35:53 2012] [error] [client 127.0.0.1] PHP Notice: Undefined index: HTTP_X_FORWARDED_PROTO in /var/www/profanitytracker/AppInfo.php on line 36
[Sun Jan 15 17:35:53 2012] [error] [client 127.0.0.1] PHP Notice: Undefined index: code in /var/www/profanitytracker/FBUtils.php on line 75
[Sun Jan 15 17:35:54 2012] [error] [client 127.0.0.1] PHP Notice: Undefined index: HTTP_X_FORWARDED_PROTO in /var/www/profanitytracker/index.php on line 4, referer: http://profanitytracker.localhost/
[Sun Jan 15 17:35:54 2012] [error] [client 127.0.0.1] PHP Notice: Undefined index: HTTP_X_FORWARDED_PROTO in /var/www/profanitytracker/AppInfo.php on line 36, referer: http://profanitytracker.localhost/
[Sun Jan 15 17:35:54 2012] [error] [client 127.0.0.1] PHP Notice: Undefined index: HTTP_X_FORWARDED_PROTO in /var/www/profanitytracker/AppInfo.php on line 36, referer: http://profanitytracker.localhost/
[Sun Jan 15 17:35:54 2012] [error] [client 127.0.0.1] PHP Fatal error: Call to undefined function curl_init() in /var/www/profanitytracker/FBUtils.php on line 99, referer: http://profanitytracker.localhost/
答案 0 :(得分:3)
看起来您没有安装cURL功能。
运行php_info()文件并检查cURL函数的任何提及。