Jump to content


Photo

*SOLVED* GD is not working in Win Xp pro


  • Please log in to reply
8 replies to this topic

#1 purevision

purevision
  • New Members
  • Pip
  • Newbie
  • 4 posts

Posted 15 June 2006 - 01:27 PM

I have the following system:

Win Xp pro sp2
Apache 2.2.2
PHP 4.4.2

I have uncommented the extension=php_gd2.dll line, then changed extension_dir to extension_dir = "c:\php\extensions", copied the php_gd2.dll file to system32 and c:\php\extensions. But it didnt work. Then I tried to make a c:\php4 directory in c: and then copy the php_gd2.dll into it, but still no luck. What is wrong?

#2 wildteen88

wildteen88
  • Staff Alumni
  • Advanced Member
  • 10,482 posts
  • LocationUK, Bournemouth

Posted 15 June 2006 - 02:34 PM

Dont move any bloody files from the extension folder, its not needed!. If you have configured the extension_dir directive correctly in the php.ini, PHP should be able to access the extensions folder.

Once you have configured the extension_dir directive you need to uncomment the extension in the php.ini file in order for PHP to load that extension.

Now when you make any changes to the php.ini file you need to restart your server in order for the new PHP configuration settings to be loaded into memory.



#3 purevision

purevision
  • New Members
  • Pip
  • Newbie
  • 4 posts

Posted 15 June 2006 - 03:43 PM

[!--quoteo(post=384185:date=Jun 15 2006, 09:34 AM:name=wildteen88)--][div class=\'quotetop\']QUOTE(wildteen88 @ Jun 15 2006, 09:34 AM) View Post[/div][div class=\'quotemain\'][!--quotec--]
Dont move any bloody files from the extension folder, its not needed!. If you have configured the extension_dir directive correctly in the php.ini, PHP should be able to access the extensions folder.

Once you have configured the extension_dir directive you need to uncomment the extension in the php.ini file in order for PHP to load that extension.

Now when you make any changes to the php.ini file you need to restart your server in order for the new PHP configuration settings to be loaded into memory.
[/quote]

What you are telling me is allready tried.. please be more spesific...

- In my php.ini the extension_dir is set to: "c:\php\extensions"
- php_gd2.dll is in the c:\php\extensions directory
- The extension is uncommented
- I have restartet both computer and server at least a thousen times
- in phpinfo(), extension_dir is set to c:\php4

It still dosnt work..

#4 wildteen88

wildteen88
  • Staff Alumni
  • Advanced Member
  • 10,482 posts
  • LocationUK, Bournemouth

Posted 15 June 2006 - 04:10 PM

How are you testing GD? To test whether GD is loaded run the following code:
<?php
var_dump(gd_info());
?>
It should produce something like this:
array(12) { ["GD Version"]=> string(27) "bundled (2.0.28 compatible)" ["FreeType Support"]=> bool(true) ["FreeType Linkage"]=> string(13) "with freetype" ["T1Lib Support"]=> bool(true) ["GIF Read Support"]=> bool(true) ["GIF Create Support"]=> bool(true) ["JPG Support"]=> bool(true) ["PNG Support"]=> bool(true) ["WBMP Support"]=> bool(true) ["XPM Support"]=> bool(false) ["XBM Support"]=> bool(true) ["JIS-mapped Japanese Font Support"]=> bool(false) }
if it something like above then it is enabled.

Also make sure PHP is using the correct php.ini by running the phpinfo function check that "Configuration File (php.ini) Path" is the correct path to the php.ini

Also a good tip is to turn on "display_startup_errors" in the php.ini incase an error occurs during startup.

#5 purevision

purevision
  • New Members
  • Pip
  • Newbie
  • 4 posts

Posted 15 June 2006 - 04:25 PM

thanks for your replies wildteen88..

the configuration fil path is set to: c:\windows
I have tried to test gd with var_dump(gd_info());, but it caused a "fatal error, undefined .... " error...

But still, the extension_dir is set to c:\php4, so I think some how php is using the wrong php.ini file.
I have also set the "display_startup_errors" to on in php.ini, but in phpinfo() it is set to "Off".



#6 wildteen88

wildteen88
  • Staff Alumni
  • Advanced Member
  • 10,482 posts
  • LocationUK, Bournemouth

Posted 15 June 2006 - 04:31 PM

Yeah it looks like php is using thw rong ini file. Where id your php.ini file located? Move it to C:\Windows also if you are using Apache2 you should be able to add this into the httpd.conf file:
PHPIniDir "C:/WINDOWS"


#7 purevision

purevision
  • New Members
  • Pip
  • Newbie
  • 4 posts

Posted 15 June 2006 - 04:36 PM

Thank you so very much wildteen88.

I tried your last tip and it works! Thanks agian.

#8 wildteen88

wildteen88
  • Staff Alumni
  • Advanced Member
  • 10,482 posts
  • LocationUK, Bournemouth

Posted 15 June 2006 - 04:39 PM

No problem! I'll mark this as solved.

#9 Guest_richard060702_*

Guest_richard060702_*
  • Guests

Posted 02 July 2006 - 04:12 PM

Really, I had exactly the same problem. I spent whole morning searching internet. PHP.ini setting was right, only had problem with apache setting like wildteen88's last point. Once corrected it, it works just fine now.

Thank wildteen88, and thank you all.

Richard




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users