LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices

Reply
 
Search this Thread
Old 06-24-2007, 05:23 PM   #1
latino
Member
 
Registered: Aug 2003
Location: Puerto Rico
Distribution: RHEL 5.5
Posts: 141

Rep: Reputation: 15
Question libpng and libpng-devel driving me crazy


Hi:

I have a RHEL 4 server. I run Apache 2.2.4 with php5.2.3. Problem I have is that I configure, make and compile php 5.2.3 without any error regarding png or libpng-devel. BUT, php scripts using libpng-devel are not running or executing properly.

Without an error message debuging is difficult. I had these files:

/usr/lib
libpng.a
libpng.so
libpng.so.3
libpng.so.3.1.2.7

/usr/lib
libpng12.a
libpng12.so
libpng12.so.0
libpng12.0..1.2.7

/usr/include/
pngconf.h
png.h

I have been runing Apache and PHP for many years but libpng (libpng-devel)have been always something problematic to setup.

I removed libpng and performed an:
up2date libpng
up2date libpng-devel

ran configured, make, and make install but still the php script can't use png functions. Or do I have to restart server before trying to configure make and install?

Unlesss there is a symlink complication...

Any help will be appreciated. I have searched the web for clarification but no luck...

TIA
 
Old 06-25-2007, 02:44 AM   #2
bathory
Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 10,908

Rep: Reputation: 1326Reputation: 1326Reputation: 1326Reputation: 1326Reputation: 1326Reputation: 1326Reputation: 1326Reputation: 1326Reputation: 1326Reputation: 1326
Quote:
ran configured, make, and make install but still the php script can't use png functions.
I guess you you compiled php from sources? What are exactly the options you used to configure php?
Also run:
Code:
ldd /usr/bin/php
to see where it looks for the libpng libraries (you should change the path to php accordingly of course).

Regards

Last edited by bathory; 06-26-2007 at 01:49 AM.
 
Old 06-25-2007, 06:46 PM   #3
latino
Member
 
Registered: Aug 2003
Location: Puerto Rico
Distribution: RHEL 5.5
Posts: 141

Original Poster
Rep: Reputation: 15
Hi:

Hmm something may look wrong here....Shows NO libpng nor libpng-devel information...

However ldd /usr/local/bin/php shows:

libpng12.so.0 => /usr/lib/libpng12.so.0


PHP Configuration used was:
'./configure' '--with-gd' '--with-zlib-dir=/usr/include/' '--with-mysql' '--with-ttf' '--with-mysql-sock=/var/lib/mysql/mysql.sock' '--enable-shared' '--enable-static' '--with-apxs2=/usr/local/apache2/bin/apxs' '--with-jpeg-dir=/usr/lib' '--with-png-dir=/usr' '--with-xml' '--with-gettext' '--enable-gd-native-ttf' '--enable-calendar' '--with-domxml=/usr/lib/libxml2' '--enable-mbstring' '--enable-mbregex' '--enable-gd-imgstrttf'

TIA


Last edited by latino; 06-25-2007 at 06:58 PM.
 
Old 06-26-2007, 01:59 AM   #4
bathory
Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 10,908

Rep: Reputation: 1326Reputation: 1326Reputation: 1326Reputation: 1326Reputation: 1326Reputation: 1326Reputation: 1326Reputation: 1326Reputation: 1326Reputation: 1326
Quote:
'--with-png-dir=/usr'
Should the path to libpng be: /usr/lib.
 
Old 06-26-2007, 06:41 PM   #5
latino
Member
 
Registered: Aug 2003
Location: Puerto Rico
Distribution: RHEL 5.5
Posts: 141

Original Poster
Rep: Reputation: 15
hmmm

strange I tried also with /usr/lib... Tried also with php 5.2.3 (previously used php 5.2.4-Dev)

No luck.


Last edited by latino; 06-26-2007 at 07:29 PM.
 
Old 06-27-2007, 02:04 AM   #6
bathory
Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 10,908

Rep: Reputation: 1326Reputation: 1326Reputation: 1326Reputation: 1326Reputation: 1326Reputation: 1326Reputation: 1326Reputation: 1326Reputation: 1326Reputation: 1326
When you say that the scripts using libpng are not executed properly, can you be more specific, or could you post such a script and the errors you get.
Meanwhile try to remove libpng and libpng-devel, and compile it from sources. Take care to use a "--prefix=/usr" to put it under /usr/lib and after compiling and installing, run
Code:
ldconfig
to rebuild the libs cache. Then in the directory you've extracted php, run:
Code:
make clean
and then run the ./configure with the options you want. Mind that you can use just "--with-png" without the path to the library. In fact you can do this also for zlib and jpeg (there is no need to specify the library directory).
 
Old 06-27-2007, 06:15 PM   #7
latino
Member
 
Registered: Aug 2003
Location: Puerto Rico
Distribution: RHEL 5.5
Posts: 141

Original Poster
Rep: Reputation: 15
Hi:

Well, I know libpng or png functionality is not working because I know how some functionality of three php scripts worked before I loose that configuration. That functionality is gone after an upgrade to PHP, and upgrades to c and gcc and probably other system components.

I also used make clean when installing PHP, will compile from sources but this is frustrating...

Thanks for your help dude!!

 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
error while loading shared libraries: libpng.so.2: [I reinstalled libPNG!] Shioni Linux - Software 1 09-09-2006 07:21 PM
libpng and libpng-devel missing in mplayer configure mmarkvillanueva Linux - Software 2 11-29-2005 10:40 PM
Not installing libpng-devel on CL10 sanmartin Linux - Software 0 02-16-2005 02:51 PM
MPlayer install problems with libpng & libpng-devel Trey2501 Linux - Newbie 18 03-05-2004 11:24 PM
mplayer and gtk-devel and libpng-devel ... purpleburple Linux - Software 1 03-16-2003 03:57 AM


All times are GMT -5. The time now is 04:55 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration