setup:upgrade 和 setup:di:compile 不工作
setup:upgrade and setup:di:compile not working
我已经试了几天了,但我一直做不到。
我安装了 Magento 2.1。
我安装了主题,然后通过 ssh (bin/magento) 激活了模块。
然后 bin/magento setup:upgrade 和 bin/magento setup:di:compile 我遇到了一些错误。
我在 Centos 7 上使用 Plesk Onyx 17.8
我在网络服务器上使用 PHP 7.0.33 for Magento 2.1。
PHP cli 版本
-bash-4.2$ php -v
PHP 5.4.16 (cli) (built: Oct 30 2018 19:30:51)
Copyright (c) 1997-2013 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2013 Zend Technologies
with the ionCube PHP Loader (enabled) + Intrusion Protection from ioncube24.com (unconfigured) v10.0.3, Copyright (c) 2002-2017, by ionCube Ltd.
-bash-4.2$
magento setup:upgrade 输出
-bash-4.2$ cd bin
-bash-4.2$ ./magento setup:upgrade
Magento supports PHP 5.6, 7.0.2, and 7.0.6 or later. Please read http://devdocs.magento.com/guides/v1.0/install-gde/system-requirements.html
-bash-4.2$
设置:升级输出
-bash-4.2$ /opt/plesk/php/7.0/bin/php bin/magento setup:upgrade -vvv
[ReflectionException]
Class Magento\Framework\App\Config\Initial\Converter\Interceptor does not exist
Exception trace:
() at /var/www/vhosts/example.com/httpdocs/vendor/magento/framework/Code/Reader/ClassReader.php:19
ReflectionClass->__construct() at /var/www/vhosts/example.com/httpdocs/vendor/magento/framework/Code/Reader/ClassReader.php:19
...
...
...
Symfony\Component\Console\Application->run() at /var/www/vhosts/example.com/httpdocs/bin/magento:23
setup:upgrade [--keep-generated] [--magento-init-params="..."]
-bash-4.2$
设置:di:编译输出
-bash-4.2$ /opt/plesk/php/7.0/bin/php bin/magento setup:di:compile -vvv
Compilation was started.
Repositories code generation...
1/7 [====>-----------------------] 14% 1 sec 42.0 MiB
PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 528384 bytes) in /var/www/vhosts/dotarz.com/httpdocs/vendor/zendframework/zend-code/src/Scanner/FileScanner.php on line 36
Check https://getcomposer.org/doc/articles/troubleshooting.md#memory-limit-errors for more info on how to handle out of memory errors.
-bash-4.2$
按相同的顺序执行这些命令
rm -rf var/generation;
rm -rf var/cache;
rm -rf var/page_cache;
/opt/plesk/php/7.0/bin/php bin/magento setup:di:compile;
/opt/plesk/php/7.0/bin/php bin/magento setup:static-content:deploy;
/opt/plesk/php/7.0/bin/php bin/magento cache:clean;
/opt/plesk/php/7.0/bin/php bin/magento cache:flush;
连接 CLI 后:
export PATH=/opt/plesk/php/7.0/bin:$PATH
我已经试了几天了,但我一直做不到。
我安装了 Magento 2.1。
我安装了主题,然后通过 ssh (bin/magento) 激活了模块。
然后 bin/magento setup:upgrade 和 bin/magento setup:di:compile 我遇到了一些错误。
我在 Centos 7 上使用 Plesk Onyx 17.8
我在网络服务器上使用 PHP 7.0.33 for Magento 2.1。
PHP cli 版本
-bash-4.2$ php -v
PHP 5.4.16 (cli) (built: Oct 30 2018 19:30:51)
Copyright (c) 1997-2013 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2013 Zend Technologies
with the ionCube PHP Loader (enabled) + Intrusion Protection from ioncube24.com (unconfigured) v10.0.3, Copyright (c) 2002-2017, by ionCube Ltd.
-bash-4.2$
magento setup:upgrade 输出
-bash-4.2$ cd bin
-bash-4.2$ ./magento setup:upgrade
Magento supports PHP 5.6, 7.0.2, and 7.0.6 or later. Please read http://devdocs.magento.com/guides/v1.0/install-gde/system-requirements.html
-bash-4.2$
设置:升级输出
-bash-4.2$ /opt/plesk/php/7.0/bin/php bin/magento setup:upgrade -vvv
[ReflectionException]
Class Magento\Framework\App\Config\Initial\Converter\Interceptor does not exist
Exception trace:
() at /var/www/vhosts/example.com/httpdocs/vendor/magento/framework/Code/Reader/ClassReader.php:19
ReflectionClass->__construct() at /var/www/vhosts/example.com/httpdocs/vendor/magento/framework/Code/Reader/ClassReader.php:19
...
...
...
Symfony\Component\Console\Application->run() at /var/www/vhosts/example.com/httpdocs/bin/magento:23
setup:upgrade [--keep-generated] [--magento-init-params="..."]
-bash-4.2$
设置:di:编译输出
-bash-4.2$ /opt/plesk/php/7.0/bin/php bin/magento setup:di:compile -vvv
Compilation was started.
Repositories code generation...
1/7 [====>-----------------------] 14% 1 sec 42.0 MiB
PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 528384 bytes) in /var/www/vhosts/dotarz.com/httpdocs/vendor/zendframework/zend-code/src/Scanner/FileScanner.php on line 36
Check https://getcomposer.org/doc/articles/troubleshooting.md#memory-limit-errors for more info on how to handle out of memory errors.
-bash-4.2$
按相同的顺序执行这些命令
rm -rf var/generation;
rm -rf var/cache;
rm -rf var/page_cache;
/opt/plesk/php/7.0/bin/php bin/magento setup:di:compile;
/opt/plesk/php/7.0/bin/php bin/magento setup:static-content:deploy;
/opt/plesk/php/7.0/bin/php bin/magento cache:clean;
/opt/plesk/php/7.0/bin/php bin/magento cache:flush;
连接 CLI 后:
export PATH=/opt/plesk/php/7.0/bin:$PATH