LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 01-30-2012, 11:38 AM   #1
adnnor
LQ Newbie
 
Registered: Jan 2012
Posts: 3

Rep: Reputation: Disabled
Smile Call to undefined function imagecreatefromjpeg()


hi,

i am using linux on my vps, every thing is fine on my localhost (development pc) but when i upload the php file to my vps it gives me error of Call to undefined function imagecreatefromjpeg(), when i check php info from shell using php -i i found nothing related to libgd

Configure Command => './configure' '--disable-pdo' '--enable-bcmath' '--enable-calendar' '--enable-ftp' '--enable-libxml' '--enable-magic-quotes' '--enable-sockets' '--prefix=/usr/local' '--with-apxs2=/usr/local/apache/bin/apxs' '--with-curl=/opt/curlssl/' '--with-imap=/opt/php_with_imap_client/' '--with-imap-ssl=/usr' '--with-kerberos' '--with-libxml-dir=/opt/xml2/' '--with-mysql=/usr' '--with-mysql-sock=/var/lib/mysql/mysql.sock' '--with-openssl=/usr' '--with-openssl-dir=/usr' '--with-pcre-regex=/opt/pcre' '--with-zlib' '--with-zlib-dir=/usr'

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

i am new for this error .. any help
 
Old 01-30-2012, 11:52 AM   #2
Cedrik
Senior Member
 
Registered: Jul 2004
Distribution: Slackware
Posts: 2,140

Rep: Reputation: 244Reputation: 244Reputation: 244
Look like your vps php was not compiled with gd support, so you can't use gd functions :/
 
Old 01-30-2012, 12:32 PM   #3
adnnor
LQ Newbie
 
Registered: Jan 2012
Posts: 3

Original Poster
Rep: Reputation: Disabled
thanks but how can i recompile my php with gd .. i am using vps with centos 6, might be this question is foolish for you but really i dont know how to do it, remember Cedrik ... i want to recompile php with gd

Last edited by adnnor; 01-30-2012 at 12:42 PM.
 
Old 01-30-2012, 02:51 PM   #4
Cedrik
Senior Member
 
Registered: Jul 2004
Distribution: Slackware
Posts: 2,140

Rep: Reputation: 244Reputation: 244Reputation: 244
Try this configuration, you don't want more php modules ?
Code:
./configure --disable-pdo --enable-bcmath --enable-calendar --enable-ftp \
--enable-libxml --enable-magic-quotes --enable-sockets --prefix=/usr/local \
--with-apxs2=/usr/local/apache/bin/apxs --with-curl=/opt/curlssl/ \
--with-imap=/opt/php_with_imap_client/ --with-imap-ssl=/usr --with-kerberos \
--with-libxml-dir=/opt/xml2/ --with-mysql=/usr --with-mysql-sock=/var/lib/mysql/mysql.sock \
--with-openssl=/usr --with-openssl-dir=/usr --with-pcre-regex=/opt/pcre --with-zlib \
--with-zlib-dir=/usr --with-gd --with-jpeg-dir=/usr --with-png-dir=/usr --enable-gd-native-ttf \
--enable-gd-jis-conv --with-freetype-dir=/usr
make
make install
 
Old 02-01-2012, 12:11 AM   #5
adnnor
LQ Newbie
 
Registered: Jan 2012
Posts: 3

Original Poster
Rep: Reputation: Disabled
done ... but my php files are not working on my vps ... it gives me strange error ... oh my god what should i do now .. i have an important project
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Fatal error: Call to undefined function imagecreatefromjpeg() jickson Slackware 3 05-18-2011 04:58 AM
Call to undefined function: imagettftext() magnar Linux - Software 4 09-22-2008 10:38 AM
Call to undefined function mail() The_Lance SUSE / openSUSE 1 04-12-2005 08:55 AM
Call to undefined function domxml_open_mem() apt Programming 2 04-01-2005 03:25 AM
Call to undefined function: mysql_connect() SocialEngineer Linux - Software 2 11-16-2004 02:24 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 01:32 AM.

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