purevision Posted June 15, 2006 Share Posted June 15, 2006 I have the following system:Win Xp pro sp2Apache 2.2.2PHP 4.4.2I 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? Quote Link to comment https://forums.phpfreaks.com/topic/12064-solved-gd-is-not-working-in-win-xp-pro/ Share on other sites More sharing options...
wildteen88 Posted June 15, 2006 Share Posted June 15, 2006 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 Link to comment https://forums.phpfreaks.com/topic/12064-solved-gd-is-not-working-in-win-xp-pro/#findComment-45902 Share on other sites More sharing options...
purevision Posted June 15, 2006 Author Share Posted June 15, 2006 [!--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:\php4It still dosnt work.. Quote Link to comment https://forums.phpfreaks.com/topic/12064-solved-gd-is-not-working-in-win-xp-pro/#findComment-45942 Share on other sites More sharing options...
wildteen88 Posted June 15, 2006 Share Posted June 15, 2006 How are you testing GD? To test whether GD is loaded run the following code:[code]<?phpvar_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.iniAlso a good tip is to turn on "display_startup_errors" in the php.ini incase an error occurs during startup. Quote Link to comment https://forums.phpfreaks.com/topic/12064-solved-gd-is-not-working-in-win-xp-pro/#findComment-45966 Share on other sites More sharing options...
purevision Posted June 15, 2006 Author Share Posted June 15, 2006 thanks for your replies wildteen88..the configuration fil path is set to: c:\windowsI 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". Quote Link to comment https://forums.phpfreaks.com/topic/12064-solved-gd-is-not-working-in-win-xp-pro/#findComment-45975 Share on other sites More sharing options...
wildteen88 Posted June 15, 2006 Share Posted June 15, 2006 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] Quote Link to comment https://forums.phpfreaks.com/topic/12064-solved-gd-is-not-working-in-win-xp-pro/#findComment-45979 Share on other sites More sharing options...
purevision Posted June 15, 2006 Author Share Posted June 15, 2006 Thank you so very much wildteen88.I tried your last tip and it works! Thanks agian. Quote Link to comment https://forums.phpfreaks.com/topic/12064-solved-gd-is-not-working-in-win-xp-pro/#findComment-45982 Share on other sites More sharing options...
wildteen88 Posted June 15, 2006 Share Posted June 15, 2006 No problem! I'll mark this as solved. Quote Link to comment https://forums.phpfreaks.com/topic/12064-solved-gd-is-not-working-in-win-xp-pro/#findComment-45985 Share on other sites More sharing options...
Guest richard060702 Posted July 2, 2006 Share Posted July 2, 2006 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 Quote Link to comment https://forums.phpfreaks.com/topic/12064-solved-gd-is-not-working-in-win-xp-pro/#findComment-52020 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.