Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/mysql/58.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Magento-Check.php认为I';我使用的MySQL版本比我低_Mysql_Magento - Fatal编程技术网

Magento-Check.php认为I';我使用的MySQL版本比我低

Magento-Check.php认为I';我使用的MySQL版本比我低,mysql,magento,Mysql,Magento,我在开发过程中遇到了一些站点问题,决定运行magento-check.php文件,看看是否一切正常。结果是 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 meetin

我在开发过程中遇到了一些站点问题,决定运行magento-check.php文件,看看是否一切正常。结果是

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
问题是我运行的是MySql服务器版本:5.5.24-0ubuntu0.12.04.1


还要注意的是,Magento已经安装在服务器上,并且正在运行。我遇到的问题是,仅在产品页面上,就有500个内部服务器错误。我不认为这些问题是相关的,但它仍然很奇怪。

我不确定其中是否有问题,但如果您正在谈论分发在这里的magento-check.php脚本

http://www.magentocommerce.com/knowledge-base/entry/how-do-i-know-if-my-server-is-compatible-with-magento/
这将获得mysql的版本,并带有以下注释

preg_match('/[0-9]\.[0-9]+\.[0-9]+/', shell_exec('mysql -V'), $version);
然后使用

if(version_compare($version[0], '4.1.20', '<')) {
然后在输出中查找X.X.X版本号。比如说这个,

/usr/local/mysql/bin/mysql  Ver 14.14 Distrib 5.1.41, for apple-darwin9.5.0 (i386) using readline 5.1
表示脚本认为版本为
5.1.41

我猜您正在使用删除服务器。这意味着上面的脚本将检查本地运行的mysql cli客户端的版本。也可能您没有任何mysql在本地运行,这意味着脚本将尝试解析文本

mysql: command not found
查找版本号,但找不到版本号


至于您的500个内部服务器错误,这意味着apache有错误,或者PHP有错误。分别检查他们的错误日志,查看错误是什么

您需要使用php和mysql检查magento的确切版本支持,我希望下面的代码可以帮助您检查php和mysql的确切版本

##Test What Exact Version PHP & MySQL
echo "<h2>Exact Version PHP & MySQL: </h2>";
printf("PHP version: %s\n", PHP_VERSION); 
$mysql = mysqli_connect('localhost', 'devonbd_com', 'XSZefjGW'); 
#$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);
##测试PHP和MySQL的确切版本
echo“PHP和MySQL的精确版本:”;
printf(“PHP版本:%s\n”,PHP\u版本);
$mysql=mysqli_connect('localhost','devonbd_com','XSZefjGW');
#$mysql=mysqli_connect('localhost','root','';
##测试MySQL连接
if(mysqli\u connect\u errno()){
printf(“
连接失败:%s\n”,mysqli\u connect\u error()); 退出(); } ##打印MySQL服务器版本 printf(“
MySQL服务器版本:%s\n”,mysqli\u get\u server\u info($MySQL)); ##关闭MySQL连接 mysqli_close($mysql);
我刚刚解决了这个问题。事实证明,MySQL警告可能是一个假警报;对我来说,将PHP版本(我正在使用MAMP)从7更改为5.6就成功了。看看一些论坛,将PHP版本从5.3降低到5.2也对一些论坛起到了作用。

Ok,这很有意义。Magento安装在专用apache2 Web服务器上,数据库位于单独的专用数据库服务器上。
##Test What Exact Version PHP & MySQL
echo "<h2>Exact Version PHP & MySQL: </h2>";
printf("PHP version: %s\n", PHP_VERSION); 
$mysql = mysqli_connect('localhost', 'devonbd_com', 'XSZefjGW'); 
#$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);