![]() Mailinglisten-Archive |
Werner Stuerenburg wrote: > Wieso l�uft dann der Code von Tobias nicht? Wie kann ich da > vorgehen, um was rauszukriegen? > > Warning: MySQL Connection Failed: Unknown MySQL error in > lib.inc.php3 Die Meldung ist definiert in der MySQL Clientbibliothek, also in den C-Funktionen, die der UNIX-Kommandozeilenbefehl mysql und die PHP-Funktionen mysql_connect() und *_pconnect() verwenden, um mit dem Server zu reden. Sieht man sich den Quelltext der Bibliothek an, findet man die Meldung in client/errmsg.c: #ifdef GERMAN static char *client_errors[]= { "Unbekannter MySQL Fehler", ... }; #else /* ENGLISH */ char *client_errors[]= { "Unknown MySQL error", ... }; #endif Es ist die Fehlermeldung mit dem Index 0. In include/errmsg.h ist definiert #define CR_MIN_ERROR 2000 /* For easier client code */ #define CR_MAX_ERROR 2999 #define ER(X) client_errors[(X)-CR_MIN_ERROR] #define CR_UNKNOWN_ERROR 2000 d.h. ein Aufruf der Funktion ER(CR_UNKNOWN_ERROR) w�rde die Meldung produzieren. Eine Suche nach diesem String bringt Hinweise auf die Dokumentation und dort insbesondere auf die Migration von 3.20 nach 3.21: Upgrading to 3.21 from a 3.20 version ------------------------------------- If you already have a version older than 3.20.28 running and want to switch to 3.21.# you need to do the following: You can start the `mysqld' 3.21 server with `safe_mysqld --old-protocol' to use it with clients from the 3.20 distribution. In this case the new client function, `mysql_errno()', will not return any server error, only `CR_UNKNOWN_ERROR', (but it works for client errors) and the server uses the old password() checking instead of the new one. If you are *NOT* using `--old-protocol': * All client code must be recompiled. If you are using ODBC you must get the new myodbc 2.# driver Demnach verwendest Du einen MySQL Server Daemon 3.21 oder neuer, aber Dein PHP bzw. die libmysql, die Dein PHP einbindet, ist 3.20 oder �lter. Du brauchst ein neueres PHP mit einer aktuellen MySQL Clientbibliothek, wenn diese Vermutung korrekt ist. Kristian -- Kristian K�hntopp, NetUSE Kommunikationstechnologie GmbH Siemenswall, D-24107 Kiel, Germany, +49 431 386 436 00 Using PHP3? See our web development library at http://phplib.shonline.de/ (GPL)
php::bar PHP Wiki - Listenarchive