Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Configuring PHP with Litespeed for Jpeg GD Support

Posted on 2010-11-18
5
Medium Priority
?
1,165 Views
Last Modified: 2012-06-21
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
Comment
Question by:theburningcat
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
5 Comments
 
LVL 111

Expert Comment

by:Ray Paseur
ID: 34166449
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
 

Accepted Solution

by:
theburningcat earned 0 total points
ID: 34167209
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
 
LVL 111

Expert Comment

by:Ray Paseur
ID: 34169694
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
 

Author Comment

by:theburningcat
ID: 34173556
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
 

Author Closing Comment

by:theburningcat
ID: 34195044
Found this on the phpinfo of a standard cPanel setup.
0

Featured Post

Ask an Anonymous Question!

Don't feel intimidated by what you don't know. Ask your question anonymously. It's easy! Learn more and upgrade.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This post contains step-by-step instructions for setting up alerting in Percona Monitoring and Management (PMM) using Grafana.
The main intent of this article is to make you aware of ‘Exchange fail to mount’ error, its effects, causes, and solution.
This video Micro Tutorial shows how to password-protect PDF files with free software. Many software products can do this, such as Adobe Acrobat (but not Adobe Reader), Nuance PaperPort, and Nuance Power PDF, but they are not free products. This vide…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…
Suggested Courses

618 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question