When I try to edit user profile I get an error msg "Fatal error: Call to undefined function: imagecreatefromjpeg() in moodle/user/edit.php on line 65"
Any idea why?
In reply to Mohd Radzi Abdul Kadir
Re: undefined function: imagecreatefromjpeg()
by Martin Dougiamas -
Your PHP server doesn't have GD installed.
Go to your admin "Configure variables" page and check the default setting for GD there ... it will probably say "GD is not installed".
You need to recompile/reinstall PHP with GD support.
This reminds me to add an error check for that case on the user profile page.
Cheers,
Martin
Go to your admin "Configure variables" page and check the default setting for GD there ... it will probably say "GD is not installed".
You need to recompile/reinstall PHP with GD support.
This reminds me to add an error check for that case on the user profile page.
Cheers,
Martin
In reply to Martin Dougiamas
Re: undefined function: imagecreatefromjpeg()
I already install GD now and I still get the same error msg.
In my phpinfo I get
GD Support -enabled
GD Version -between 1.3 and 1.6.1
GIF Read Support -enabled
GIF Create Support -enabled
In my phpinfo I get
GD Support -enabled
GD Version -between 1.3 and 1.6.1
GIF Read Support -enabled
GIF Create Support -enabled
In reply to Mohd Radzi Abdul Kadir
Re: undefined function: imagecreatefromjpeg()
by Martin Dougiamas -
When compiling PHP, in addition to --with-gd, you also need --with-jpeg-dir to include the JPEG libraries (and --with-png-dir for PNG support).
Just in case it's helpful, this is my full PHP configure line on a Redhat server:
./configure --with-gd=/usr --with-jpeg-dir=/usr --with-png-dir=/usr --with-mysql --with-pgsql=/usr --enable-track-vars --enable-trans-sid --with-ttf --with-zlib-dir=/usr --with-xpm-dir=/usr/X11R6 --with-freetype-dir=/usr --with-apxs=/opt/bin/apxs
Cheers,
Martin
Just in case it's helpful, this is my full PHP configure line on a Redhat server:
./configure --with-gd=/usr --with-jpeg-dir=/usr --with-png-dir=/usr --with-mysql --with-pgsql=/usr --enable-track-vars --enable-trans-sid --with-ttf --with-zlib-dir=/usr --with-xpm-dir=/usr/X11R6 --with-freetype-dir=/usr --with-apxs=/opt/bin/apxs
Cheers,
Martin