[PHP] GDlib error? - Afbeelding kan niet worden getoond

Pagina: 1
Acties:
  • 61 views sinds 30-01-2008

  • r0bert
  • Registratie: September 2001
  • Laatst online: 26-04 17:38
Ik heb sinds vandaag mijn website naar een andere server verplaatst, en nu krijg ik in een van mijn phpscriptjes (wat aan de hand van een font een png-image maakt), de volgende error:
De afbeelding “scriptje.php?tekst=blaat” kan niet vertoond worden, omdat ze fouten bevat.
Ik dacht dat het er misschien mee te maken had, dat deze server een andere versie van php zou kunnen draaien? Google en GoTsearch konden mij niet verder helpen :(

scriptje is zoiets:
code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
    $i_width  = 244;
    $i_height = 20;
    
    $fontfile = "./fonts/MonotypeCorsiva.ttf";
    $string = $_GET['tekst'];
    $im = imagecreate($i_width, $i_height);
    $white = imagecolorallocate($im, 224,0,0);
    $black = imagecolorallocate($im, 255,255,255);
    
    $string_size = ImageFtBbox(18, 0, $fontfile, $string, array("linespacing" => 1));
    $s_width  = $string_size[4];
    $s_height = $string_size[5];
    
    ImageFtText($im, 17, 0, $i_width - $s_width,  1 - $s_height, $black, $fontfile, $_GET['tekst'], array("linespacing" => 1));
    
    imageline($im, 0, 19, $i_width, 19, $black);
    
    ImagePng ($im, $sImgLoc);
    ImageDestroy ($im);


PhpInfo van mijn hosting..

  • r0bert
  • Registratie: September 2001
  • Laatst online: 26-04 17:38
Dit topic kan wel op slot.. Heb alles opnieuw geupload en nu werkt het. Waarschijnlijk was de fontfile niet volledig geupload o.i.d. Sorryyyy...

  • BtM909
  • Registratie: Juni 2000
  • Niet online

BtM909

Watch out Guys...

Topics hoeven niet perse op slot als het probleem is opgelost.

Dat weet je toch :?

edit:

Tenzij je natuurlijk niet wilt dat de rest van [PW] ziet wat voor domme fout je hebt gemaakt :+

[ Voor 37% gewijzigd door BtM909 op 20-01-2005 12:02 ]

Ace of Base vs Charli XCX - All That She Boom Claps (RMT) | Clean Bandit vs Galantis - I'd Rather Be You (RMT)
You've moved up on my notch-list. You have 1 notch
I have a black belt in Kung Flu.


  • curry684
  • Registratie: Juni 2000
  • Laatst online: 12-05 22:23

curry684

left part of the evil twins

Not a bug :)

BtM909: als er geen sprake is van een probleem zie ik het nut ook niet echt van open laten staan :)

Professionele website nodig?


Dit topic is gesloten.