How does this affect your web server?
So there's no bundled libraries in Debian or Ubuntu. Debian policy does not build packages with embedded copies of 3rd party code. Due to upstream syncing issues, package maintainer animosity, and Debian policy, GD sources used for libgd in Debian are missing certain functions.If you happily installed PHP with GD using apt-get install php5-gd you should be aware the following functions are missing
function imagecolormatch
function imageconvolution
function imagecreatefromxbm
function imagecreatefromxpm
function imagefilter
function imagelayereffect
function imagerotate
function imagexbm
Galleries, images, and photos will suddenly disappear from your web-pages. Errors logs will start to fill up with messages similar to this one:
PHP Fatal error: Call to undefined function imageantialias()
How can I fix undefined function errors?
Recompile PHP. Don't fret, this is straight forward in Debian.Install build tools required to compile source code
> apt-get install build-essential debhelper fakeroot
Obtain the PHP source code
> cd /usr/src
> sudo apt-get source php5
Install all dependencies required to build PHP5
> sudo apt-get build-dep php5
Build the package
> cd php5-x.x.x (replace 'x' correct version number)
> sudo dpkg-buildpackage -rfakeroot
This will take some time, treat yourself to a refreshment
When the .deb is compiled, traverse back a folder.
> cd ..
Install the required package*
> sudo dpkg -i php5-gd_5.x.x.x.deb
*Don't forget to restart apache.
Be a good administrator, hold that package
You've customized your current package and you don't want to overwrite it, no matter what. Holding a package informs the package manager to retain the current installed version. The next time you run apt-get update and apt-get upgrade you won't overwrite all of your hard work.Using dpkg
> sudo echo php5-gd hold | dpkg --set-selections
Using apt
> sudo sudo apt-mark hold php5-gd
No comments:
Post a Comment