0

I'm using Uniform Server with PHP 7.2 and upon running a php page I made I get this error.

Fatal error: Uncaught Error: Call to undefined function mb_detect_encoding()

When I try to enable the mbstring php module (and other modules) through the graphical user interface I get this.

can't use the gui to enable or disable php module in php 7.2 for uniform server

So when I do it manually, my php_production.ini looks like this. I have used Uniform Server to select that php settings file.

extension=gd2
extension=mbstring
extension=exif      ; Must be after mbstring as it depends on it
extension=mysqli

So why do I still get the error if I have enabled the modules manually via the text editor?

Here is my phpinfo.

Below is the contents of C:\Users\Documents\UniServerZ\core\php72\extensions

php 7.2 extensions in uniform server

desbest
  • 4,269
  • 11
  • 45
  • 76
  • Does this answer your question? [Fatal error: Call to undefined function mb\_detect\_encoding()](https://stackoverflow.com/questions/17204437/fatal-error-call-to-undefined-function-mb-detect-encoding) – Wesley Smith Oct 11 '20 at 21:31
  • I have tried out all the answers on that question and none of them help me. For starters, I'm using windows not linux, the module dll files are not read only, replacing forward slashes with back slashes doesn't help, I have the gd module installed, and mbstring should be installed when I un-comment the line out, but it's not. – desbest Oct 11 '20 at 21:36
  • Have you seen the ticket in the uniform server forums? http://forum.uniformserver.com/topic/2731-mbstring-problem/ – Will B. Oct 11 '20 at 21:50
  • I've just looked at it now and that thread isn't helpful to me as the OP there is using php on the command line, and I am not. I have no need to change the `php-cli.ini` file as I'm not using the command line. – desbest Oct 11 '20 at 22:15
  • When using PHP 7.2 `mbstring` is nowhere to be found in `phpinfo()` but when using PHP 7.1 `mbstring` can be found. In PHP 7.1 it says `Zend Multibyte Support provided by mbstring ` and the `mbstring` module appears. I need that to happen for PHP 7.2 – desbest Oct 12 '20 at 10:03
  • In fact on PHP 7.2 I can't make any php module load, whether that be curl, mbstring, or anything else, except for the default ones. – desbest Oct 12 '20 at 10:40
  • Here it is. https://desbest.com/phpinfo%20on%20php%207.2%20uniform%20server.htm – desbest Oct 12 '20 at 17:22
  • Sorry I gave you the wrong web page. I've updated the web page. Click the link again. – desbest Oct 12 '20 at 21:22
  • PHP 7.2 also isn't loading the `mysqli` module so I can't even work with databases. – desbest Oct 12 '20 at 22:05
  • Please update your question with a directory breakdown of what's in `C:/Users/desbest/Documents/UniServerZ/core/php72/extensions` I am thinking this is a permissions related issue, since you installed under `C:/Users/desbest/Documents/UniServerZ`, which typically does not have the permissions for the user that is executing PHP or the webserver. I recommend using `C:/UniServerZ` instead and assigning the appropriate permissions. – Will B. Oct 13 '20 at 22:07
  • How do I check whether the permissions are set, and how do I set permissions. Also PHP 5.6, 7.0, 7.1, 7.3, and 7.4 work, it's just that 7.2 does not, so it doesn't look like `UniServerZ` being in `My Documents` being an issue. – desbest Oct 13 '20 at 23:34
  • I've updated the question to show the contents of `C:/Users/desbest/Documents/UniServerZ/core/php72/extensions` – desbest Oct 13 '20 at 23:48

1 Answers1

0

The developer of Uniform Server managed to fix the problem, saying so in this post.

Ok.. Thanks for bringing this up.. Looks like made a mistake on the spelling on the extensions folder. Please rename the /core/php72/extentions to /core/php72/extensions and everything should work as expected.. I have updated the module in Sourceforge.

desbest
  • 4,269
  • 11
  • 45
  • 76