Pomoc - Szukaj - Użytkownicy - Kalendarz
Pełna wersja: [php][mysql] Fatal Error
Forum PHP.pl > Forum > Przedszkole
Zloty
Witam, mam pewien problem. Dostałem za zadanie administrowanie stroną [dodawanie newsów itp. itd. takie tam pierdoły]. Problem w tym, iż przy uruchomieniu strony wyskakuje mi błąd:

Cytat
Fatal error: mysql error: [1030: Otrzymano b�?d 127 z obs�ugi tabeli] in EXECUTE("SELECT * FROM activ_misiek_docs WHERE parent = '2' AND (ready='Y' or ready='A') ORDER BY Priority DESC") in [...]/classes/adodb/adodb-errorhandler.inc.php on line 77


Natomiast gdy chcę przyjrzeć panelowi administracyjnemu wyskakuje mi następujący błąd:

Cytat
Fatal error: mysql error: [1030: Otrzymano b�?d 127 z obs�ugi tabeli] in EXECUTE("SELECT * FROM activ_misiek_docs WHERE parent = '1' ORDER BY Priority DESC") in [...]/classes/adodb/adodb-errorhandler.inc.php on line 77


Nie mam pojęcia na jakiej zasadzie owa strona wcześniej funkcjonowała, jednak może ktoś z was już wcześniej się spotkał z podobnymi błędami i mógłby mi powiedzieć w czym przyczyna.
Z góry dzięki.
starr
questionmark.gif najlepiej otworzyć skrypt powodujący błąd i zobaczyć co tam się dzieje w linii 77 ? Podejrzewam że nie masz prawa dostępu do strony, albo wpisujesz błedne dane ?

Sprawdź, czy masz połączenie z MySQL, a potem porównaj definicje tabeli z poleceniem sql.

Może poprzedni administrator miał jakiś specjalny sposób dostępu ?

---------------------------------------------
starr - www.aleproste.pl
Zloty
Właśnie chodzi o to, że loguję się jako poprzedni admin. Wkleję tutaj kod źródłowy owego pliku.

  1. <?php
  2. /**
  3.  * @version V4.66 28 Sept 2005 (c) 2000-2005 John Lim (jlim@natsoft.com.my). All rights reserved.
  4.  * Released under both BSD license and Lesser GPL library license.
  5.  * Whenever there is any discrepancy between the two licenses,
  6.  * the BSD license will take precedence.
  7.  *
  8.  * Set tabs to 4 for best viewing.
  9.  *
  10.  * Latest version is available at <a href=\"http://php.weblogs.com\" target=\"_blank\">http://php.weblogs.com</a>
  11.  *
  12. */
  13.  
  14.  
  15. // added Claudio Bustos clbustos#entelchile.net
  16. if (!defined('ADODB_ERROR_HANDLER_TYPE')) define('ADODB_ERROR_HANDLER_TYPE',E_USER_ERROR); 
  17.  
  18. if (!defined('ADODB_ERROR_HANDLER')) define('ADODB_ERROR_HANDLER','ADODB_Error_Handler');
  19.  
  20. /**
  21. * Default Error Handler. This will be called with the following params
  22. *
  23. * @param $dbms the RDBMS you are connecting to
  24. * @param $fn the name of the calling function (in uppercase)
  25. * @param $errno the native error number from the database
  26. * @param $errmsg the native error msg from the database
  27. * @param $p1 $fn specific parameter - see below
  28. * @param $p2 $fn specific parameter - see below
  29. * @param $thisConn $current connection object - can be false if no connection object created
  30. */
  31. function ADODB_Error_Handler($dbms, $fn, $errno, $errmsg, $p1, $p2, &$thisConnection)
  32. {
  33. if (error_reporting() == 0) return; // obey @ protocol
  34. switch($fn) {
  35. case 'EXECUTE':
  36. $sql = $p1;
  37. $inputparams = $p2;
  38.  
  39. $s = "$dbms error: [$errno: $errmsg] in $fn(\"$sql\")\n";
  40. break;
  41.  
  42. case 'PCONNECT':
  43. case 'CONNECT':
  44. $host = $p1;
  45. $database = $p2;
  46.  
  47. $s = "$dbms error: [$errno: $errmsg] in $fn($host, '****', '****', $database)\n";
  48. break;
  49. default:
  50. $s = "$dbms error: [$errno: $errmsg] in $fn($p1, $p2)\n";
  51. break;
  52. }
  53. /*
  54. * Log connection error somewhere
  55. * 0 message is sent to PHP's system logger, using the Operating System's system
  56. * logging mechanism or a file, depending on what the error_log configuration
  57. * directive is set to.
  58. * 1 message is sent by email to the address in the destination parameter.
  59. * This is the only message type where the fourth parameter, extra_headers is used.
  60. * This message type uses the same internal function as mail() does.
  61. * 2 message is sent through the PHP debugging connection.
  62. * This option is only available if remote debugging has been enabled.
  63. * In this case, the destination parameter specifies the host name or IP address
  64. * and optionally, port number, of the socket receiving the debug information.
  65. * 3 message is appended to the file destination
  66. */
  67. if (defined('ADODB_ERROR_LOG_TYPE')) {
  68. $t = date('Y-m-d H:i:s');
  69. if (defined('ADODB_ERROR_LOG_DEST'))
  70. error_log("($t) $s", ADODB_ERROR_LOG_TYPE, ADODB_ERROR_LOG_DEST);
  71. else
  72. error_log("($t) $s", ADODB_ERROR_LOG_TYPE);
  73. }
  74.  
  75.  
  76. //print "<p>$s</p>";
  77. trigger_error($s,ADODB_ERROR_HANDLER_TYPE);  <----To jest 77 linijka
  78. }
  79. ?>
drPayton
To nie jest skrypt powodujący błąd, ale funkcja obsługi błędów, jak widać kiepska, skoro nie pokazuje rzeczywistego miejsca błędu.
Błąd 127 oznacza "Record-file is crashed". A więc tabela wymaga naprawy. TU masz jak to zrobić.
To jest wersja lo-fi głównej zawartości. Aby zobaczyć pełną wersję z większą zawartością, obrazkami i formatowaniem proszę kliknij tutaj.
Invision Power Board © 2001-2025 Invision Power Services, Inc.