Fat*_*ger 1 php mysql header mismatch
我真的很难在debian wheezy上修复这些错误.
mysql_connect():标头和客户端库次要版本不匹配.标题:50531库:第317行的50613 core.php
升级到php 5.4,ioncube加载器4.4.3,xcache 3.0.3和percona 5.6后,问题发生了很长一段时间.
到目前为止,我试图解决我试过的问题......
其中没有一个帮助不幸......
第317行以下列内容开头:
$link = $this->
Run Code Online (Sandbox Code Playgroud)
/**
* Initialize database connection(s)
*
* Connects to the specified master database server, and also to the slave server if it is specified
*
* @param string Name of the database server - should be either 'localhost' or an IP address
* @param integer Port of the database server (usually 3306)
* @param string Username to connect to the database server
* @param string Password associated with the username for the database server
* @param boolean Whether or not to use persistent connections to the database server
* @param string Not applicable; config file for MySQLi only
* @param string Force connection character set (to prevent collation errors)
*
* @return boolean
*/
function db_connect($servername, $port, $username, $password, $usepconnect, $configfile = '', $charset = '')
{
if (function_exists('catch_db_error'))
{
set_error_handler('catch_db_error');
}
// catch_db_error will handle exiting, no infinite loop here
do
{
$link = $this->functions[$usepconnect ? 'pconnect' : 'connect']("$servername:$port", $username, $password);
}
while ($link == false AND $this->reporterror);
restore_error_handler();
if (!empty($charset))
{
if (function_exists('mysql_set_charset'))
{
mysql_set_charset($charset);
}
else
{
$this->sql = "SET NAMES $charset";
$this->execute_query(true, $link);
}
}
return $link;
}
Run Code Online (Sandbox Code Playgroud)
小智 10
当我最近将我的ubuntu服务器升级到13.04时,我遇到了同样的问题,这只是一个警告,libmysqlclient我也有mariadb,你可以使用php5-mysqlnd而不是php5-mysql这个为我修复它.
sudo apt-get remove php5-mysql
sudo apt-get install php5-mysqlnd
Run Code Online (Sandbox Code Playgroud)