
http://www.aucs.org/rpmcenter/details/php-4.3.0/php-4.3.0-1.8.0.i386.rpm.html
otherwise download the source and configure it like this:
./configure --with-mysql --with-pgsql=/usr --enable-track-vars --enable-trans-sid --with-gd --with-jpeg-dir=/usr --with-ttf --with-zlib-dir=/usr --with-xpm-dir=/usr/X11R6 --with-freetype-dir=/usr --with-apxs=/opt/bin/apxs
hi, all:
I'm not sure if this is a version 1.0.8 problem or not. I finally got around to upgrading our server to:
server OS: Redhat 7.3
PHP 4.3.0 with gd support
Moodle 1.0.8
Everything is fine as far as moodle install is concerned. I'm even getting site variables to show that gd 2.0 is installed. I can confirm that, too, by a check of phpinfo() which shows:
GD Support: enabled
GD Version: bundled (2.0 compatible)
GIF Read Support: enabled
PNG Support: enabled
WBMP Support: enabled
So far, so good...
However, when I actually attempt an upload of a user picture, I get the following error message:
Fatal error: Call to undefined function: imagejpeg() in /home/users/~learn/public_html/user/lib.php on line 163
BTW: line 163+ snippet shows:
if (ImageJpeg($im1, "$CFG->dataroot/users/$userid/f1.jpg", 90) and
ImageJpeg($im2, "$CFG->dataroot/users/$userid/f2.jpg", 95) ) {
chmod("$CFG->dataroot/users/$userid/f1.jpg", 0666);
chmod("$CFG->dataroot/users/$userid/f2.jpg", 0666);
return 1;
} else {
return 0;
}
Any clues as to what might need fixing?
PS: Thanks Martin and team for an incredible piece of programming. Moodle is coming to the world just as it looked like proprietary giants like Blackboard were about to attempt to gobble major portions of the K-12 landscape.
best,
JPG Support enabled
Then...the world of joy!!
Thanks much, M minkowski: Your suggestions have delivered nearly full world of joy. We recompiled php using these attributes as per your and Martin's suggestions:
./configure \
--with-mysql=/usr/local/mysql \
--with-xml \
--with-apache=../apache_1.3.27 \
--enable-track-vars \
--enable-trans-sid \
--with-gd \
--with-jpeg-dir=/usr/lib \
--with-gif-dir=/usr/lib \
--with-zlib-dir=/usr/lib
No issues occurred all the thru to Apache make install.
phpinfo() gd reports:
GD Support | enabled |
GD Version | bundled (2.0 compatible) |
GIF Read Support | enabled |
JPG Support | enabled |
PNG Support | enabled |
WBMP Support | enabled |
That looks pretty good, I think, since GIF, JPG and PNG appear to be enabled.
However, when we attempt upload of JPGs, we get all black image. When we attempt GIF image upload, no problem. So GIFs are OK, JPGs still have problems.
Now, to add one more layer of weirdness to the image upload issue, I find that if I try to upload a GIF to Martin's moodle.com server, I get the same issue as I get when I try to upload a JPG to my server: the image appears black. However, JPGs uploaded on Martin's server are no problem.
Anybody have any clues about this?
If that doesn't work, you might want to change /usr/lib to /usr in the PHP compilation ... that's what I used on my Redhat 7.3 box.