Jump to content

libPNG or not in phpinfo()


Acoon

Recommended Posts

So, I got a weird problem with my .png images in GD.

Some look all screwed up and wrong sizes etc. But only the ones that is transparent. Regular png images with no blending works fine. I have this problem on my server.

 

However, on my workstation i have easyPHP with PHP, apache, mysql etc for developing. There it works. They both has png support as shown in phpinfo():

PNG Support 	enabled 

 

And they are both GD version 2.0.34 compatible. The only real difference i can see is that on my workstation i have an extra line in GD in phpinfo().

 

libPNG Version 	1.2.44 

 

So my question is, what does this mean in regards to functionality?

 

 

Br,

Acoon

Link to comment
Share on other sites

You probably don't have libPNG installed on your server. GD should support PNG out of the box, but the support is pretty meh from what I've read. libPNG is probably the solution.

Thanks for your reply.

 

It seems libpng is already installed on the server. Any idea on how to 'enable' it in php?

[root@vps1 ~]# yum install libpng.x86_64
Package 2:libpng-1.2.10-7.1.el5_5.3.x86_64 already installed and latest version
Nothing to do

 

 

Br,

Acoon

Link to comment
Share on other sites

Check your Configure Command in PHP info.

 

Also check print_r( gd_info() );

 

Same on both computers...

 

Array
(
    [GD Version] => bundled (2.0.34 compatible)
    [FreeType Support] => 1
    [FreeType Linkage] => with freetype
    [T1Lib Support] => 
    [GIF Read Support] => 1
    [GIF Create Support] => 1
    [JPEG Support] => 1
    [PNG Support] => 1
    [WBMP Support] => 1
    [XPM Support] => 
    [XBM Support] => 1
    [JIS-mapped Japanese Font Support] => 
)

Link to comment
Share on other sites

There could be an error loading libPNG. It's obviously there, but PHP might not know where it is. I've heard about issues using relative paths.

 

Not sure how I can help beyond making sure you've compiled with --with-png-dir=/dir/to/libPNG

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.