1

I have my Facebook app running without any problem in my localhost. But when I hosted it in Heroku, I got these problems.

The problem is when the user gets redirected from Facebook after login and permissions it shows blank page, and in Heroku logs it shows:

"NOTICE: PHP message: PHP Fatal error: Call to undefined function Facebook\HttpClients\mb_strlen() in /app/facebook/facebook- sdk/src/Facebook/HttpClients/FacebookCurlHttpClient.php on line 300"

I think the error is in mb_strlen() function. I do not know how to rectify it.

3
  • I suspect you'll need to enable the mbstring module? See here: php.net/manual/en/book.mbstring.php Commented Aug 10, 2014 at 17:08
  • Actually, Thats the problem...I do no how to enable mbstring in heroku...i can do it in my localhost Commented Aug 11, 2014 at 14:12
  • This search gave me this Heroku article - search for 'The following built-in extensions have been built “shared”'. Commented Aug 11, 2014 at 14:15

1 Answer 1

3

The mbstring extension can be turned on in Heroku using Composer. Just use the mbstring dependency and Heroku will do the rest.

I expect it would look something like this:

{ "require": { "ext-mbstring": "*", } } 

Of course, if you have other requires at present, you should add this to them, not replace them.

Here's the documentation you need.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.