I was recently installing KBPublisher on a web server running Litespeed web server with both PHP and Ruby running on it. The initial check for KB Publisher complained about GD FreeType Support, GD FreeType Linkage, and GD JPG Support not being compiled into PHP. Its fairly easy to resolve this but may not be obvious to all so use the tips and directions below.
Make sure that you have all of the necessary packages installed. The packages necessary for the items that KBPublisher was complaining about include freetype, freetype-devel, libjpeg, and libjpeg-devel. If they are not installed you can install them using the below syntax.
- yum install freetype freetype-devel libjpeg libjpeg-devel
After verifying the proper packages are installed you will need to recompile PHP. Login to the Litespeed admin, select Action from the top navigation menu, and then click on “Compile PHP” from the drop down. The configuration from your previous PHP build should automatically be entered into the configuration window. Make sure to add “–with-jpeg-dir=/usr/lib” and “–with-freetype-dir=/usr/lib”. The directory will depend on the location of the libjpeg and freetype libraries. Use the locate command to find the libraries if necessary. My configuration is listed below which included everything that I had previously needed plug the addition of the two commands.
Litespeed PHP Configuration Parameters:
- --with-mysqli --with-mcrypt --with-mysql --with-mysql=/usr/bin/ --with-libdir=lib64 --with-zlib --with-gd --with-jpeg-dir=/usr/lib --with-freetype-dir=/usr/lib --enable-shmop --enable-track-vars --enable-sockets --enable-sysvsem --enable-sysvshm --enable-magic-quotes --enable-mbstring --with-iconv
With the additions made to the configuration parameters click the “Build PHP 5” button to begin the process. You will see PHP first configure, then compile, and finally install. Once this process finishes restart Litespeed and then refresh the KBPublisher configuration screen and all of your check marks should now be green.