Jump to content

Archived

This topic is now archived and is closed to further replies.

purevision

*SOLVED* GD is not working in Win Xp pro

Recommended Posts

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?

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
[!--quoteo(post=384185:date=Jun 15 2006, 09:34 AM:name=wildteen88)--][div class=\'quotetop\']QUOTE(wildteen88 @ Jun 15 2006, 09:34 AM) [snapback]384185[/snapback][/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..

Share this post


Link to post
Share on other sites
How are you testing GD? To test whether GD is loaded run the following code:
[code]<?php
var_dump(gd_info());
?>[/code]
It should produce something like this:
[code]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) } [/code]
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 "[i]Configuration File (php.ini) Path[/i]" 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.

Share this post


Link to post
Share on other sites
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".

Share this post


Link to post
Share on other sites
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:
[code]PHPIniDir "C:/WINDOWS"[/code]

Share this post


Link to post
Share on other sites
Guest richard060702
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

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.