Php 安装Magento时出错500

Php 安装Magento时出错500,php,mysql,magento,Php,Mysql,Magento,我正在服务器上安装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 re

我正在服务器上安装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 ------------------
在check文件中,它说我的服务器上没有那个版本的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);
编辑

错误日志记录我的服务器

[Fri Jan 08 12:02:44 2016][error][client 200.111.332.174]PHP致命错误:未捕获异常“Magento\Framework\exception\LocalizedException”,消息为“无法创建目录/home/nhernandez/public_html/editorialauncreemos/var/generation/Magento/Framework/App/ResourceConnection/”,位于/home/nhernandez/public_html/editorialauncreemos/vendor/Magento/Framework/Code/Generator.PHP:103\n堆栈跟踪:\n\0/home/nhernandez/public\u 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_自动加载_调用('Magento\\Framewo…'))

3/home/nhernandez/public_html/editorialauncreemos/vendor/magento/framework/Code/Reader/ClassReader.php(19):ReflectionClass->_构造('magento\\Framewo…'))

4/home/nhernandez/public_html/editorialauncreemos/vendor/magento/framework/ObjectManager/Definition/Runtime.php(44):magento\framework\Code\Reader\ClassReader->getConstructor('magento\\Fram in/home/nhernandez/public_html/editorialauncreemos/vendor/magento/framework/Code/Generator.php,第103行


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

您的服务器日志确切地说明了问题所在。请确保magento根目录、子目录和所有文件的所有权符合apache(httpd.conf)
User
Group

在我的框中,用户是
http
,组是
http
。发出以下命令,其中
$MAGENTO\u 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
具有相同的
user
group
值。

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

您的服务器日志确切地说明了问题所在。请确保magento根目录、子目录和所有文件的所有权符合apache(httpd.conf)
User
Group

在我的框中,用户是
http
,组是
http
。发出以下命令,其中
$MAGENTO\u 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
具有相同的
user
group
值。

I屏幕上有一个关闭选项,您不必费心从屏幕上读取错误的前两行吗?除了在OP列出“MySQL服务器版本:5.6.15”的底部。好奇。除非OP没有使用localhost作为Magnetor DB。这是显而易见的,但我的服务器上安装了更高版本。然后,他在安装中没有连接到与他在PHP测试中相同的MYSQL。尽管这会导致混淆,但在任何一个系统上都安装了多个MYSQL服务器我有一个接近的选项on for不必费心从屏幕上读取错误的前两行?除了在OP列出“MySQL服务器版本:5.6.15”的底部。好奇。除非OP没有为Magnetor DB使用localhost。这是显而易见的,但我的服务器上安装了更高版本。然后,他在安装中没有连接到与他在PHP测试中相同的MYSQL。尽管这会导致混淆,但在任何一个系统上安装了多个MYSQL服务器