Warning about missing php-mbstring extension during installaton
Closed this issue · 5 comments
Summary
When attempting to add a Site Variable through the Extend admin panel, an exception was encountered because php-mbstring was missing. Executing sudo apt install php-mbstring
on the server fixed the issue.
I was surprised that this missing module was not warned about during installation, as it warned me about php-gd not being installed!
Expected Behaviour
During installation, if php-mbstring is missing, a warning should appear (as is the case with php-gd).
Actual Behaviour
No warning is issued during installation about the missing dependency. Instead an exception is thrown when attempting to add a new variable through the admin panel.
Context details (if applicable)
- Anchor version: 0.12.1
- Server setup: nginx with fastcgi (Ubuntu)
Call to undefined function mb_strtolower()
The error has been logged in /anchor/errors.log
Uncaught Exception
Call to undefined function mb_strtolower()
Origin
anchor/helpers.php on line 22
Trace
#0 /var/www/blog/anchor/routes/variables.php(40): slug('site_email', '_')
#1 [internal function]: {closure}()
#2 /var/www/blog/system/route.php(152): call_user_func_array(Object(Closure), Array)
#3 /var/www/blog/system/router.php(152): System\Route->run()
#4 /var/www/blog/system/start.php(46): System\Router->dispatch()
#5 /var/www/blog/index.php(35): require('/var/www/blog/s...')
#6 {main}
Sorry to hear about this, maybe we're assuming that people have this enabled already @rwarasaurus?
Lots of online documents teach us to install PHP by apt install php-fpm
which won't install php-mbstring
.
In fact I don't known which PHP extensions are commonly required.
My server is a DigitalOcean droplet, so it came preinstalled with a LEMP stack upon creation. So I guess by default that extension is not present ^_^
@lightofanima ok cool, hopefully someone can take a look into this for you 😄