Compile PHP 5.3.2 on Centos 5 and CPanel/WHM because of error - Fatal error: Call to > undefined function imagecreatefromjpeg()

This function and others may not work with the stock PHP install on Centos/CPanel:  Fatal error:  Call to > undefined function imagecreatefromjpeg()

Even with libjpeg-devel installed it won't work because PHP was not compiled with jpeg support, so we have to do the dirty work ourselves :)

Here is the command/yum's I did to install missing libraries for PHP that configure will complain about (yes it is a one by one process).

yum install bzip2-devel curl-devel enchant-devel t1lib-devel gmp-devel gettext-devel libibcommon-devel openldap-devel libmcrypt-devel freetds-devel unixODBC-devel pspell-devel readline-devel libedit-devel recode-devel

imap error: (remove it unless you need it)

configure: error: utf8_mime2text() has new signature, but U8T_CANONICAL is missing. This should not happen. Check config.log for additional information.

 

Link error, with --with-xsl to fix the below error


usr/lib/gcc/i386-redhat-linux/4.1.2/../../../libxslt.so: undefined reference to `xmlXPathContextSetCache'

replace --with-xsl with --with-dom-xslt
 

Configure command for PHP below (it is fairly generic and should suit most uses/installs, but if it doesn't you need to add your own --with options).


./configure --with-openssl \
--with-kerberos \
--with-zlib \
--with-bz2 \
--with-curl \
--with-curlwrappers \
--with-libxml-dir \
--with-enchant \
--with-pcre-dir \
--with-openssl-dir \
--with-gd \
--with-jpeg-dir \
--with-png-dir \
--with-zlib-dir \
--with-xpm-dir \
--with-freetype-dir \
--with-t1lib \
--with-gettext \
--with-gmp \
--with-mhash \
--with-kerberos \
--with-imap-ssl \
--with-ldap \
--with-ldap-sasl \
--with-libmbfl \
--with-onig \
--with-mcrypt \
--with-mssql \
--with-mysql-sock \
--with-unixODBC=/usr \
--with-dbmaker \
--with-pdo-dblib \
--with-pdo-mysql \
--with-zlib-dir \
--with-pspell \
--with-libedit \
--with-readline \
--with-recode \
--with-dom-xslt


Tags:

compile, php, centos, cpanel, whm, fatal, undefined, imagecreatefromjpeg, install, libjpeg, devel, installed, compiled, jpeg, yum, libraries, configure, bzip, curl, enchant, lib, gmp, gettext, libibcommon, openldap, libmcrypt, freetds, unixodbc, pspell, readline, libedit, recode, imap, utf, _mime, text, t_canonical, config, additional, xsl, usr, gcc, redhat, linux, libxslt, reference, xmlxpathcontextsetcache, dom, xslt, generic, installs, doesn, openssl, kerberos, zlib, bz, curlwrappers, libxml, dir, pcre, gd, png, xpm, freetype, mhash, ssl, ldap, sasl, libmbfl, onig, mcrypt, mssql, mysql, dbmaker, pdo, dblib,

Latest Articles

  • How To Upgrade Debian 8,9,10 to Debian 12 Bookworm
  • Linux dhcp dhclient Mint Redhat Ubuntu Debian How To Use Local Domain DNS Server Instead of ISPs
  • Docker dockerd swarm high CPU usage cause solution
  • Docker Minimum Requirements/How Efficient is Docker? How Much Memory Does Dockerd Use?
  • qemu-nbd: Failed to set NBD socket solution qemu-nbd: Disconnect client, due to: Failed to read request: Unexpected end-of-file before all bytes were read
  • apache2 httpd apache server will not start [pid 22449:tid 139972160445760] AH00052: child pid 23248 exit signal Aborted (6) solution Mint Debian Ubuntu Redhat
  • How to use the FTDI USB serial cable to RJ45 adapter to connect to the console on Cisco/Juniper Switch Router Firewall in Linux Ubuntu Debian Redhat
  • How To Setup Python3 in Ubuntu Docker Image for AI Deep Learning
  • How to Configure NVIDIA GPUs with Docker on Ubuntu: A Comprehensive Guide for AI Deep Learning CUDA Solution
  • Linux Ubuntu Mint how to check nameservers when /etc/resolv.conf disabled solution
  • Docker cannot work on other overlayfs filesystems such as ecryptfs won't start overlayfs: filesystem on '/home/docker/overlay2/check-overlayfs-support130645871/upper' not supported as upperdir
  • Linux How To Access Original Contents of Directory Mounted Debian Mint CentOS Redhat Solution
  • ecryptfs how to manually encrypt your existing home directory or other directory
  • How to Reset CIPC Cisco IP Communicator for CME CUCM CallManager
  • Internet Explorer Cannot Download File "Your security settings do not allow for this file to be downloaded." Security Settings Solution
  • Linux How To Upgrade To The Latest Kernel Debian Mint Ubuntu
  • Firefox how to restore and backup saved passwords and history which files/location
  • Linux How To echo as root solution to use tee permission denied solution Ubuntu Debian Mint Redhat CentOS
  • Linux how to keep command line bash process running if you are disconnected or need to logout of SSH remotely
  • Linux swapping too much? How to check the swappiness and stop swapping