Can't get PHP graphics to work

TangoWhiskey

Touchdown! Greaser!
Joined
Feb 23, 2005
Messages
14,210
Location
Midlothian, TX
Display Name

Display name:
3Green
OK, Jesse and all you other PHP gurus...

I installed PHP 5.2.5 (from the precompiled Win32 binaries from php.net) on my Windows system, and got it (finally) integrated with IIS 5.1 on my Windows XP system as an ISAPI extension: I can open php pages now.

I downloaded an application that uses the GD drawing library to draw graphs; the application's PHP page loads just fine, but the graphs don't show... just image placeholders.

I created a phpinfo() page to see if GD Support is enabled, and it doesn't appear to be... there is no GD Support, GD Version, or list of supported image types. The "configure command" says:

cscript /nologo configure.js "--enable-snapshot-build" "--with-gd=shared"

My understanding, from the libgd.org site, is that version 5.2.5 of php should already have GD support built in; I should not have to download anything else. There is no configure.* (anything) under c:\php (where I installed PHP). I presume the configure command shown above is how this pre-compiled release was built.

Any ideas?
 
I found the extensions for gd were commented out in php.ini.

;extension=php_gd2.dll

I commented that out, ensured that the extensions directory was properly set to c:\php\ext, and stopped/started IIS to ensure the ISAPI dll got reloaded, but I think PHP is still using the old setttings.

I'll reboot and see if it fixes it; if it does, my next question is how do you get PHP to reload itself using changes you've made to php.ini?
 
I haven't run PHP in Windows in a long, long time, but...

In php.ini, look for

extension=php_gd.dll
extension=php_gd2.dll

and make sure they are not commented out.

Restart Windows (or IIS) and see if it works.

Like I said, it's been years since I used PHP on Windows. It was still version 4.something. Sorry if this proves a waste of your time, but it's worth a try.

Rich
 
Oops... looks like you figgered it out whilst I was typing...

Rich
 
Oops... looks like you figgered it out whilst I was typing...

Rich


Thanks, Rich! Restarting IIS wasn't enough, but the reboot plus the things you mentioned did the trick... I have graphs and such now.

Is there a command to make PHP restart using the latest parameters from the .ini file?
 
Glad to hear it.

Now we'll work on getting you to build a Linux box. :yes:
 
Is there a command to make PHP restart using the latest parameters from the .ini file?

There's a registry key you have to edit... I forget where it is, though. Maybe

HKEY_LOCAL_MACHINE\SOFTWARE\PHP\IniFilePath

?

Like I said, it's been a long time. Jesse's probably more current on this one.

Rich
 
Thanks, Rich! Restarting IIS wasn't enough, but the reboot plus the things you mentioned did the trick... I have graphs and such now.

Is there a command to make PHP restart using the latest parameters from the .ini file?

How were you restarting IIS? You'll want to restart the IIS Admin service. If you were running IIS6 (Server 03) you could recycle the application pool which would be less disruptive. This isn't an option though with IIS 5.

But, enough of this silly talk, why aren't you installing Linux?
 
How were you restarting IIS? You'll want to restart the IIS Admin service. If you were running IIS6 (Server 03) you could recycle the application pool which would be less disruptive. This isn't an option though with IIS 5.

From the command line:

net stop iisadmin
net start w3svc

But, enough of this silly talk, why aren't you installing Linux?

I have a spare system here I've tried to install both Suse Linux and Fedora 6 on and have had troubles with getting an install to complete. I think I may have had a bad dvd drive, but just not sure.

I'd prefer to use Fedora 6 only because the Linux systems at work are RHEL (Red Hat Enterprise Linux) and Fedora 6 is on the same core... would be "as similar" as I can get.

I'll try again, for sure, but I'm not looking to do a dual boot--really would like to get this working on this spare box.
 
I'd prefer to use Fedora 6 only because the Linux systems at work are RHEL (Red Hat Enterprise Linux) and Fedora 6 is on the same core... would be "as similar" as I can get.

I'll try again, for sure, but I'm not looking to do a dual boot--really would like to get this working on this spare box.


You may want to consider CentOS. Great server OS and something like 99 percent RHEL-compatible.

Rich
 
You may want to consider CentOS. Great server OS and something like 99 percent RHEL-compatible.

Rich

I second this recommendation. Fedora Core may be somewhat similar to RHEL but it is by no means the same thing.

CentOS is built from the RHEL public RPMs. If you aren't worried about vendor support--CentOS is a fine tool for the job. You won't even notice the difference.
 
Back
Top