iam using MySQL and phpMyAdmin at www.000webhost.com. My problem is: when I add a new column in the database (7 to 8) I get these errors:
Warning: mysqli_stmt::execute(): Premature end of data (mysqlnd_wireprotocol.c:1130) in /storage/ssd3/216/2786216/public_html/pages/login.php on line 13
Warning: mysqli_stmt::execute(): RSET_HEADER packet 4 bytes shorter than expected in /storage/ssd3/216/2786216/public_html/pages/login.php on line 13
Warning: mysqli_stmt::execute(): Error reading result set’s header in /storage/ssd3/216/2786216/public_html/pages/login.php on line 13
Notice: Trying to get property of non-object in /storage/ssd3/216/2786216/public_html/pages/login.php on line 16
Does somebody know how to fix it?
Warning: mysqli_stmt::execute(): Premature end of data (mysqlnd_wireprotocol.c:1130) in /storage/ssd3/216/2786216/public_html/pages/login.php on line 13
This usually means there are incompatibilities between PHP query DB versions and MySQL database system. We are using MariaDB which is a little different from the traditional MySQL.
Please keep changing your PHP version and keep trying.
With PHP version 7.0 it works, but now I get this error:
Warning: mysqli_stmt::execute(): Premature end of data (mysqlnd_wireprotocol.c:1114) in /storage/ssd3/216/2786216/public_html/pages/admininterface.php on line 68
Warning: mysqli_stmt::execute(): RSET_HEADER packet 4 bytes shorter than expected in /storage/ssd3/216/2786216/public_html/pages/admininterface.php on line 68
Warning: mysqli_stmt::execute(): Error reading result set’s header in /storage/ssd3/216/2786216/public_html/pages/admininterface.php on line 68
Fatal error: Uncaught Error: Call to a member function fetch_object() on boolean in /storage/ssd3/216/2786216/public_html/pages/admininterface.php:70 Stack trace: #0 {main} thrown in /storage/ssd3/216/2786216/public_html/pages/admininterface.php on line 70
Line 65-70:
require("…/dbconnect.php");
$search_user = $db->prepare(“SELECT * FROM users WHERE id=?”);
$search_user->bind_param(“i”,$_SESSION[“user”]);
$search_user->execute();
$search_result = $search_user->get_result();
$search_object = $search_result->fetch_object();
Any known fix to this issue? After adding a 5th column (boolean) this has started happening.
Warning: mysqli_stmt::execute(): Premature end of data (mysqlnd_wireprotocol.c:1130) in /storage/ssd1/421/4460421/public_html/account/index.php on line 22
Warning: mysqli_stmt::execute(): RSET_HEADER packet 4 bytes shorter than expected in /storage/ssd1/421/4460421/public_html/account/index.php on line 22
Warning: mysqli_stmt::execute(): Error reading result set's header in /storage/ssd1/421/4460421/public_html/account/index.php on line 22
Notice: Trying to get property of non-object in /storage/ssd1/421/4460421/public_html/account/index.php on line 24
Lines 20-24:
$stmt = $conn->prepare('SELECT * FROM account_information WHERE account = ?');
$stmt->bind_param('s', $account);
$stmt->execute();
$result = $stmt->get_result();
if ($result->num_rows > 0) {
By the way, what I’ve done (add a new column with the exact same code) works completely fine on a local server (XAMPP).