I'm trying to deploy some php project to heroku. I use composer with required dependency are slim framework
and simple_http_dom
. Here content of my composer.json
:
{
"require": {
"slim/slim": "2.4.3",
"shark/simple_html_dom": "dev-master"
}
}
when I run this app locally, it's working like a charm.
my app is succeed pushed to heroku. the problem occured when I try to access it from browser. it showing up nothing. here is some clue of the error i've got from heroku logs
command.
2014-08-31T00:14:38.052441+00:00 app[web.1]: [Sun Aug 31 00:14:37.566291 2014] [proxy_fcgi:error] [pid 60:tid 140467698300672] [client 10.2.162.208:58783] AH01071: Got error 'PHP message: PHP Fatal error: Call to undefined function mb_detect_encoding() in /app/vendor/shark/simple_html_dom/simple_html_dom.php on line 1234
', referer: http://myapp.herokuapp.com/index.php/scrap/all
2014-08-31T00:14:38.052437+00:00 app[web.1]: 10.2.162.208 - - [31/Aug/2014:00:14:37 +0000] "POST /index.php/scrap/all/do HTTP/1.1" 500 - "http://myapp.herokuapp.com/index.php/scrap/all" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/37.0.2062.94 Safari/537.36"
2014-08-31T00:14:38.052443+00:00 app[web.1]: [31-Aug-2014 00:14:37] WARNING: [pool www] child 58 said into stderr: "NOTICE: PHP message: PHP Fatal error: Call to undefined function mb_detect_encoding() in /app/vendor/shark/simple_html_dom/simple_html_dom.php on line 1234"
it said:
Got error 'PHP message: PHP Fatal error: Call to undefined function mb_detect_encoding() in /app/vendor/shark/simple_html_dom/simple_html_dom.php on line 1234
', referer: http://myapp.herokuapp.com/index.php/scrap/all
This is the first time I got this error. I have another project run on heroku using same dependencies (but without composer) and it's smoothly working.
what should I do to fix this problem ?