PDA

Archiv verlassen und diese Seite im Standarddesign anzeigen : gd


Andsch
26.08.2006, 16:40:42
Hi,ich bekomme mit diesem Script:

<?php

// Header (MIME-Typ)
header('Content-type: image/png');

// Image-Objekt erzeugen
$bild = imagecreate(200, 200); //line 7

// Farbwerte festlegen
$hintergrund = imagecolorallocate($bild, 0xFF, 0xFF, 0xFF);
$farbeGrau = imagecolorallocate($bild, 0xC0, 0xC0, 0xC0);
$farbeDunkelGrau = imagecolorallocate($bild, 0x90, 0x90, 0x90);
$farbeBlau = imagecolorallocate($bild, 0x00, 0x00, 0x80);
$farbeDunkelBlau = imagecolorallocate($bild, 0x00, 0x00, 0x50);
$farbeRot = imagecolorallocate($bild, 0xFF, 0x00, 0x00);
$farbeDunkelRot = imagecolorallocate($bild, 0x90, 0x00, 0x00);

// 3D Effekt simulieren
for ($i = 60; $i > 50; $i--) {
imagefilledarc($bild, 50, $i, 100, 50, 0, 55, $farbeDunkelBlau, IMG_ARC_PIE);
imagefilledarc($bild, 50, $i, 100, 50, 55, 135 , $farbeDunkelGrau, IMG_ARC_PIE);
imagefilledarc($bild, 50, $i, 100, 50, 135, 360 , $farbeDunkelRot, IMG_ARC_PIE);
}

// Eigentliches Diagramm
imagefilledarc($bild, 50, 50, 100, 50, 0, 55, $farbeBlau, IMG_ARC_PIE);
imagefilledarc($bild, 50, 50, 100, 50, 55, 135 , $farbeGrau, IMG_ARC_PIE);
imagefilledarc($bild, 50, 50, 100, 50, 135, 360 , $farbeRot, IMG_ARC_PIE);


// Diagramm ausgeben und Grafik
// aus dem Speicher entfernen
imagepng($bild);
imagedestroy($bild);
?>
folgenden Fehlercode:
Fatal error: Call to undefined function imagecreate() in d:\wamp\www\diagramm.php</b> on line7<br />

xabbuh
26.08.2006, 22:01:58
Hast du die GD-Bibliothek installiert?

Andsch
27.08.2006, 17:24:23
Ja,arbeite mit WAMP.Habe trotzdem den Installationspfad verfolgt. Alles da wo es hingehört :-)

xabbuh
27.08.2006, 18:10:22
Dann zeige bitte mal die Ausgaben von phpinfo() und gd_info().

Andsch
02.09.2006, 11:37:18
oooooops
<?php
gd2_info();
?>
das mit der gd_info() war wohl nix Fehlercode:
Fatal error: Call to undefined function gd2_info() in d:\wamp\www\gd.php on line 3
Es steht geschrieben,verschiebe Datei php_gd2_dll aus PHP Disti. Extensionsverzeichnis.
In das durch extensions_dir angegebene Verzeichnis in meiner php.in und entferne Semikolon
vor extensions-Eintrag:
1) o.K. extension=php_gd2.dll (erledigt)
2) Pfad in Paths and Directories: extension_dir = "D:/wamp/php/ext/"
Der Pfad zeigt auf die dll Datei wo sich dank Wamp, die Datei schon befindet.
und nun :-(

xabbuh
02.09.2006, 20:39:13
Richtige php.ini bearbeitet?

meikel (†)
02.09.2006, 22:14:57
und nun :-(
Webserver neu gestartet?

Andsch
03.09.2006, 11:36:42
Na ja gut,
Webserver neu gestartet?
das Problem hat sich mit dem Neustart erledigt