[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1167
  • Last Modified:

Configuring PHP with Litespeed for Jpeg GD Support

I have recently installed Litespeed Web Server and have been overall happy with it and it's playing well with our websites, but in particular I am having trouble getting it to support Jpeg GD.

I configured PHP 5.2.14 with the following attributes on a CentOS 5 64bit system with cPanel:
'--with-mysqli' '--with-zlib' '--with-gd' '--enable-shmop' '--enable-track-vars' '--enable-sockets' '--enable-sysvsem' '--enable-sysvshm' '--enable-magic-quotes' '--enable-mbstring' '--with-iconv' '--with-libdir=lib64' '--with-mysql' '--with-pdo-mysql=shared' '--with-pdo-sqlite=shared' '--with-litespeed' '--with-jpeg-dir' '--with-png-dir'

I have not specified a directory for Jpeg and PNG because it's in the default /usr/lib and /usr/lib64 directories (I have tried specifying the directory as well with no luck).

The .so files are definitely in boh of those directories:

[root@server lib]#ls *libjpeg*
libjpeg.so  libjpeg.so.62  libjpeg.so.62.0.0

[root@server lib64]#ls *libjpeg*
libjpeg.so  libjpeg.so.62  libjpeg.so.62.0.0

And the correct RPMs are installed:

[root@server public_html]#rpm -qa|grep jpeg
libjpeg-6b-37
libjpeg-6b-37
libjpeg-devel-6b-37
libjpeg-devel-6b-37

Could someone recommend a way forward to get PHP to play with Jpeg GD?

Here is the full build log: http://www.quickvps.co.uk/buildlog.txt
0
theburningcat
Asked:
theburningcat
  • 3
  • 2
1 Solution
 
Ray PaseurCommented:
You may have already read this, but just in case, check the 4 main links on this page.
http://us3.php.net/manual/en/image.setup.php

HTH, ~Ray
0
 
theburningcatAuthor Commented:
I found the answer in the end. Even though the .so files are in /usr/lib/ and /usr/lib64, the build has to be as follows:
'--with-jpeg-dir=/usr'
0
 
Ray PaseurCommented:
Right.  Quoting the online man page:

To enable support for jpeg add --with-jpeg-dir=DIR . Jpeg 6b, 7 or 8 are supported.

Exactly like it says on http://us3.php.net/manual/en/image.installation.php which is one of the 4 main links on the page I recommended:
http://us3.php.net/manual/en/image.setup.php

I have used cPanel a lot and never found "phpinfo" on it.  Can you provide a link?  Thanks, ~Ray
0
 
theburningcatAuthor Commented:
I used <?php phpinfo(); ?> on a server running a default installation of cPanel.

The page you suggested does say to use --with-jpeg-dir=DIR but in this case I needed to know to use /usr rather than /usr/lib64 which is where the .so files are installed.
0
 
theburningcatAuthor Commented:
Found this on the phpinfo of a standard cPanel setup.
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now