I’ve been investigating, and mysql_get_server_info() is deprecated for PHP >= v5.5.0
That explains why I receive errors also after a user registers using this form.
I have made a workaround, which for the moment works.
I’m not a programmer, so please don’t think this is a perfect fix.
PieGeneralSettings.php, change line 488 by:
<?php if(version_compare($mysqli->server_info, "5.0") == 1)
{
echo '<span class="installation_status">'.$mysqli->server_info.'</span>';
}
else
{
echo '<span class="installation_status_faild">'.$mysqli->server_info.'</span>';
base.php, change line 758 by (look at the sourcecode of the webpage, because some code is missed):
$user = $wpdb->get_results(“SELECTID,user_login,user_nicename,user_email,user_registeredFROM".$user_table."WHEREuser_email= ‘”.stripslashes($user).”‘”);
I wish someone fixes this problem, and meanwhile this helps someone else 🙂
Hello,
Thank you for pointing out this issue, there is quick work around for this, however it will be fixed in our next release.
$piereg_mytsql_version_info = "";
global $wpdb;
if ( function_exists( 'mysqli_connect' ) ){
if ( defined( 'WP_USE_EXT_MYSQL' ) ){
//mysql
$piereg_mytsql_version_info = mysql_get_server_info($wpdb->dbh);
} elseif ( version_compare( phpversion(), '5.5', '>=' ) || ! function_exists( 'mysql_connect' ) ) {
//mysqli
$piereg_mytsql_version_info = mysqli_get_server_info($wpdb->dbh);
} elseif ( false !== strpos( $GLOBALS['wp_version'], '-' ) ) {
//mysqli
$piereg_mytsql_version_info = mysqli_get_server_info($wpdb->dbh);
}else{
//mysql
$piereg_mytsql_version_info = mysql_get_server_info($wpdb->dbh);
}
}else{
//mysql
$piereg_mytsql_version_info = mysql_get_server_info($wpdb->dbh);
}
if(version_compare($piereg_mytsql_version_info, "5.0") == 1)
{
echo '<span class="installation_status">'.$piereg_mytsql_version_info.'</span>';
}
else
{
echo '<span class="installation_status_faild">'.$piereg_mytsql_version_info.'</span>';
echo '<span class="quotation">'.__("Sorry, Pie-Register requires MySQL 5.0 or higher. Please deactivate Pie-Register","piereg").'</span>';
}
You can replace this code to fix this!
Thanks
Thank you very much!
And what about base.php? I don’t know if my fix is correct 😉
I did not test your fix, it is good as long as it works for you!
This problem will be fixed natively in our upcoming release which is due next week!
Thanks