Windows下安装,前台及后台不能正常显示,部分JS404,找不到的路径较短,应该是不正确

5.60K 浏览M2交流区

Windows下安装,前台及后台不能正常显示,部分JS404,找不到的路径较短,应该是不正确


0

救救孩子吧 安装两天还没安装好

0

不要在windows下安装

0

推荐在虚拟机安装

0

记录一下xampp + windows10 +magento2.3.5本地环境不工作
1 php bin/magento deploy:mode:show
PHP Warning: PHP Startup: Unable to load dynamic library 'php_mcrypt.dll'

提示找不到php.mcrypt.dll
https://windows.php.net/downloads/pecl/releases/mcrypt/1.0.3/
下载对应的dll文件 php_mcrypt.dll
解压复制粘贴到C:xamppphpext

2 php bin/magento deploy:mode:show 现在正常工作显示
Current application mode: default. (Note: Environment variables may override this value.)

3 php bin/magento deploy:mode:set developer
Enabled developer mode.

4 前台依旧报错
1 exception(s):
Exception #0 (MagentoFrameworkExceptionValidatorException): Invalid template file: 'C:/xampp/htdocs/magento2.3.5/vendor/magento/module-theme/view/frontend/templates/page/js/require_js.phtml' in module: '' block's name: 'require.js

5 open file /vendor/magento/framework/View/Element/Template/File/Validator.php in magento install dir , find
$realPath = $this->fileDriver->getRealPath($path);
replace with :
$realPath = str_replace('', '/', $this->fileDriver->getRealPath($path));

open file app/etc/di.xml in magento install dir, find

MagentoFrameworkAppViewAssetMaterializationStrategySymlink

and replace with

MagentoFrameworkAppViewAssetMaterializationStrategyCopy

6 done 解决

0