I turn on php7 in Openserver, but when I enter php -v into the console, I get php 5.6, but if I create the file and output the phpinfo () function, it shows the version of php 7. Because of this, I cannot install v8js, as it requires php 7 What to do in this situation and where does php 5.6 come from?

Or can you somehow indicate for which version to install the extension or the path to it?

  • one
    Apache what is it worth? for the seven 2.4 is needed .... there generally is in the settings apache-7 and apache-7-x64, which you need to use for php7, maybe it's in it. Although the fact that phpinfo shows the correct version, and the old console is rather strange , Alexey Shimansky
  • one
    I use apache-7, the usual 2.4 does not work - Jonny Manowar
  • Strange, of course, you can see the path in the files, but IMHO easier to reinstall. openserver, so as not to hemorrhoids. Get the latest version and rearrange - Alexey Shimansky

1 answer 1

OpenServer just rearranges the version for Apache2. To change the version of php in the console, you need to change the path from php-5.6 to the path to php-7.0 in the Windows environment variable "path".

  • Alternatively, write the path to the desired version of php directly, like C: \ OpenServer \ modules \ PHP-7.0 \ php.exe myscript.php - newbie67