WCM Forum

WCM Forum (http://www.wcm.at/forum/index.php)
-   Software (http://www.wcm.at/forum/forumdisplay.php?f=5)
-   -   Die Erweiterung "mysql" kann nicht geladen werden. (http://www.wcm.at/forum/showthread.php?t=145049)

Flink 17.09.2004 20:15

Die Erweiterung "mysql" kann nicht geladen werden.
 
Ich habe soeben PHP5, MySQL und phpMyAdmin unter Windows 2000 installiert (überall die letzte Version). Doch beim Aufruf von phpMyAdmin im Apache localhost-URL erhalte ich die Fehlermeldung:

Zitat:

Die Erweiterung "mysql" kann nicht geladen werden.
Bitte überprüfen Sie Ihre PHP-Konfiguration.
Dokumentation
Ich habe auch explizit die MySQL ODBC installiert. Ohne Erfolg.
Ein Einschalten einer "extension=php_mysql.dll" ergibt eine Fehlermeldung beim Starten des Apache 2.

Muss ich in php.ini etwas ausfüllen?

Code:

[SQL]
sql.safe_mode = Off

[ODBC]
;odbc.default_db    =  Not yet implemented
;odbc.default_user  =  Not yet implemented
;odbc.default_pw    =  Not yet implemented

; Allow or prevent persistent links.
odbc.allow_persistent = On

; Check that a connection is still valid before reuse.
odbc.check_persistent = On

; Maximum number of persistent links.  -1 means no limit.
odbc.max_persistent = -1

; Maximum number of links (persistent + non-persistent).  -1 means no limit.
odbc.max_links = -1

; Handling of LONG fields.  Returns number of bytes to variables.  0 means
; passthru.
odbc.defaultlrl = 4096

; Handling of binary data.  0 means passthru, 1 return as is, 2 convert to char.
; See the documentation on odbc_binmode and odbc_longreadlen for an explanation
; of uodbc.defaultlrl and uodbc.defaultbinmode
odbc.defaultbinmode = 1

[MySQL]
; Allow or prevent persistent links.
mysql.allow_persistent = On

; Maximum number of persistent links.  -1 means no limit.
mysql.max_persistent = -1

; Maximum number of links (persistent + non-persistent).  -1 means no limit.
mysql.max_links = -1

; Default port number for mysql_connect().  If unset, mysql_connect() will use
; the $MYSQL_TCP_PORT or the mysql-tcp entry in /etc/services or the
; compile-time value defined MYSQL_PORT (in that order).  Win32 will only look
; at MYSQL_PORT.
mysql.default_port =

; Default socket name for local MySQL connects.  If empty, uses the built-in
; MySQL defaults.
mysql.default_socket =

; Default host for mysql_connect() (doesn't apply in safe mode).
mysql.default_host =

; Default user for mysql_connect() (doesn't apply in safe mode).
mysql.default_user =

; Default password for mysql_connect() (doesn't apply in safe mode).
; Note that this is generally a *bad* idea to store passwords in this file.
; *Any* user with PHP access can run 'echo get_cfg_var("mysql.default_password")
; and reveal this password!  And of course, any users with read access to this
; file will be able to reveal the password as well.
mysql.default_password =

; Maximum time (in secondes) for connect timeout. -1 means no limimt
mysql.connect_timeout = 60

; Trace mode. When trace_mode is active (=On), warnings for table/index scans and
; SQL-Errors will be displayed.
mysql.trace_mode = Off


T.dot 17.09.2004 21:36

Hi!

funktioniert nur phpmyadmin nicht oder hast du dort angefangen zu testen?

ansonsten test mal ob ne einfache php Seite angezeigt wird, schau ob die Prozesse für Apache, mysql rennen, ...

für phpmyadmin musst du in config.inc.php im phpmyadmin verzeichnis meist einige einstellungen zur serverkonfiguration/Datenbankzugriffsrechte (pwd, user, ...) treffen, sonst tut sich da nix...

falls du dich ein wenig mit php auskennst kannst ja auch mal versuchen einfach mal auf den SQL Server zugreifen (mittels mysql_connect), brauchst glaub ich nichtmal ne datenbank drauf damits funkt...

info zu php und co:
http://www.selfphp.info/

mfg Thomas

Flink 17.09.2004 23:05

Zitat:

Original geschrieben von T.dot
funktioniert nur phpmyadmin nicht oder hast du dort angefangen zu testen?

Auch bei der Typo3-Installation erhalte ich die Fehlermeldung, dass PHP nicht auf MySQL zugreifen könne

Zitat:

ansonsten test mal ob ne einfache php Seite angezeigt wird, schau ob die Prozesse für Apache, mysql rennen, ...
Die PHP-Testseite läuft, ebenso das Typo3-Installationsskript. Apache-Dienst und MySQL-Dienst sind gestartet. MySQLAdmin läuft auch.

Zitat:

für phpmyadmin musst du in config.inc.php im phpmyadmin verzeichnis meist einige einstellungen zur serverkonfiguration/Datenbankzugriffsrechte (pwd, user, ...) treffen, sonst tut sich da nix...
Hier habe ich etwas eingetragen:
Code:

$cfg['Servers'][$i]['host']          = '192.168.69.2'; // MySQL hostname or IP address
$cfg['Servers'][$i]['port']          = '';  // MySQL port - leave blank for default port
$cfg['Servers'][$i]['socket']        = '';  // Path to the socket - leave blank for default socket
$cfg['Servers'][$i]['connect_type']  = 'tcp'; // How to connect to MySQL server ('tcp' or 'socket')
$cfg['Servers'][$i]['extension']    = 'mysql'; // The php MySQL extension to use ('mysql' or 'mysqli')

$cfg['Servers'][$i]['auth_type']    = 'config';    // Authentication method (config, http or cookie based)?
$cfg['Servers'][$i]['user']          = 'root';      // MySQL user
$cfg['Servers'][$i]['password']      = '';          // MySQL password (only needed with 'config' auth_type)

Es sollte mit 'root' ohne Passwort ein Zugang möglich sein. Aber irgendwie muss ich mit my.ini einen Benutzer anlegen können.

Code:

falls du dich ein wenig mit php auskennst kannst ja auch mal versuchen einfach mal auf den SQL Server zugreifen (mittels mysql_connect), brauchst glaub ich nichtmal ne datenbank drauf damits funkt...
Das dürfte scheitern, weil ich beim Typo3-Skript die Fehlermeldung erhalte.
Zitat:

Check database:
MySQL not available
PHP does not feature MySQL support (which is pretty unusual).
phpinfo:
Code:

HTTP_HOST          : localhost
TYPO3_HOST_ONLY    : localhost
TYPO3_PORT          :
PATH_INFO          :
QUERY_STRING        : TYPO3_INSTALL[type]=phpinfo
TYPO3_REQUEST_URL  : http://localhost/dummy-3.7/typo3/ins...?TYPO3_INSTALL[type]=phpinfo
TYPO3_REQUEST_SCRIPT: http://localhost/dummy-3.7/typo3/install/index.php
TYPO3_REQUEST_DIR  : http://localhost/dummy-3.7/typo3/install/
TYPO3_SITE_URL      : http://localhost/dummy-3.7/
SCRIPT_NAME        : /dummy-3.7/typo3/install/index.php
TYPO3_DOCUMENT_ROOT : D:/Programme/Apache Group/Apache2/htdocs
SCRIPT_FILENAME    : D:/Programme/Apache Group/Apache2/htdocs/dummy-3.7/typo3/install/index.php
REMOTE_ADDR        : 127.0.0.1
REMOTE_HOST        :
HTTP_USER_AGENT    : Mozilla/5.0 (Windows; U; Windows NT 5.0; de-AT; rv:1.7.2) Gecko/20040803
HTTP_ACCEPT_LANGUAGE: de,en;q=0.5
CONST: PHP_OS      : WINNT
CONST: TYPO3_OS    : WIN
CONST: PATH_thisScri: D:/Programme/Apache Group/Apache2/htdocs/dummy-3.7/typo3/install/index.php
CONST: php_sapi_name: apache2handler
OTHER: TYPO3_VERSION: 3.7.0RC1
OTHER: PHP_VERSION  : 5.0.1

PATH  C:\WINNT\system32;C:\WINNT;C:\WINNT\System32\Wbem;D:\Programme\mysql-4.1.4-gamma-win\bin;D:\Programme\PHP;C:\Programme\Gemeinsame Dateien\Ulead Systems\MPEG


Flink 17.09.2004 23:33

mysql_connect.php
 
Das folgende Skript gibt den Text "ABC" aus. Nicht mehr. (Ob die Ausgabe bei 'die' hier kommen müsste?)

Code:

<?PHP
/*
  Allgemeine Daten fuer die Datenbankanbindung
  und direkter Connect zur Datenbank. Nach
  Einbindung dieses Segments kann direkt mit
  MySQL-Befehlen auf die Datenbank zugegriffen
  werden.
*/

/* Datenbankserver - In der Regel die IP */
  $db_server = "localhost";

/* Datenbankname */
  $db_name = "mysql";

/* Datenbankuser */
  $db_user = "root";

/* Datenbankpasswort */
  $db_passwort = "";

echo "ABC";
/* Erstellt Connect zu Datenbank her */
$db = @MYSQL_CONNECT($db_server,$db_user,$db_passwort) or
                die ("Konnte keine Verbindung zur Datenbank herstellen");

echo "DEF";
$db_check = @MYSQL_SELECT_DB($db_name);
if($db)
  echo "Verbindung zur Datenbank wurde hergestellt";
else
  echo "Beim Verbinden zur Datenbank '" . $db_name . "' ist ein Fehler aufgetreten";
?>


_m3 19.09.2004 21:49

Re: Die Erweiterung "mysql" kann nicht geladen werden.
 
Zitat:

Original geschrieben von Flink
Ein Einschalten einer "extension=php_mysql.dll" ergibt eine Fehlermeldung beim Starten des Apache 2.
Die Fehlermeldung waere wie immer hilfreich! :ms:


Alle Zeitangaben in WEZ +2. Es ist jetzt 08:43 Uhr.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
© 2009 FSL Verlag