Yii2 Install On Localhost (Windows) Mbstring Problem

I am using UniServer Zero XI 11.2.1 (PHP 5.4.30) on a Windows computer, as localhost.

I’d like to install Yii2 on this computer, the basic application template. I am using the Command Prompt and Composer to achieve this.

This is my command:


C:\my_path>composer create-project --prefer-dist --stability=dev yiisoft/yii2-app-basic

This is the result:


Installing yiisoft/yii2-app-basic (dev-master 539a6f0c5965bc92bcf8af23c33d0e86e85f4857)

  - Installing yiisoft/yii2-app-basic (dev-master master)

    Loading from cache


Created project in C:\my_path\yii2-app-basic

Loading composer repositories with package information

Installing dependencies (including require-dev)

Your requirements could not be resolved to an installable set of packages.


  Problem 1

    - yiisoft/yii2 dev-master requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.

    - yiisoft/yii2 2.0.0-beta requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.

    - yiisoft/yii2 2.0.0-alpha requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.

    - Installation request for yiisoft/yii2 * -> satisfiable by yiisoft/yii2[2.0.0-alpha, 2.0.0-beta, dev-master].

Folders have been generated, so theoretically installation seems to be okay.

Should these error messages bother me? (Actually, they do.)

I checked the mbstring extension: it is enabled.

Here comes the solution.

Although I was using the most recent version of Uniform Server, my ‘path’ environment variable still referred to the PHP folder of the older one (this caused the problem).

After updating the ‘path’ system variable for PHP (Windows 7 64bit: Control panel > System > Advanced system settings > Environment variables / System variables), I managed to install ‘Yii2 basic template’ with no error messages.

This means that moving to a newer version of the local server software might require updating the ‘path’ environment variable for the PHP folder.

This helped.