Apache2 PHP5 not starting | Unix Linux Forums | Solaris

  Go Back    


Solaris The Solaris Operating System, usually known simply as Solaris, is a Unix-based operating system introduced by Sun Microsystems. The Solaris OS is now owned by Oracle.

Apache2 PHP5 not starting

Solaris


Closed Thread    
 
Thread Tools Search this Thread Display Modes
    #1  
Old 04-22-2009
RobertSubnet RobertSubnet is offline
Registered User
 
Join Date: Dec 2008
Last Activity: 3 December 2009, 3:07 AM EST
Posts: 38
Thanks: 0
Thanked 0 Times in 0 Posts
Apache2 PHP5 not starting

Hello all. I have a Solaris 10/Sun Ultra10 box and I am trying to build a SAMP server.

The MySQL portion is working and Apache2 seems to be working. However after installing PHP5 I get the following error:

# ./apachectl start
httpd: Syntax error on line 115 of /usr/local/apache2/conf/httpd.conf: Cannot load /usr/local/apache2/modules/libphp5.so into server: ld.so.1: httpd: fatal: libmysqlclient.so.15: open failed: No such file or directory
# cd /usr/local/apache2/modules
# ls -l libphp5.so
-rwxr-xr-x 1 bin bin 7157740 Sep 28 2008 libphp5.so

The crazy thing is, the file libphp5.so is there in the /modules directory as the output shows.

Google is not very helpful. I was wondering if anyone here might have some ideas as to why I am getting this when trying to restart Apache.

I have the following two lines in my httpd.conf file to load php:

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

Thank you for your thoughts.
~Robert
Sponsored Links
    #2  
Old 04-22-2009
cbkihong cbkihong is offline Forum Advisor  
Advisor
 
Join Date: Sep 2002
Last Activity: 4 May 2014, 6:22 AM EDT
Location: Hong Kong, China
Posts: 1,622
Thanks: 0
Thanked 9 Times in 8 Posts
It is complaining on being unable to load the mysql dynamic library. Check that the file exists on your system and verify with commands such as ldd (not sure if exists on Solaris).
Sponsored Links
    #3  
Old 04-23-2009
RobertSubnet RobertSubnet is offline
Registered User
 
Join Date: Dec 2008
Last Activity: 3 December 2009, 3:07 AM EST
Posts: 38
Thanks: 0
Thanked 0 Times in 0 Posts
I think you are correct here is the ldd output from the php/bin directory:

/usr/local/php/bin
# ldd php
<deleted above output>
libmysqlclient.so.15 => (file not found)

I searched for the file:

# find / -name "libmysqlclient.so.15" -print
/usr/local/apache2/modules/libmysqlclient.so.15
/opt/mysql/mysql/lib/libmysqlclient.so.15
#

I copied it over to the apache2/modules directory from /opt/mysql/mysql/lib and still Apache is not seeing it.

The file exists on my system, how do I make Apache "see" it?

(Sorry if this is a newbie question)

Thank you for you help!
    #4  
Old 04-23-2009
cbkihong cbkihong is offline Forum Advisor  
Advisor
 
Join Date: Sep 2002
Last Activity: 4 May 2014, 6:22 AM EDT
Location: Hong Kong, China
Posts: 1,622
Thanks: 0
Thanked 9 Times in 8 Posts
No, don't put it in the apache modules. Put a link (a copy) at the system library directory that is on the search path.

Use crle(1) to check what are on the search path.
Sponsored Links
    #5  
Old 04-23-2009
pupp's Avatar
pupp pupp is offline Forum Advisor  
cap_10hdx 1
 
Join Date: Feb 2008
Last Activity: 22 September 2010, 2:56 PM EDT
Location: Jersey Shore
Posts: 647
Thanks: 0
Thanked 0 Times in 0 Posts
use crle for a more permanent solution or you can quickly assign your $LD_LIBRARY_PATH variable to where this library is residing.
Sponsored Links
    #6  
Old 04-23-2009
RobertSubnet RobertSubnet is offline
Registered User
 
Join Date: Dec 2008
Last Activity: 3 December 2009, 3:07 AM EST
Posts: 38
Thanks: 0
Thanked 0 Times in 0 Posts
cbkihong:

I really appreciate all of your help! Here is what I have done, I have added a link in my /usr/lib directory to point to the libmysqlclient.so.15 file.

lrwxrwxrwx 1 root root 41 Apr 23 06:47 libmysqlclient.so.15 -> /opt/mysql/mysql/lib/libmysqlclient.so.15

Now when attempting to start apache I get the following:

/usr/local/apache2/bin>./apachectl start
httpd: Syntax error on line 114 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
/usr/local/apache2/bin>

I looks like the libgd is now complaining.
Sponsored Links
    #7  
Old 04-23-2009
RobertSubnet RobertSubnet is offline
Registered User
 
Join Date: Dec 2008
Last Activity: 3 December 2009, 3:07 AM EST
Posts: 38
Thanks: 0
Thanked 0 Times in 0 Posts
I did some reading on crle and I entered the following:

# crle -l /lib -l /usr/lib -l /opt/mysql/mysql/lib

I did a system reboot and tried to start apache again. It looks like I get the same libgd error:

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

Thanks again guys for your help!
Sponsored Links
Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
How to use Suexec with Apache2 ? kernings UNIX for Dummies Questions & Answers 1 03-10-2008 10:41 PM
install apache2 in bsd 6.2 tamayo BSD 2 12-04-2007 02:29 PM
apache2 ldap hassan1 SuSE 0 01-29-2006 12:02 PM



All times are GMT -4. The time now is 09:28 PM.