500 error developing Heroku PHP Facebook app locally

和自甴很熟 提交于 2020-01-24 17:33:26

问题


I'm trying to develop a Facebook app on Heroku with PHP. I set up the default Heroku Facebook app and it works fine on the production server. I set up another app on Facebook to be the local test app and set the URL as http://profanitytracker.localhost. I set this URL up as an Apache VirtualHost and put in the development app's App ID and Secret. When I try to run my app locally, I get an HTTP 500 error.

Here is what I see in my browser...

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.

Here are the errors that come up in the Apache server log...

[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/

回答1:


It looks like you do not have cURL functions installed.

Run a php_info() file and check for any mention of cURL functions.



来源:https://stackoverflow.com/questions/8874425/500-error-developing-heroku-php-facebook-app-locally

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!