MySQLi problem...

Hey leute!

da mein lpatop kaputt ist hab ich einen alten rechner ausgepakct und linux draufgehauen.
danach apache, editor etc installiert.
beim aufruf meiner Website kommt folgender mir teilweise unbekannter Fehler:
Warning: mysqli::mysqli() [mysqli.mysqli]: OK packet 6 bytes shorter than expected in /opt/lampp/htdocs/9mango/core/function_database.inc.php on line 10

Warning: mysqli::mysqli() [mysqli.mysqli]: (HY000/2000): mysqlnd cannot connect to MySQL 4.1+ using old authentication in /opt/lampp/htdocs/9mango/core/function_database.inc.php on line [B]10

[/B]diese beiden fehler produzieren weiter fehler, wenn funktionen mit mysqli yu tun haben ist ja logisch.
hier der ausschnitt aus der datei, wobei der wohl weniger weiterhilft:

function db_connect() { $result = new mysqli(DB_HOST, DB_USER, DB_PASSWORD, DB_NAME); return $result; } ?>
das ist die funktion mehr steht da nicht, zeile zehn ist die $result = new mysqli etc zeile.
ich habe geschaut: ich benutzte die neuste version des apache 1.7.3a und dort soll mysqli 5+ sein. auch auf einen internet beitrag hin habe ich meinen client API der mysqli() ueberprueft und der ist version 5.0.5
ich weiss nicht weiter und bei google habe ich keinen passenden artikel oder beitrag gefunden.

ich hoffe ihr koennt mir helfen

mfg
mad dog

welche php-version hasstu denn drauf?
ich bin sooo weit noch nicht mit dem php lernen, nehme jetz aber an, das ist php, weils ja auch die php-endung hat kombiniere:sunglasses:
ich glaube gelesen zu haben, dass die mysqli erweiterung erst ab php5 unterstützt wird. falls deine version darunter liegt, könnte ein verwenden der „normalen“ mysql funktionen den fehler vielleicht beheben?
lg vitus

Könnte genau umgekehrt sein und die PHP-Version ist zu neu.

Habe das hier gefunden auf einer php.net-Seite zu PHP 5.3 (aus irgendeinem Grund finde ich die gerade nicht wieder, bin aber auch auf dem Sprung).

The new mysqlnd library necessitates the use of MySQL 4.1’s newer 41-byte password format. Continued use of the old 16-byte passwords will cause mysql_connect() and similar functions to emit the error, „mysqlnd cannot connect to MySQL 4.1+ using old authentication.“

Edit: Hier ist der Link: http://php.net/manual/en/migration53.incompatible.php Mehr weiß ich dazu leider auch nicht.

Das hier könnte eine Lösung sein:

Hi John,
I suspect you have still password which use pre-4.1 hashing.
Can you do the following against your DB

select Host, length(Password) from mysql.user where User=‚XYZ‘;
and tell me whether length is 16 (old passwords) or 41.
In the case of old passwords, it happens when someone upgrades from
pre-4.1 to 4.1 or better but doesn’t change the password. When
authenticating libmysql falls back to the old authentication, which is
not quite secure. mysqlnd recognizes that the server is 4.1 or better
but still wants to auth using the old passwords and refuses to connect.
In this case, it is recommended to update your system tables by
re-setting the passwords, if you know them of course, using the SET
PASSWORD statement.

Regards,
Andrey

Probieren geht über Studieren: Versuch mal, das MySQL-Passwort zu ändern.