Reputation: 237
i have deployed a laravel site on debian 7.5, apache2, php7. in my mac the site is fine, but after deployed, site reports following error:the php files all are utf-8 code, and the php.ini shows the php7's default chareter set is utf-8 as well, pls help me out there, thanks in advance.
ErrorException in Mbstring.php line 351: iconv_strpos(): Detected an illegal character in input string
in Mbstring.php line 351 at HandleExceptions->handleError('8', 'iconv_strpos(): Detected an illegal character in input string', '/var/www/stockhit/vendor/symfony/polyfill-mbstring/Mbstring.php', '351', array('haystack' => '��J��`�I�3���؉�W� �"�l���', 'needle' => 'base64:', 'offset' => '0', 'encoding' => 'UTF-8'))
Upvotes: 4
Views: 1001
Reputation: 43
Alextre's solution (while I'm unsure of its security ramifications) did in fact work for me too. I removed the "base64:" from the beginning of the APP_KEY setting in my .env file, and then trimmed the remaining key to 32 characters (by simply deleting them from the end of the row).
My setup is Ubuntu 16.04LTS Xenial with Nginx and PHP 7.
Upvotes: 3
Reputation: 237
finally got it down, somehow, indebian, the key generate will generate a string start with: Base64:........ , and the 'cipher' => 'AES-256-CBC', it doesnt allow this this format, the solution is manually cut base64andsomechar, remain 32 length string, then the problem solve~
Upvotes: 3