gpt4 book ai didi

php - 在本地开发 Heroku PHP Facebook 应用程序时出现 500 错误

转载 作者:行者123 更新时间:2023-12-04 06:01:12 26 4
gpt4 key购买 nike

我正在尝试使用 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/

最佳答案

看起来您没有安装 cURL 功能。
运行 phpinfo() 文件并检查是否提及 cURL 函数。

关于php - 在本地开发 Heroku PHP Facebook 应用程序时出现 500 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8874425/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com