Having upgraded various parts, I'm not entirely sure where my problem lies.

I'm running Apache 2.2.6 with php 5.2.5 under Windoze Vista (Home Basic).

It appears the GD library isn't running. I've got an app that's trying to do captcha codes (text in front of wavy background to exclude robots) and the picture doesn't appear.

There's no GD section in my phpInfo output, which I think confirms there's a problem (?).

I've got php_gd2.dll loaded as a module, the extension directory correctly pathed.
I had installed from the php Windoze installer version, but have now removed all that and replaced it from the zip version.

Ummmm, what else?
I've trawled around the net and found lots of "well it just works", but it doesn't here.
Vista's fault? Dunno.

Anything obviously daft in what I've said, or just not said enough?

TIA
Mark

    Where did you install PHP to (e.g. c:\php\ ?), where is your php.ini file, and does phpinfo() show the correct location to this file?

    Also, did you add the PHP directory to your system's PATH environment variable?

      Hi,

      and thanks for your reply

      bradgrafelman wrote:

      Where did you install PHP to (e.g. c:\php\ ?), where is your php.ini file, and does phpinfo() show the correct location to this file?

      PHP is installed under "Program Files". I saw the note suggesting that this might be a problem (because of the space), but looking back at my last working version... hmmm, hold on, I thought that one had been in the same place, but now I notice it's not. Ok, I'll change that.

      php.ini is in the php directory.
      It says the that the path to it is to C:\Windows, which is wrong, but it also says the loaded configuration file is the correct one, which all seems a bit odd but I'm not sure how to change it.

      bradgrafelman wrote:

      Also, did you add the PHP directory to your system's PATH environment variable?

      Yes, this has been set, and I will change it to reflect the change I make to the php install location.

        Ok, done that (move the php installation to the root, no spaces in the path), no difference.

        I notice the install warns against spaces because "some servers may crash", which certainly wasn't happening (Apache 2.2.6).

        I've just (reluctantly) moved on to Vista, so I'm suspicious of everything at the moment.

        Should phpInfo report a GD module under php 2.5.2?

          6 days later

          Did you add the PHPIniDir directive to your httpd.conf file and restart Apache (assuming PHP was integrated as an ISAPI module)?

          If so, double check that the 'extension=php_gd.dll' line isn't commented out, and double check that phpinfo() shows the correct path to your php.ini file (look at "Loaded Configuration File" or something similar).

            Ok, that was it!

            I didn't have a line loading the GD library, which made it a bit difficult for it to work I s'pose :glare:

            I didn't install php as part of WAMP or any such, I did it as a separate package, and initially from the Windoze installer package. The default ini file that came with that had no extensions in the extension section at all! I now see that looking at the recommended ini file from the zip file install.

            Hmmm, so the extension directive goes in php.ini. Should it be in httd.conf?

            Also, Apache still reports the php ini path as C:\Windows, which is wrong on my setup. But it does report the loaded configuration files as c:\php\php25\php.ini, which is correct. It'd be nice to get that path correct, but I don't see how. I've got the phpIniDir set in httd.conf

            Thanks for your help Brad, much appreciated.

            <A Few Minutes Later>
            That's not right, the bit I said about the extension section. There was an extension section installed, just in a slightly different place and format. I HAD tried putting the gd library in there and previously it hadn't worked, now it does. Hmmm, gremlins 🙁
            Anyway, still fixed.

              Write a Reply...