cancel
Showing results for 
Search instead for 
Did you mean: 

magento setup production mode and compile

magento setup production mode and compile

I'm using server is Linux, Apache 2.4.29 ,Centos 7, PHP 7.1.12 , MySQL 5.6.38.

I'm install new magento2.2.2 but when i setup production mode and compile will be error.

This is about my php/server? or not? how can i fix it, thank you very much

 

php bin/magento deploy:mode:set productionEnabled maintenance modeStarting compilationSomething went wrong while compiling generated code. See the error log for details.
Command returned non-zero exit code:
`/opt/cpanel/ea-php71/root/usr/bin/php -f /home/xxx/public_html/test2/bin/magento setup:di:compile`

i running this the problem still

php bin/magento setup:upgrade
php bin/magento indexer:reindex
php bin/magento deploy:mode:set production -s (or --skip-compilation)
php bin/magento setup:di:compile

getting

[Exception] Warning: Narrowing occurred during type inference. Please file a bug report on bugs.php.net in /home/XXX/public_html/test2/vendor/composer/ClassL oader.php on line 444
1 REPLY

Re: magento setup production mode and compile

It looks like this could be a PHP bug. In the latest changelog for 7.1.13 release of PHP there are two fixes for this error: http://php.net/ChangeLog-7.php#7.1.13

----
If you've found one of my answers useful, please give "Kudos" or "Accept as Solution" as appropriate. Thanks!