LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Other *NIX Forums > Solaris / OpenSolaris
User Name
Password
Solaris / OpenSolaris This forum is for the discussion of Solaris, OpenSolaris, OpenIndiana, and illumos.
General Sun, SunOS and Sparc related questions also go here. Any Solaris fork or distribution is welcome.

Notices


Reply
  Search this Thread
Old 04-08-2009, 02:00 PM   #1
ventas
LQ Newbie
 
Registered: Apr 2009
Posts: 8

Rep: Reputation: 0
Error starting apache


Hi,
I have install apache 2.2.11 from www.sunfreeware.com and php 5.2.6 with all the dependencies (gd and libpng included).

Added :
LoadModule php5_module modules/libphp5.so
AddType application/x-httpd-php .php

to the httpd.conf file, I tried to remove libpng as suggested on other thread but did not work.

I get the following error while starting apache:

root@development # apachectl start
httpd: Syntax error on line 113 of /usr/local/apache2/conf/httpd.conf: Cannot load /usr/local/apache2/modules/libphp5.so into server: ld.so.1: httpd: fatal: relocation error: file /usr/local/lib/libgd.so.2: symbol png_get_error_ptr: referenced symbol not found

Additional info of the system:

root@development # uname -a
SunOS development 5.9 Generic_118558-34 sun4u sparc SUNW,Ultra-5_10

root@development # ldd /usr/local/lib/libgd.so.2
libXpm.so.4 => /usr/openwin/lib/libXpm.so.4
libX11.so.4 => /usr/openwin/lib/libX11.so.4
libjpeg.so.62 => /usr/local/lib/libjpeg.so.62
libfontconfig.so.1 => /usr/local/lib/libfontconfig.so.1
libfreetype.so.6 => /usr/local/lib/libfreetype.so.6
libpng12.so.0 => /usr/local/lib/libpng12.so.0
libz.so => /usr/local/lib/libz.so
libm.so.1 => /usr/lib/libm.so.1
libc.so.1 => /usr/lib/libc.so.1
libXext.so.0 => /usr/openwin/lib/libXext.so.0
libsocket.so.1 => /usr/lib/libsocket.so.1
libnsl.so.1 => /usr/lib/libnsl.so.1
libdl.so.1 => /usr/lib/libdl.so.1
libexpat.so.0 => /usr/local/lib/libexpat.so.0
libgcc_s.so.1 => /usr/local/lib/libgcc_s.so.1
libiconv.so.2 => /usr/local/lib/libiconv.so.2
libmp.so.2 => /usr/lib/libmp.so.2
/usr/platform/SUNW,Ultra-5_10/lib/libc_psr.so.1

root@development # ldd /usr/local/lib/libpng12.so.0
libz.so => /usr/local/lib/libz.so
libm.so.1 => /usr/lib/libm.so.1
libiconv.so.2 => /usr/local/lib/libiconv.so.2
libc.so.1 => /usr/lib/libc.so.1
libgcc_s.so.1 => /usr/local/lib/libgcc_s.so.1
libdl.so.1 => /usr/lib/libdl.so.1
/usr/platform/SUNW,Ultra-5_10/lib/libc_psr.so.1


root@development # pkginfo |grep png
application SMClibpng libpng
system SUNWpng PNG - Portable Network Graphics library
GNOME2 SUNWpngx PNG - Portable Network Graphics library (64-bit)

root@development # /usr/local/php/bin/php -v
PHP 5.2.6 (cli) (built: Sep 28 2008 07:28:14)
Copyright (c) 1997-2008 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2008 Zend Technologies


root@development # httpd -v
Server version: Apache/2.2.11 (Unix)
Server built: Jan 5 2009 23:19:48


any ideas? I can provide with any other info.

Thanks
 
Old 04-15-2009, 03:13 PM   #2
kentyler
Member
 
Registered: Dec 2008
Location: Newark Ohio
Distribution: Fedora Core
Posts: 270

Rep: Reputation: 38
It is not clear in your post if you built php for apache. I can tell you did and you may try:

cp /usr/local/apache2/bin/apu-1-config /usr/bin

cp /usr/local/apache2/bin/apr-1-config /usr/bin


then rebuild your php it should work. Put back the libpng and make sure the crle is set properly to find all the libs.

Odd question for linuxquestions.
 
Old 04-16-2009, 04:14 AM   #3
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Quote:
to the httpd.conf file, I tried to remove libpng as suggested on other thread but did not work.
In the other post you mentioned, apart from the fact that it was for Solaris 10, the OP said it removed libpng and it worked, because AFAICT he removed the SMClibpng package (libpng provided by sunfreeware) and left with the native SUNWpng package where the symbol is defined.
You can see the difference (it's for Sol10, but I guess it's the same for Sol9)
Code:
Package SMClibpng
nm /usr/local/lib/libpng.so|grep png_get_error_ptr
[187]   |         0|       0|NOTY |GLOB |0    |UNDEF  |png_get_error_ptr

Packge SUNWpng
nm /usr/sfw/lib/libpng.so|grep png_get_error_ptr
[623]   |    115024|       8|FUNC |GLOB |0    |7      |png_get_error_ptr
So, you can also remove the libpng package from sunfreeware (SMClibpng), and leave only SUNWpng from your installation media. Or you can use LD_LIBRARY_PATH and put "/usr/sfw/lib" in front of "/usr/local/lib", so php/gd uses the SUNWpng libpng

Regards
 
  


Reply



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 starting Apache with PHP rajaniyer123 Solaris / OpenSolaris 21 06-09-2009 12:12 PM
Apache Virtual Hosts (strange warning error when starting) Maeltor Linux - Software 2 06-08-2006 02:48 PM
Apache Virtual Hosts (strange warning error when starting) Maeltor Linux - Kernel 1 06-08-2006 10:47 AM
Error starting Apache buddhahat Slackware 3 06-13-2005 08:59 PM
Error when starting Apache undefined symbol: __db_ndbm_fetch_4002 SimonT Debian 2 10-03-2004 12:10 AM

LinuxQuestions.org > Forums > Other *NIX Forums > Solaris / OpenSolaris

All times are GMT -5. The time now is 02:52 AM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration