GD image library and PHP 4.3.0

GD image library and PHP 4.3.0

Höfundur Gary Frederick -
Number of replies: 10
I installed PHP 4.3.0 partly because it has the GD library bundled.

PHP 4.3.0 has many improvements and enhancements:

* GD library is now bundled with the distribution and it is recommended to always use the bundled version

http://www.php.net/release_4_3_0.php

however my install of moodle is not picking up that GD is installed.

What do I need to do to get moodle to recognize that I have GD?

Thanks,

Gary
Meðaltal dóma: -
In reply to Gary Frederick

Re: GD image library and PHP 4.3.0

Höfundur Martin Dougiamas -
Mynd af Core developers Mynd af Documentation writers Mynd af Moodle HQ Mynd af Particularly helpful Moodlers Mynd af Plugin developers Mynd af Testers
GD is bundled, but not compiled by default. Make sure you specify --with-gd etc when compiling PHP.

You also need to visit your Moodle admin page to set the GD version there.
In reply to Martin Dougiamas

Re: GD image library and PHP 4.3.0

Höfundur Gary Frederick -
sigh

I installed the pre built version on XP. I may not be able to build it - I do not have Windows development tools. I'll continue looking at options.

I set the GD version on the moodle admin page. That caused the option to upload an image to show up but moodle resets the option to no GD.

Thanks Martin

Gary
In reply to Gary Frederick

Re: GD image library and PHP 4.3.0

Höfundur Martin Dougiamas -
Mynd af Core developers Mynd af Documentation writers Mynd af Moodle HQ Mynd af Particularly helpful Moodlers Mynd af Plugin developers Mynd af Testers
Ah, don't worry, all you probably need to do is edit php.ini and remove the comment (;) from this line: 'extension=php_gd.dll'.

http://moodle.org/doc/?frame=install.html&sub=requirements
In reply to Martin Dougiamas

Re: GD image library and PHP 4.3.0

Höfundur Mark Berthelemy -

Hi Martin et al,

I'm having similar problems. I've check with phpinfo() to see if GD is enabled on my hosting service - it is (v2.0). But Moodle seems to be resetting itself back to GD not installed, when ever I try to tell it to use GD 2.x.

The hosting service have also recompiled Apache for me, but to no avail.

Moodle just gives the message, when I try to upload an image: JPEG [or GIF] not supporting on this server.

Any ideas?

Mark

In reply to Mark Berthelemy

Re: GD image library and PHP 4.3.0

Höfundur Martin Dougiamas -
Mynd af Core developers Mynd af Documentation writers Mynd af Moodle HQ Mynd af Particularly helpful Moodlers Mynd af Plugin developers Mynd af Testers
Are you using an older version of Moodle? Versions before 1.0.8 couldn't auto-detect the built-in GD properly in PHP 4.3.0. However, setting it manually to 2.0 in the configuration page should work.
In reply to Martin Dougiamas

Re: GD image library and PHP 4.3.0

Höfundur Mark Berthelemy -

Hi Martin,

I'm using v1.0.8. It autodetected that there was no GD when I installed it. Since then the hosting service has recompiled Apache and phpinfo() says GD is enabled.

When I manually set the config page to use GD 2.0 it then allows me to browse for user pics to upload but on upload it just gives the message "JPEG not supported on this server". When I then go to look at the config page the GD setting has been reset to GD not available.

Anything I need to suggest to my hosting service?

Mark

In reply to Mark Berthelemy

Re: GD image library and PHP 4.3.0

Höfundur Martin Dougiamas -
Mynd af Core developers Mynd af Documentation writers Mynd af Moodle HQ Mynd af Particularly helpful Moodlers Mynd af Plugin developers Mynd af Testers
Yes, you need to suggest they install GD. bros

I just took a look at your server's phpinfo() and it definitely does not have GD. Perhaps the phpinfo() you saw was actually on another machine within a server cluster or something.

In any case, recompiling Apache is not necessary in this case, they need to recompile PHP using the --with-gd and --with-jpeg options.
In reply to Gary Frederick

Re: GD image library and PHP 4.3.0

Höfundur Herman van Keulen -

I had the same problem

 

Herman

In reply to Herman van Keulen

Re: GD image library and PHP 4.3.0

Höfundur Ger Tielemans -

I had problems with GD under foxserv(windows2000). I finally switched to EasyPHP 1.6 (has now also an English website). GD 2 works fine. (You have to start phpini.exe that installs with Easyphp. It shows you a library check/uncheck window, so uncheck GD 1 and check Gd 2 and restart Easyphp. (the only strange thing that remains is that I have to start easyphp sometimes twice  - like an old car -  before it runs..)