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

  • Cloned VM/Server/Computer in Linux won't boot and goes to initramfs busybox Solution
  • How To Add Windows 7 8 10 11 to GRUB Boot List Dual Booting
  • How to configure OpenDKIM on Linux with Postfix and setup bind zonefile
  • Debian Ubuntu 10/11/12 Linux how to get tftpd-hpa server setup tutorial
  • efibootmgr: option requires an argument -- 'd' efibootmgr version 15 grub-install.real: error: efibootmgr failed to register the boot entry: Operation not permitted.
  • Apache Error Won't start SSL Cert Issue Solution Unable to configure verify locations for client authentication SSL Library Error: 151441510 error:0906D066:PEM routines:PEM_read_bio:bad end line SSL Library Error: 185090057 error:0B084009:x509 certif
  • Linux Debian Mint Ubuntu Bridge br0 gets random IP
  • redis requirements
  • How to kill a docker swarm
  • docker swarm silly issues
  • isc-dhcp-server dhcpd how to get longer lease
  • nvidia cannot resume from sleep Comm: nvidia-sleep.sh Tainted: Linux Ubuntu Mint Debian
  • zfs and LUKS how to recover in Linux
  • [error] (28)No space left on device: Cannot create SSLMutex Apache Solution Linux CentOS Ubuntu Debian Mint
  • Save money on bandwidth by disabling reflective rpc queries in Linux CentOS RHEL Ubuntu Debian
  • How to access a disk with bad superblock Linux Ubuntu Debian Redhat CentOS ext3 ext4
  • ImageMagick error convert solution - convert-im6.q16: cache resources exhausted
  • PTY allocation request failed on channel 0 solution
  • docker error not supported as upperdir failed to start daemon: error initializing graphdriver: driver not supported
  • Migrated Linux Ubuntu Mint not starting services due to broken /var/run and dbus - Failed to connect to bus: No such file or directory solution