run php info in cli code example

Example 1: php run command line

shell_exec('ls');
// or
exec('ls');

Example 2: php run command terminal

php -r "Print \"Hello, World!\";"

Example 3: you can also run `php --ini` inside terminal to see which files are used by php in cli mode.

Your error message is pretty explicit about what is going wrong:

laravel/framework v5.2.9 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.

Do you have mbstring installed on your server and is it enabled?

You can install mbstring as part of the libapache2-mod-php5 package:

sudo apt-get install libapache2-mod-php5

Or standalone with:

sudo apt-get install php-mbstring

Installing it will also enable it, however you can also enable it by editing your php.ini file and remove the ; that is commenting it out if it is already installed.

If this is on your local machine, then follow the appropriate steps to install this on your environment.

Tags:

Misc Example