Click to See Complete Forum and Search --> : [RESOLVED] Problems With GD Library install


shadowlesss
08-31-2006, 06:28 PM
I have installed php 5.x on my Windows 2003 server and I can not seem to get the GD Library configured.

I went into my php.ini file and took the ; off of extension=php_gd2.dll and then changed the path in the dir to extension_dir = D:\php\ext\

When I run my test page I don't see a table of GD info table.

What have I done wrong?

Thanks!

bradgrafelman
08-31-2006, 07:01 PM
Hmm... does the php_gd2.dll file exist in D:\php\ext\ ?

shadowlesss
08-31-2006, 07:04 PM
Hmm... does the php_gd2.dll file exist in D:\php\ext\ ?


Yes it sure does..this is the default location for this file when unzipped so I just changed the extension_dir to point to this location. I have everything on my d drive not my c drive.

bradgrafelman
08-31-2006, 07:06 PM
And where did you place the php.ini file? When you do a phpinfo(), does the "Configuration File (php.ini) Path" show this location?

shadowlesss
08-31-2006, 07:22 PM
And where did you place the php.ini file? When you do a phpinfo(), does the "Configuration File (php.ini) Path" show this location?


The php.ini file is located on d: (d:\php\php.ini) . When I run the test it shows

Configuration File (php.ini) Path C:\WINDOWS

If this is causing a problem then it is wierd because I have php scripts that are working just fine. I do not have any other php.ini files on the system other than the one located at d:\php\php.ini.

More info

PATH_TRANSLATED d:\inetpub\wwwroot\test.php
APPL_PHYSICAL_PATH d:\inetpub\wwwroot\

bradgrafelman
08-31-2006, 08:16 PM
Ah, now we're getting somewhere.

It's just as I expected; your php.ini is not in a directory listed in the PATH system environment variable, so PHP sets all configuration directives to their defaults (and, for whatever reason, claims to be using c:\WINDOWS as the config file path). You can do two things about this:

1. Add D:\php\ to the PATH environment variable (recommended), or
2. Move your php.ini file to a directory that is in the PATH variable, such as C:\WINDOWS

shadowlesss
08-31-2006, 08:23 PM
Ok I am not sure what the problem is then because I added this path when I was setting up php on the server here is the path..do I not have it entered right? Also why does my other scripts work?

D:\PHP;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;C:\Program Files\Microsoft SQL Server\80\Tools\BINN

bradgrafelman
08-31-2006, 08:25 PM
Which webserver are you using?

EDIT: In re: "Also why does my other scripts work?" -- why wouldn't they work? Nothing is stopping them from working...

Also, did you reboot the computer after making the changes to the PATH variable, as described here (http://www.php.net/manual/en/faq.installation.php#faq.installation.addtopath) ?

Also, how did you install PHP? As a module, or CGI binary?

shadowlesss
08-31-2006, 08:33 PM
Which webserver are you using?

EDIT: In re: "Also why does my other scripts work?" -- why wouldn't they work? Nothing is stopping them from working...

Also, did you reboot the computer after making the changes to the PATH variable, as described here (http://www.php.net/manual/en/faq.installation.php#faq.installation.addtopath) ?

Also, how did you install PHP? As a module, or CGI binary?


This is my web server on a windows 2003 / AD 2003 domain and yes I rebooted the machine after making this change. I installed it manually..I unzipped and I am pretty sure that I installed it as cgi binary. I just rebooted the server again and still not showing the correct path.

shadowlesss
08-31-2006, 08:50 PM
I pasted a copy of the php.ini file at C:\Windows but when I run the test again I still don't see the GD table

bradgrafelman
08-31-2006, 08:55 PM
If you moved the php.ini file into the Windows directory, and it's still not loading the GD library... I'm stuck as to what to suggest next. Sorry :(

EDIT: Looks like the problem is that PHP is still not parsing the php.ini file. In your phpinfo() output, it's still showing c:\php5 as the extension_dir.

Since you believe you installed PHP as a CGI binary, try setting another environment variable called "PHPRC" that points to the PHP directory where your php.ini file is located... namely D:\PHP . (For more information, see this (http://www.php.net/manual/en/faq.installation.php#faq.installation.phprc) FAQ entry)

shadowlesss
08-31-2006, 11:44 PM
Since you believe you installed PHP as a CGI binary, try setting another environment variable called "PHPRC" that points to the PHP directory where your php.ini file is located... namely D:\PHP . (For more information, see this (http://www.php.net/manual/en/faq.installation.php#faq.installation.phprc) FAQ entry)


That was it...I did not see this configuration step before. Once I made this change and rebooted everything worked!

Thank you for taking the time to help me out it is very appreciated!

bradgrafelman
08-31-2006, 11:46 PM
Thank you for taking the time to help me out it is very appreciated!'Tis why I come here ;)

Don't forget to mark this thread resolved.