I've deployed my laravel project in hosting server.Copy my all contents to public_html,moved the contents of public folder to root directory. Then changed the config/app.php lines from,
require __DIR__.'../vendor/autoload.php';
$app = require_once __DIR__.'../bootstrap/app.php';
to,
require __DIR__.'/vendor/autoload.php';
$app = require_once __DIR__.'/bootstrap/app.php';
But I got the error,
This page isn’t working
www.domain.com is currently unable to handle this request.
HTTP ERROR 500
In my error_log getting,
[12-Jul-2018 07:51:18 UTC] PHP Fatal error: Uncaught Error: Call to undefined
function Symfony\Polyfill\Mbstring\iconv_strpos() in /home/move/public_html/MoveAdmin/vendor/symfony/polyfill-mbstring/Mbstring.php:363
Stack trace:
#0 /home/move/public_html/MoveAdmin/vendor/symfony/polyfill-
mbstring/bootstrap.php(32):
Symfony\Polyfill\Mbstring\Mbstring::mb_strpos(NULL,
'/json', 0, 'UTF-8') #1
/home/move/public_html/MoveAdmin/vendor/laravel/framework/src/Illuminate
/Support/Str.php(103): mb_strpos(NULL, '/json')
But In my hosting server iconv is enabled.Then why do I'm getting this error?How may I solve this issue?
try this in public_html/index.php :
$app->bind('path.public', function() {
return base_path().'/public_html/';
});