LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 05-17-2011, 07:53 AM   #1
jickson
LQ Newbie
 
Registered: May 2008
Posts: 2

Rep: Reputation: 0
Fatal error: Call to undefined function imagecreatefromjpeg()


Hi guys,

I am having a problem with my slackware version 12 server. I tried installing a new joomla theme from the rockettheme and its giving me the following error while loading the site.

--------------
Fatal error: Call to undefined function imagecreatefromjpeg() in /home/www/verticaltest/modules/mod_rokstories/thumbnail.inc.php on line 167
--------------

Thought it was a problem with gd library modules, but in info.php, its showing that gd is installed in the server. Pasting the result form info.php below..

--------------
Configure Command './configure' '--with-apxs2=/usr/local/apache2/bin/apxs' '--with-mysql=/usr' '--with-pdo-mysql=/usr' '--enable-mbstring' '--with-gd' '--with-imap=/root/software/imap-2007e' '--with-gettext' '--with-mcrypt' '--with-mssql' '--enable-calendar' '--with-jpeg-dir=/usr/lib'



gd

GD Support enabled
GD Version bundled (2.0.34 compatible)
GIF Read Support enabled
GIF Create Support enabled
PNG Support enabled
WBMP Support enabled
XBM Support enabled
----------------

libgd locate result from the server

# locate libgd.so
/usr/lib/libgd.so.2
/usr/lib/libgd.so.2.0.0
/usr/lib/libgd.so

----------------

If gd is installed, what should be the problem? can anyone help me regarding this?
 
Old 05-17-2011, 02:38 PM   #2
rylan76
Senior Member
 
Registered: Apr 2004
Location: Potchefstroom, South Africa
Distribution: Fedora 17 - 3.3.4-5.fc17.x86_64
Posts: 1,552

Rep: Reputation: 103Reputation: 103
You might have the wrong version of GD installed from what the Joomla theme expects to be present.

I once had exactly the same problem when I deployed my PHP site on my live server (hosted by Hetzner) vs. my dev server (for which I compiled GD, PHP, Apache and MySQL myself.)

There was a version discrepancy between the GD I had on my dev server, and the GD available on the Hetzner server.

There was no way to get around the problem except to not use the functions that my server did not support while developing on the dev server (which had a newer GD version and supported more functions.)
 
Old 05-17-2011, 02:55 PM   #3
ljb643
Member
 
Registered: Nov 2003
Posts: 526

Rep: Reputation: Disabled
For some reason, your GD extension to PHP was built without JPEG support. The info.php messages show GIF, PNG, WBMP and XPM but not JPEG. Did you build PHP yourself, or are you using the one that came with Slackware? If you built it yourself, you need to rebuild with JPEG. If you are using the Slackware version, I'm not sure why this would be so... The latest patch for Slackware 12 was php-5.2.17 (which is no longer supported by the PHP group) - is that what you have?

Also normally PHP does not use the system's libgd, as it has its own built in to the GD extension.
 
Old 05-18-2011, 04:58 AM   #4
jickson
LQ Newbie
 
Registered: May 2008
Posts: 2

Original Poster
Rep: Reputation: 0
yes, you were right, I just compiled php with JPEG and the problem has been resolved...thanks anyway..
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
PHP Fatal error: Call to undefined function mysql_connect() grob115 Programming 4 11-27-2010 12:01 AM
Fatal error: Call to undefined function: gzinflate() Beauford-2 Slackware 2 12-07-2006 06:51 PM
php error: Call to undefined function: mysql_pconnect() The00Dustin Linux - Software 3 02-21-2006 09:05 PM
Fatal Error - Call to undefined function : pg_pconnect() in filename.php on line xx mwpeng Linux - Newbie 1 02-26-2005 08:57 AM
Fatal error: Call to undefined function: mail() saeed Linux - Software 0 10-07-2003 03:59 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 05:13 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration