Jump to content


Photo

[SOLVED] How can I install GD library 2


  • Please log in to reply
6 replies to this topic

#1 abdfahim

abdfahim
  • Members
  • PipPipPip
  • Abd Fahim
  • 535 posts

Posted 11 August 2006 - 12:33 PM

I m new to this world. I installed PHP+mysql+Apache server (from internet tutorial). I got the ZIP file of GD library 2.0.33 downloaded. Now how can I install GD library? My php version is 5.0.4. Plz help me

#2 tomfmason

tomfmason
  • Staff Alumni
  • Advanced Member
  • 1,696 posts
  • Locationstealing your wifi

Posted 11 August 2006 - 12:45 PM

What os are you using?

EDIT I guess that I should have read the post better..lol 

Sorry,

      Anyways, you need to enable the gd2.dll in your php.ini

here is an example.

;Windows Extensions
;Note that ODBC support is built in, so no dll is needed for it.
;
extension=php_gd2.dll

Hope this helps,
Tom

Traveling East in search of instruction, and West to propagate the knowledge I have had gained.

current projects: pokersource

My Blog | My Pastebin | PHP Validation class | Backtrack linux


#3 abdfahim

abdfahim
  • Members
  • PipPipPip
  • Abd Fahim
  • 535 posts

Posted 11 August 2006 - 01:20 PM

I am sorry that I forgot to mention my OS. It is Windows XP. And I install Apache server (think i told it already). And the bad news is even after I uncomment the line like ..
extension=php_gd2.dll

phpinfo() page does not show any information of GD.

#4 tomfmason

tomfmason
  • Staff Alumni
  • Advanced Member
  • 1,696 posts
  • Locationstealing your wifi

Posted 11 August 2006 - 01:24 PM

look in your extension directory and see if you have the gd2.dll or you can use the search function from the start menu. If not then you may have to download it.

Traveling East in search of instruction, and West to propagate the knowledge I have had gained.

current projects: pokersource

My Blog | My Pastebin | PHP Validation class | Backtrack linux


#5 Prismatic

Prismatic
  • Members
  • PipPipPip
  • Advanced Member
  • 503 posts
  • LocationSan Diego

Posted 11 August 2006 - 01:34 PM

also, make sure to restart apache after making changes to the php.ini

#6 tomfmason

tomfmason
  • Staff Alumni
  • Advanced Member
  • 1,696 posts
  • Locationstealing your wifi

Posted 11 August 2006 - 01:41 PM

^beat me to it..lol  You can try this simple image code

<?php
$list = array("1","2","3","4","5","6","7","8","9","0");

for ($i = 1; $i <= 6; $i++) {
$generated_code .= $list[rand(0,9)];
}

$im = @imagecreate (65, 24)
or die ("Cannot create code - please try later");
$background_color = imagecolorallocate ($im, 70, 70, 70);
$text_color = imagecolorallocate ($im, 255, 255, 255);
imagestring ($im, 5, 5, 5, $generated_code, $text_color);
imagepng ($im);
imagedestroy($im);
?>

You can create a link to this just like anyother image
<img border="0" src="image.php" width="150" height="40">

Traveling East in search of instruction, and West to propagate the knowledge I have had gained.

current projects: pokersource

My Blog | My Pastebin | PHP Validation class | Backtrack linux


#7 abdfahim

abdfahim
  • Members
  • PipPipPip
  • Abd Fahim
  • 535 posts

Posted 11 August 2006 - 01:48 PM

Thanx u all guys .. at last I got it.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users