Hallo Leute,
Ich habe einen schönen Archlinux-Server (0.8) aufgesetzt.
Läuft alles prima soweit. Habe Apache, mysql, php und phpmyadmin via pacman installiert.
Beim booten läuft auch alles prima durch ohne Fehler.
Wenn ich jetzt phpMyadmin im Konkerer aufrufe (
http://localhost/phpMyAdmin)
dann bekomme ich folgende Fehlermeldung
Fehler
MySQL meldet: Dokumentation
#2013 - Lost connection to MySQL server during query
Hm, ich schreibe eine kleine Testanwendung:
//LOKAL
$mysqlhost = "localhost";
$mysqlservice2 = "meinedatenbank";
$mysqluser = "mysqluser";
$mysqlpasswd = "mysqluser-password";
$mysql_id = mysql_connect($mysqlhost, $mysqluser, $mysqlpasswd) or die("<h1>Keine Verbindung zur DB</h1>");
mysql_select_db($mysqlservice2, $mysql_id);
und bekomme diese Fehlermeldung
Fatal error: Call to undefined function mysql_connect() in /home/httpd/html/test.php on line xxx
Hm,
ich rufe eine neue Datei mit phpinfo() auf und bekomme das:
Configure Command
'./configure'
'--with-apxs2' '--prefix=/usr' '--sysconfdir=/etc' --with-layout=PHP' '--with-ttf' '--enable-mailparse'
'--with-config-file-scan-dir=/etc' '--enable-bcmath=shared' '--enable-calendar=shared'
'--enable-ftp=shared' '--enable-gd-native-ttf' '--enable-magic-quotes'
'--enable-posix=shared' '--enable-session' '--enable-shared'
'--enable-shmop=shared' '--enable-pdo=shared' '--enable-sqlite-utf8'
'--enable-sockets=shared' '--enable-xml' '--enable-sysvsem=shared'
'--enable-sysvshm=shared' '--enable-sysvmsg=shared' '--enable-track-vars'
'--enable-trans-sid' '--enable-safe-mode' '--with-imap' '--with-imap-ssl'
'--with-ncurses' '--with-readline' '--with-bz2=shared' '--with-curl'
'--with-mime-magic' '--with-freetype-dir=/usr' '--with-gd=shared'
'--enable-exif' '--with-jpeg-dir=/usr' '--enable-dba' '--without-db2'
'--without-db3' '--with-inifile' '--with-flatfile' '--with-gdbm'
'--with-openssl' '--with-gettext' '--with-ldap=shared' '--with-mcrypt=shared,/usr'
'--with-unixODBC=shared,/usr' '--with-pdo-odbc=shared,unixODBC,/usr'
'--with-mysqli=shared'
'--with-mysql-sock=/tmp/mysql.sock'
'--with-pdo-mysql=shared,/usr'
'--with-mysql=shared,/usr'
'--with-pgsql=shared' '--with-pgsql-sock=/tmp/pgsql.sock'
'--with-pdo-pgsql=shared,/usr' '--with-sqlite=shared' '--with-pdo-sqlite=shared,/usr'
'--with-pear=/usr/share/pear' '--with-dom' '--with-dom-xslt' '--with-xsl'
'--with-png-dir=/usr' '--with-regex=php' '--with-zlib' '--enable-soap=shared'
'--enable-mbstring=all' '--enable-mbregex' '--with-snmp=shared,/usr'
Man sieht also, dass mysql eigenlich mit in php configuriert ist.
Wo ist da der Haken?
Danke für eure Ideen.