Ghostridah Geschrieben 19. August 2009 Geschrieben 19. August 2009 Hallo allerseits, ich betreibe auf meinem vServer (Win 2003 x64 Standard SP2) einen Apache 2.2.11 Webserver mit der PHP Version 5.2.10 und einen Mysql Server Version 5.1.37. Alles funktioniert wunderbar, bis auf PHP Scripte die eine Datenbankverbindung aufbauen. Wenn man einen solchen Script aufruft kommt die Fehlermeldung "Fehler: Verbindung unterbrochen". Dem Apache error-logfile kann man entnehmen das der Server jedes mal bei dem Aufruf des Scriptes neugestartet wird. Der Accesslog bleibt leer. Der Mysql-Connector ist in der php.ini eingetragen: [php_MYSQL] extension=php_mysql.dll Der MySQL server läuft ohne Probleme, per Konsole kommt man drauf. Die php_mysql.dll liegt im PHP/ext Verzeichnis und im Windows Systemverzeichnis und wird auch geladen (sonst würde er ja eine Fehlermeldung bringen). Version ist die zur PHP und MySQL passende. Systemvariablen sind korrekt gesetzt. Im HOSTNAME.err file im mysql/data Verzeichnis ist nichts relevantes zu finden.. Hat irgendjemand eine Ahnung wo das Problem liegen könnte? Vielen Dank schon einmal im voraus! Zitieren
flashpixx Geschrieben 19. August 2009 Geschrieben 19. August 2009 Dem Apache error-logfile kann man entnehmen das der Server jedes mal bei dem Aufruf des Scriptes neugestartet wird. Und was steht da ggf noch außerdem? Was sagen ggf die Warnings bzw Erros von PHP. Notfalls das Log Level einmal hoch drehen Zitieren
Ghostridah Geschrieben 19. August 2009 Autor Geschrieben 19. August 2009 (bearbeitet) httpd.exe: Could not reliably determine the server's fully qualified domain name, using xx.xx.xxx.xxx for ServerName [Wed Aug 19 19:23:52 2009] [notice] Apache/2.2.11 (Win32) PHP/5.2.10 configured -- resuming normal operations [Wed Aug 19 19:23:52 2009] [notice] Server built: Dec 10 2008 00:10:06 [Wed Aug 19 19:23:52 2009] [notice] Parent: Created child process 47792 httpd.exe: Could not reliably determine the server's fully qualified domain name, using xx.xx.xxx.xxx for ServerName httpd.exe: Could not reliably determine the server's fully qualified domain name, using xx.xx.xxx.xxx for ServerName [Wed Aug 19 19:23:53 2009] [notice] Child 47792: Child process is running [Wed Aug 19 19:23:53 2009] [notice] Child 47792: Acquired the start mutex. [Wed Aug 19 19:23:53 2009] [notice] Child 47792: Starting 64 worker threads. [Wed Aug 19 19:23:53 2009] [notice] Child 47792: Starting thread to listen on port 80. [Wed Aug 19 19:24:33 2009] [notice] Parent: child process exited with status 3221225477 -- Restarting. httpd.exe: Could not reliably determine the server's fully qualified domain name, using xx.xx.xxx.xxx for ServerName [Wed Aug 19 19:24:33 2009] [notice] Apache/2.2.11 (Win32) PHP/5.2.10 configured -- resuming normal operations [Wed Aug 19 19:24:33 2009] [notice] Server built: Dec 10 2008 00:10:06 [Wed Aug 19 19:24:33 2009] [notice] Parent: Created child process 33512 httpd.exe: Could not reliably determine the server's fully qualified domain name, using xx.xx.xxx.xxx for ServerName httpd.exe: Could not reliably determine the server's fully qualified domain name, using xx.xx.xxx.xxx for ServerName [Wed Aug 19 19:24:34 2009] [notice] Child 33512: Child process is running [Wed Aug 19 19:24:34 2009] [notice] Child 33512: Acquired the start mutex. [Wed Aug 19 19:24:34 2009] [notice] Child 33512: Starting 64 worker threads. [Wed Aug 19 19:24:34 2009] [notice] Child 33512: Starting thread to listen on port 80. Ich habe jetzt loglevel auf debug gesetzt. Vorher stand es auf warning Neues logfile: [Wed Aug 19 22:34:08 2009] [notice] Parent: child process exited with status 3221225477 -- Restarting. httpd.exe: Could not reliably determine the server's fully qualified domain name, using xx.xx.xxx.xxx for ServerName [Wed Aug 19 22:34:09 2009] [notice] Apache/2.2.11 (Win32) PHP/5.2.10 configured -- resuming normal operations [Wed Aug 19 22:34:09 2009] [notice] Server built: Dec 10 2008 00:10:06 [Wed Aug 19 22:34:09 2009] [notice] Parent: Created child process 2712 [Wed Aug 19 22:34:09 2009] [debug] mpm_winnt.c(487): Parent: Sent the scoreboard to the child httpd.exe: Could not reliably determine the server's fully qualified domain name, using xx.xx.xxx.xxx for ServerName httpd.exe: Could not reliably determine the server's fully qualified domain name, using xx.xx.xxx.xxx for ServerName [Wed Aug 19 22:34:09 2009] [notice] Child 2712: Child process is running [Wed Aug 19 22:34:09 2009] [info] Parent: Duplicating socket 296 and sending it to child process 2712 [Wed Aug 19 22:34:09 2009] [debug] mpm_winnt.c(408): Child 2712: Retrieved our scoreboard from the parent. [Wed Aug 19 22:34:09 2009] [debug] mpm_winnt.c(605): Parent: Sent 1 listeners to child 2712 [Wed Aug 19 22:34:09 2009] [debug] mpm_winnt.c(564): Child 2712: retrieved 1 listeners from parent [Wed Aug 19 22:34:09 2009] [notice] Child 2712: Acquired the start mutex. [Wed Aug 19 22:34:09 2009] [notice] Child 2712: Starting 64 worker threads. [Wed Aug 19 22:34:09 2009] [notice] Child 2712: Starting thread to listen on port 80. zend_mm_heap corrupted [Wed Aug 19 22:37:07 2009] [notice] Parent: child process exited with status 1 -- Restarting. httpd.exe: Could not reliably determine the server's fully qualified domain name, using xx.xx.xxx.xxx for ServerName [Wed Aug 19 22:37:07 2009] [notice] Apache/2.2.11 (Win32) PHP/5.2.10 configured -- resuming normal operations [Wed Aug 19 22:37:07 2009] [notice] Server built: Dec 10 2008 00:10:06 [Wed Aug 19 22:37:07 2009] [notice] Parent: Created child process 18072 [Wed Aug 19 22:37:07 2009] [debug] mpm_winnt.c(487): Parent: Sent the scoreboard to the child httpd.exe: Could not reliably determine the server's fully qualified domain name, using xx.xx.xxx.xxx for ServerName httpd.exe: Could not reliably determine the server's fully qualified domain name, using xx.xx.xxx.xxx for ServerName [Wed Aug 19 22:37:08 2009] [notice] Child 18072: Child process is running [Wed Aug 19 22:37:08 2009] [info] Parent: Duplicating socket 296 and sending it to child process 18072 [Wed Aug 19 22:37:08 2009] [debug] mpm_winnt.c(408): Child 18072: Retrieved our scoreboard from the parent. [Wed Aug 19 22:37:08 2009] [debug] mpm_winnt.c(605): Parent: Sent 1 listeners to child 18072 [Wed Aug 19 22:37:08 2009] [debug] mpm_winnt.c(564): Child 18072: retrieved 1 listeners from parent [Wed Aug 19 22:37:08 2009] [notice] Child 18072: Acquired the start mutex. Bearbeitet 19. August 2009 von Ghostridah ip adresse ersetzt Zitieren
flashpixx Geschrieben 19. August 2009 Geschrieben 19. August 2009 Was sagt das Log des Datenbankservers? Vergleiche einmal das Log wenn Du aus der Konsole ausführst und einmal per Webserver. Du solltest auch einmal einen passenden Domainnamen in der Config vergeben Zitieren
Ghostridah Geschrieben 20. August 2009 Autor Geschrieben 20. August 2009 Der Log des Datenbankservers ist seit dem letzten (Neu)Start leer: 090814 11:23:31 [Note] Plugin 'FEDERATED' is disabled. 090814 11:23:34 InnoDB: Started; log sequence number 0 44233 090814 11:23:36 [Note] Event Scheduler: Loaded 0 events 090814 11:23:36 [Note] MySQL: ready for connections. Version: '5.1.37-community-log' socket: '' port: 3306 MySQL Community Server (GPL) Zitieren
flashpixx Geschrieben 20. August 2009 Geschrieben 20. August 2009 Du müsstest doch eigentlich schon selbst erkennen, dass man da kaum helfen kann. Denn es fehlen irgendwelche Punkt an denen man ansetzen kann. Du solltest das Logging soweit bekommen, dass er Dir jedes Detail anzeigt. Zitieren
Carnie Geschrieben 20. August 2009 Geschrieben 20. August 2009 Ok 2 Ansätze die du noch verfolgen kannst. Schau mal in deine phpinfo ob das was spannendes steht. Der zweite wäre : <?php $link = mysql_connect('localhost', 'mysql_user', 'mysql_password'); if (!$link) { die('Could not connect: ' . mysql_error()); } echo 'Connected successfully'; mysql_close($link); ?> Was passiert wenn du dieses PHP Skript auf der Konsole ausführst. Dann wäre der Webserver erstmal raus aus der Sache als Fehlerursache. Zitieren
Ghostridah Geschrieben 20. August 2009 Autor Geschrieben 20. August 2009 @flashpixx ja.... Aber die Hoffnung stirbt zuletzt. Vielleicht hätte es ja jemand hier gegeben der das Problem auch mal hatte und irgendwie gelöst hat. Google gibt zu viel Müll aus zu dem Thema.. @Carnie: phpinfo sagt: mysql MySQL Support enabled Active Persistent Links 0 Active Links 0 Client API version 5.1.37 Directive Local Value Master Value mysql.allow_persistent On On mysql.connect_timeout 20 20 mysql.default_host no value no value mysql.default_password no value no value mysql.default_port 3306 3306 mysql.default_socket no value no value mysql.default_user no value no value mysql.max_links Unlimited Unlimited mysql.max_persistent Unlimited Unlimited mysql.trace_mode Off Off mysqli MysqlI Support enabled Client API library version 5.1.37 Client API header version 5.0.51a MYSQLI_SOCKET /tmp/mysql.sock Directive Local Value Master Value mysqli.default_host no value no value mysqli.default_port 3306 3306 mysqli.default_pw no value no value mysqli.default_socket no value no value mysqli.default_user no value no value mysqli.max_links Unlimited Unlimited mysqli.reconnect Off Off Bis auf die Abweichung der Client API Header/library bei MySQLi mMn nichts auffälliges aber ich benutze mysqli eigentlich auch gar nicht. Das Script führ ich gleich mal auf der Konsole aus. Danke für den Code! Zitieren
Carnie Geschrieben 20. August 2009 Geschrieben 20. August 2009 Ok als das sieht schonmal soweit ok aus. Naja nichts zu danken für den Code...stammt von der php Seite . Zitieren
Ghostridah Geschrieben 20. August 2009 Autor Geschrieben 20. August 2009 Wenn ich den code in eine Datie packe (test.php) und diese per Kommandozeile: php test.php ausführe passiert nichts. Weder Serverlogfile noch im Mysql ändert sich was... Zitieren
lupo49 Geschrieben 20. August 2009 Geschrieben 20. August 2009 Schreib mal error_reporting(E_ALL); in die zweite Zeile des Codes. (Gibt an, welche PHP-Fehlermeldungen angezeigt werden) Zitieren
Ghostridah Geschrieben 21. August 2009 Autor Geschrieben 21. August 2009 Danke für eure Tipps. Nachdem ich das ganze jetzt nochmal mit lupo's Zusatz in der zweiten Zeile ausgeführt habe und immernoch nichts kam habe ich folgendes Probiert: <?php echo 'Stelle 1'; error_reporting(E_ALL); echo 'Stelle 2'; $link = mysql_connect('localhost', 'USR', 'PWD'); echo 'Stelle 3'; if (!$link) { echo 'Keine DB Verbindung'; die('Could not connect: ' . mysql_error()); } echo 'Connected successfully'; mysql_close($link); echo 'Ende'; ?> Raus kam: C:\>php test.php Stelle 1Stelle 2 Er bricht das Script also beim Aufbau der Verbindung ohne jegliche Warnungen/Fehlermeldungen ab... Sollte ich es vielleicht mal mit PHP 5.3 versuchen? Zitieren
Empfohlene Beiträge
Dein Kommentar
Du kannst jetzt schreiben und Dich später registrieren. Wenn Du ein Konto hast, melde Dich jetzt an, um unter Deinem Benutzernamen zu schreiben.