Magento 2 Thumbnail Cache

There are other similar questions, but I do not have the correct answer.

I have a new Magento 2 installation built using composer. I did nothing with it other than setting the sample data using the command php bin/magento sampledata:deployfollowed setup:upgrade, setup:di:compileand setup:static-content:deploy.

When I go to the category page, all the images are 404. A folder is pub/media/catalog/product/cachenot created. Permissions are consistent with Magento 2 docs:

pub/media/catalog/product$ ll
drwxrwsrwx  8 matt     www-data 4096 Apr 21 10:38 ./
drwxrwsr-x  3 matt     www-data 4096 Apr 20 14:02 ../
drwxrwsr-x 35 www-data www-data 4096 Apr 21 10:35 cache/
drwxrwsrwx  3 matt     www-data 4096 Apr 20 14:02 g/
drwxrwsrwx  4 matt     www-data 4096 Apr 20 14:02 l/
drwxrwsrwx  9 matt     www-data 4096 Apr 20 14:02 m/
drwxrwsrwx  4 matt     www-data 4096 Apr 20 14:02 u/
drwxrwsrwx  9 matt     www-data 4096 Apr 20 14:02 w/

I have GD installed and I am running PHP 5.6.

The memory limit in my php.ini file is 2048M. I know this is too high, but I rule out memory limitation as a reason.

I reinstalled Magento 2 several times.

I created a PHP script to create folders and files in the product cache directory, and this works without problems.

php bin/magento catalog:images:resize, pub/media/catalog/product/cache .

, ! , - .

!

, PHP:

[PHP Modules]
calendar, Core, ctype, curl, date, dom, ereg, exif, fileinfo, filter, ftp, gd, gettext, hash, iconv, intl, json, libxml, mbstring, mcrypt, mhash, mysql, mysqli, mysqlnd, openssl, pcntl, pcre, PDO, pdo_mysql, Phar, posix, readline, Reflection, session, shmop, SimpleXML, soap, sockets, SPL, standard, sysvmsg, sysvsem, sysvshm, tokenizer, wddx, xml, xmlreader, xmlwriter, xsl, Zend OPcache, zlib

[Zend Modules]
Zend OPcache
+4
1

, , GitHub Magento 2 repo

( ) - composer.json 2.1.6 2.1.5. :

{
  "name": "magento/project-community-edition",
  "description": "eCommerce Platform for Growth (Community Edition)",
  "type": "project",
  "version": "2.1.5", // Here
  "license": [
    "OSL-3.0",
    "AFL-3.0"
  ],
  "require": {
    "magento/product-community-edition": "2.1.5", // Here
    "composer/composer": "@alpha",
    "bitexpert/magento2-force-customer-login": "1.3.1",
    "magento/data-migration-tool": "2.1.5" // Here
  },
...

composer update.

, Magento 2, :

  • php bin/magento setup:upgrade
  • php bin/magento setup:di:compile
  • php bin/magento setup:static-content:deploy

, , Magento dev, , . , .

Magentoing!

+1

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


All Articles