PDA

Archiv verlassen und diese Seite im Standarddesign anzeigen : PHP funktioniert nicht mit MySQL



samy-delux
23.12.04, 02:07
Hallo,

Ich hab PHP 5.0.2 und MySQL 4.0.20 . Ich hab für php auch php5-mysql installiert. Alles per urpmi.
Aber wenn ich ne Seite mit nem mysql_connect() über nen Browser aufrufe gibt er mir ne ganz leere Seite ohne den geringsten Quelltext.
phpinfo() Zeigt auch mysql als Modul mit der richtigen Version von MySQL an!

Per mysqladmin udn MySQL Control Center kann ich auch wunderbar auf die DBs zugreifen. Was mach ich falsch.

Tomek
23.12.04, 08:35
Aktiviere das ErrorLogging und -Reporting in der php.ini und schaue ins Apache-ErrorLog. Und zwar so:

error_reporting = E_ALL

; Print out errors (as a part of the output). For production web sites,
; you're strongly encouraged to turn this feature off, and use error logging
; instead (see below). Keeping display_errors enabled on a production web site
; may reveal security information to end users, such as file paths on your Web
; server, your database schema or other information.
display_errors = Off

; Even when display_errors is on, errors that occur during PHP's startup
; sequence are not displayed. It's strongly recommended to keep
; display_startup_errors off, except for when debugging.
display_startup_errors = Off

; Log errors into a log file (server-specific log, stderr, or error_log (below))
; As stated above, you're strongly advised to use error logging in place of
; error displaying on production web sites.
log_errors = On

samy-delux
23.12.04, 10:54
Ok gab ich gemacht, hab auch eingestellt das mir Errors beim parsen vom Code angezeigt werden.
Als Beispiel bi ich mal auf PHPmyAdmin gegangen und da schreibt er dass hier in die error_logs:
[Thu Dec 23 10:52:18 2004] [notice] child pid 5403 exit signal Segmentation fault (11)
[Thu Dec 23 10:52:18 2004] [notice] child pid 5437 exit signal Segmentation fault (11)
[Thu Dec 23 10:52:18 2004] [notice] child pid 5440 exit signal Segmentation fault (11)
[Thu Dec 23 10:52:19 2004] [notice] child pid 5462 exit signal Segmentation fault (11)
[Thu Dec 23 10:52:19 2004] [notice] child pid 5463 exit signal Segmentation fault (11)