Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

nhayder's avatar
Level 13

deploying laravel app on cpanel is returning symfony/polyfill-mbstring/bootstrap.php

i'm trying to deploy laravel 5.8 app on a cpanel shared account, so far im not being able to get the home page to load on the browser?

This page isn’t working demo.app.com is currently unable to handle this request.
HTTP ERROR 500

on the account log file i have these


[08-May-2019 06:00:40 UTC] PHP Warning:  require(/home/demolinx/vendor/composer/../symfony/polyfill-mbstring/bootstrap.php): failed to open stream: No such file or directory in /home/demolinx/vendor/composer/autoload_real.php on line 66
[08-May-2019 06:00:40 UTC] PHP Warning:  require(/home/demolinx/vendor/composer/../symfony/polyfill-mbstring/bootstrap.php): failed to open stream: No such file or directory in /home/demolinx/vendor/composer/autoload_real.php on line 66
[08-May-2019 06:00:40 UTC] PHP Fatal error:  require(): Failed opening required '/home/demolinx/vendor/composer/../symfony/polyfill-mbstring/bootstrap.php' (include_path='.:/opt/cpanel/ea-php71/root/usr/share/pear') in /home/demolinx/vendor/composer/autoload_real.php on line 66
[08-May-2019 06:15:24 UTC] PHP Warning:  PHP Startup: Unable to load dynamic library 'php_mbstring.dll' (tried: /opt/cpanel/ea-php72/root/usr/lib64/php/modules/php_mbstring.dll (/opt/cpanel/ea-php72/root/usr/lib64/php/modules/php_mbstring.dll: cannot open shared object file: No such file or directory), /opt/cpanel/ea-php72/root/usr/lib64/php/modules/php_mbstring.dll.so (/opt/cpanel/ea-php72/root/usr/lib64/php/modules/php_mbstring.dll.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
[08-May-2019 06:15:24 UTC] PHP Warning:  PHP Startup: Unable to load dynamic library 'php_mbstring.dll' (tried: /opt/cpanel/ea-php72/root/usr/lib64/php/modules/php_mbstring.dll (/opt/cpanel/ea-php72/root/usr/lib64/php/modules/php_mbstring.dll: cannot open shared object file: No such file or directory), /opt/cpanel/ea-php72/root/usr/lib64/php/modules/php_mbstring.dll.so (/opt/cpanel/ea-php72/root/usr/lib64/php/modules/php_mbstring.dll.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
[08-May-2019 06:15:33 UTC] PHP Warning:  PHP Startup: Unable to load dynamic library 'php_mbstring.dll' (tried: /opt/cpanel/ea-php72/root/usr/lib64/php/modules/php_mbstring.dll (/opt/cpanel/ea-php72/root/usr/lib64/php/modules/php_mbstring.dll: cannot open shared object file: No such file or directory), /opt/cpanel/ea-php72/root/usr/lib64/php/modules/php_mbstring.dll.so (/opt/cpanel/ea-php72/root/usr/lib64/php/modules/php_mbstring.dll.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
[08-May-2019 06:15:33 UTC] PHP Warning:  PHP Startup: Unable to load dynamic library 'php_mbstring.dll' (tried: /opt/cpanel/ea-php72/root/usr/lib64/php/modules/php_mbstring.dll (/opt/cpanel/ea-php72/root/usr/lib64/php/modules/php_mbstring.dll: cannot open shared object file: No such file or directory), /opt/cpanel/ea-php72/root/usr/lib64/php/modules/php_mbstring.dll.so (/opt/cpanel/ea-php72/root/usr/lib64/php/modules/php_mbstring.dll.so: cannot open shared object file: No such file or directory)) in Unknown on line 0

according to my research that error is because of missing extension on the account,

i made sure that all required php extensions are available on the account

// these are all available on the account
PHP >= 7.1.3
OpenSSL PHP Extension
PDO PHP Extension
Mbstring PHP Extension
Tokenizer PHP Extension
XML PHP Extension
Ctype PHP Extension
JSON PHP Extension
BCMath PHP Extension

any ideas on how to fix this issue ???

0 likes
5 replies
munazzil's avatar

Have you checked your cpanel .htaccess file and set your redirect according to that.

1 like
nhayder's avatar
Level 13

@MUNAZZIL - the .htaccess file has not changed since i installed laravel on this project, have a look

<IfModule mod_rewrite.c>
    <IfModule mod_negotiation.c>
        Options -MultiViews -Indexes
    </IfModule>

    RewriteEngine On

    # Handle Authorization Header
    RewriteCond %{HTTP:Authorization} .
    RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]

    # Redirect Trailing Slashes If Not A Folder...
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_URI} (.+)/$
    RewriteRule ^ %1 [L,R=301]

    # Handle Front Controller...
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule ^ index.php [L]
</IfModule>

just notice new error on the account log

[09-May-2019 03:40:27 UTC] PHP Parse error:  syntax error, unexpected '?' in /home/demolinx/vendor/laravel/framework/src/Illuminate/Foundation/helpers.php on line 500

munazzil's avatar

Check below as well,

https://laravel.com/docs/5.8

 Options +FollowSymLinks -Indexes
 RewriteEngine On

RewriteCond %{HTTP:Authorization} .
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]

RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]
nhayder's avatar
Level 13

@MUNAZZIL - i'm using php 7.2 and the reset of extensions are included ( as per my initial post )

OpenSSL PHP Extension -> installed
PDO PHP Extension -> installed
Mbstring PHP Extension -> installed
Tokenizer PHP Extension -> installed
XML PHP Extension -> installed
Ctype PHP Extension -> installed
JSON PHP Extension -> installed
BCMath PHP Extension -> installed

as per the reset of your comment im not sure what you mean with

 Options +FollowSymLinks -Indexes
 RewriteEngine On

RewriteCond %{HTTP:Authorization} .
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]

RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]

can you explain what you mean

Please or to participate in this conversation.