首页 文章

错误500安装Magento

提问于
浏览
1

我正在我的服务器上安装Magento 2.0.0版 . 我甚至没有配置就得到500错误 . 尝试各种解决方案得不到积极响应 . 应用检查和清理文件并接收以下消息:

检查:

Your server does not meet the following requirements in order to install Magento.
The following requirements failed, please contact your hosting provider in order to receive assistance with meeting the system requirements for Magento:

You need MySQL 4.1.20 (or greater)

The following requirements were successfully met:
You have PHP 5.2.0 (or greater)
Safe Mode is off
You have the curl extension
You have the dom extension
You have the gd extension
You have the hash extension
You have the iconv extension
You have the mcrypt extension
You have the pcre extension
You have the pdo extension
You have the pdo_mysql extension
You have the simplexml extension

清理 :

----------------------- CLEANUP START -------------------------

*************** SETTING PERMISSIONS ***************
Setting all folder permissions to 755
Setting all file permissions to 644
Setting pear permissions to 550

****************** CLEARING CACHE ******************

************** CHECKING FOR EXTENSIONS ***********
-= WARNING =- Overrides or extensions exist in the app/code/local folder
-= WARNING =- Overrides or extensions exist in the app/code/community folder

------------------- CLEANUP COMPLETED in:2.6845 seconds ------------------

在检查文件中,它说我的服务器上没有该版本的MySQL . 添加以下代码以查看我的版本,这就是答案:

echo "<h2>Exact Version PHP & MySQL: </h2>";
printf("PHP version: %s\n", PHP_VERSION); 
$mysql = mysqli_connect('localhost', 'root', 'example'); 
#$mysql = mysqli_connect('localhost', 'root', ''); 
## Test the MySQL connection 
if (mysqli_connect_errno()) {
   printf("</br> Connection failed: %s\n", mysqli_connect_error());
   exit();
}
## Print the MySQL server version 
printf("</br> MySQL server version: %s\n",    mysqli_get_server_info($mysql)); 
##Close the MySQL connection 
mysqli_close($mysql);

结果:

Exact Version PHP & MySQL:

PHP version: 5.5.30-1~dotdeb+7.1 
MySQL server version: 5.6.15

EDIT

错误记录我的服务器

[Fri Jan 08 12:02:44 2016] [错误] [客户端200.111.332.174] PHP致命错误:未捕获异常'Magento \ Framework \ Exception \ LocalizedException',消息'无法创建目录/ home / nhernandez / public_html / editorialauncreemos的/ var /生成/ Magento的/框架/应用/ ResourceConnection /“ . 在/home/nhernandez/public_html/editorialauncreemos/vendor/magento/framework/Code/Generator.php:103 \ nStack trace:\ n#0 / home / nhernandez / public_html / editorialauncreemos / vendor / magento / framework / Code / Generator / Autoloader.php(35):Magento \ Framework \ Code \ Generator-> generateClass('Magento \ Framewo ...')1 [内部函数]:Magento \ Framework \ Code \ Generator \ Autoloader-> load('Magento \ \ Framewo ...')2 [内部功能]:spl_autoload_call('Magento \ Framewo ...')3 /home/nhernandez/public_html/editorialauncreemos/vendor/magento/framework/Code/Reader/ClassReader.php(19 ):ReflectionClass - > __ construct('Magento \ Framewo ...')4 /home/nhernandez/public_html/editorialauncreemos/vendor/magento/framework/ObjectManager/Definition/Runtime.php(44):Magento \ Framework \ Code \ Reader \ ClassReader-> getConstructor(第103行的/home/nhernandez/public_html/editorialauncreemos/vendor/magento/framework/Code/Generator.php中的'Magento \ Fram'

1 回答

  • 0

    由于您在提供 777 权限后提到magento存储加载,我们可以得出结论,mysql数据库连接没有问题 .

    您的服务器日志确切地说明问题究竟是什么 . 确保magento根目录,子目录和所有文件的所有权符合apache(httpd.conf) UserGroup .

    在我的框中,用户是 http ,组是 http . 发出以下命令,其中 $MAGENTO_ROOT 是您的magento根目录:

    $ chown http:http * -R
    $ cd $MAGENTO_ROOT
    $ sudo rm var/{cache,session,generation} -R
    $ sudo -u http -g http bin/magento setup:upgrade
    $ sudo -u http -g http bin/magento setup:di:compile
    

    如果您使用 php-fpm ,请确保 php-fpm.ini 具有相同的 usergroup 值 .

相关问题