Install and / or enable the PHP accelerator (recommended)"? I...">

Moving Symfony 3.0 PHP 5.5 to PHP 7.1: "Do I need to install the PHP accelerator> Install and / or enable the PHP accelerator (recommended)"?

I want to upgrade PHP5.5 to 7.1 in a SYMFONY 3.0 project.

I check the file "php.ini" to get the correct result.

The latter is not resolved: In PHP5.5, I used the php_apcu.dll extension accelerator . This is not supported in PHP7.

I was looking for an alternative, and I read here that the accelerator is no longer needed in PHP7, since it is already built into it.

When I do the CLI: "php bin / symfony_requirements", the following message appears:

You must install the PHP accelerator> Install and / or enable the PHP accelerator> (recommended)

As I understand it, I do not need to add a new extension, but I can somehow enable the accelerator in PHP7.

Does anyone know if the accelerator parameter should be set to true in PHP7 or run by default (and the Symfony error message should be ignored) or a new extension ( different from the legacy APC, as the wiki page explains ) should be installed?

UPDATE: After the comments received on the issue, I added the following parameter to my "php.ini":

opcache.enable=1 
opcache.enable_cli=1 
opcache.memory_consumption=128 
opcache.interned_strings_buffer=8 
opcache.max_accelerated_files=2000 
opcache.revalidate_freq=60 
opcache.fast_shutdown=1 

I restarted the Apache service , and when I do the CLI: "php bin / symfony_requirements", I still get the following message:

PHP > / PHP > ()

@LBA: CLI " " Symfony.

, CLI: "php bin/symfony_requirements" , :

PHP. , D:\Application\Apache24\HTDOCS\symf\my_symf_project\\SymfonyRequirements.php 759

. , D:\Application\Apache24\HTDOCS\symf\my_symf_project\\SymfonyRequirements.php 759

Symfony2 Checker ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

PHP php.ini: D:\Application\php7\php.ini

     

Symfony:................ W............... W.......

[OK] Symfony2

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

  • .    .

  • PHP-

    / PHP ().

. php.ini ~~~~ , -.        , ,        web/config.php script.

( Windows10):

  • , "" "[ php7]\php7\ ", " php -v ", :

PHP 7.1.1 (cli) (: 18 2017 18:38:49) (ZTS MSVC14 (Visual ++ 2015) x64) Copyright (c) 1997-2017 PHP Group Zend Engine v3.1.0, Copyright (c) 1998-2017 Zend Technologies

symfony :

    "require": {
        "php": ">=5.5.9",
...}

"php": " >= 7.1.0" " ", :

( require-dev). .

1     - php >= 7.1.0, PHP (5.5.9) .

, - environement Symfony.

phpinfo(), Symfony, PHP-, : PHP 7.1.1

+4
1

, 2 , :

1st: opcache.

php.ini, , symfony php. php.ini:

zend_extension = "[ php7]\php7\ext\php_opcache.dll"

(, php )

2nd. symfony [ ]\composer.json, , Symfony PHP7:

{
    "require": {
        "php": ">=7.1.1",
         ....
    },
    ....
    "config": {
        "platform": {
            "php": "7.1.1"
        }
    },
}
+2

Source: https://habr.com/ru/post/1667628/


All Articles