abdfahim Posted August 11, 2006 Share Posted August 11, 2006 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 Quote Link to comment Share on other sites More sharing options...
tomfmason Posted August 11, 2006 Share Posted August 11, 2006 What os are you using?[b]EDIT[/b] I guess that I should have read the post better..lol Sorry, Anyways, you need to enable the gd2.dll in your php.inihere is an example.[code];Windows Extensions;Note that ODBC support is built in, so no dll is needed for it.;extension=php_gd2.dll[/code]Hope this helps,Tom Quote Link to comment Share on other sites More sharing options...
abdfahim Posted August 11, 2006 Author Share Posted August 11, 2006 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.dllphpinfo() page does not show any information of GD. Quote Link to comment Share on other sites More sharing options...
tomfmason Posted August 11, 2006 Share Posted August 11, 2006 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. Quote Link to comment Share on other sites More sharing options...
Prismatic Posted August 11, 2006 Share Posted August 11, 2006 also, make sure to restart apache after making changes to the php.ini Quote Link to comment Share on other sites More sharing options...
tomfmason Posted August 11, 2006 Share Posted August 11, 2006 ^beat me to it..lol You can try this simple image code[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);?>[/code]You can create a link to this just like anyother image<img border="0" src="image.php" width="150" height="40"> Quote Link to comment Share on other sites More sharing options...
abdfahim Posted August 11, 2006 Author Share Posted August 11, 2006 Thanx u all guys .. at last I got it. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.