Magento 2常见问题

FAQ Alan 9年前 (2015-12-17) 6667次浏览 扫描二维码

安装过程问题

../vendor/magento/framework/Code/Generator.php on line 103报错

这一报错通常出现在安装或升级Magento 2的时候,这时请尝试为根目录下的var文件夹设置 可写权限。以下为通过Mac的XAMPP安装时的完整报错信息:

Fatal error: Uncaught exception 'Magento\Framework\Exception\LocalizedException' with message 'Can't create directory /Applications/XAMPP/xamppfiles/htdocs/magento2/var/generation/Magento/Framework/App/ResourceConnection/.' in /Applications/XAMPP/xamppfiles/htdocs/magento2/vendor/magento/framework/Code/Generator.php:103 Stack trace: #0 /Applications/XAMPP/xamppfiles/htdocs/magento2/vendor/magento/framework/Code/Generator/Autoloader.php(35): Magento\Framework\Code\Generator->generateClass('Magento\Framewo...') #1 [internal function]: Magento\Framework\Code\Generator\Autoloader->load('Magento\Framewo...') #2 [internal function]: spl_autoload_call('Magento\Framewo...') #3 /Applications/XAMPP/xamppfiles/htdocs/magento2/vendor/magento/framework/Code/Reader/ClassReader.php(19): ReflectionClass->__construct('Magento\Framewo...') #4 /Applications/XAMPP/xamppfiles/htdocs/magento2/vendor/magento/framework/ObjectManager/Definition/Runtime.php(44): Magento\Framework\Code\Reader\ClassReader->getConstructor('Magento\Framewo...') #5 /Ap in /Applications/XAMPP/xamppfiles/htdocs/magento2/vendor/magento/framework/Code/Generator.php on line 103

missing PHP extensions intl.

很明显是缺失PHP组件,那么如何安装呢,先执行如下指令

cd ~ && curl -O http://ftp.gnu.org/gnu/autoconf/autoconf-latest.tar.gz 
tar -zxvf autoconf-latest.tar.gz 
cd autoconf-2.69 
./configure 
make 
sudo make install

安装过程可能会提示安装XCode或M4相关软件,请确认安装即可。下一步就是安装intl组件

sudo pecl install intl

安装后还需要在php.ini中加入组件的引用

sudo nano /Applications/XAMPP/xamppfiles/etc/php.ini
extension=intl.so //加入并保存

重启XAMPP中的Apache再次执行检查报错应该就会消失了

 

Magento 2常见问题

 

登录错误

You did not sign in correctly or your account is temporarily disabled.

开发者模式

An error has happened during application run. See exception log for details. Could not write error message to log. Please use developer mode to see the message.

 

喜欢 (1)
[]
分享 (0)