Apache2 PHP5 not starting


 
Thread Tools Search this Thread
Operating Systems Solaris Apache2 PHP5 not starting
# 1  
Old 04-22-2009
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
# 2  
Old 04-23-2009
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).
# 3  
Old 04-23-2009
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
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.
# 5  
Old 04-23-2009
use crle for a more permanent solution or you can quickly assign your $LD_LIBRARY_PATH variable to where this library is residing.
# 6  
Old 04-23-2009
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.
# 7  
Old 04-23-2009
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!
Login or Register to Ask a Question

Previous Thread | Next Thread

2 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

How to grep a line not starting with # from a file (there are two lines starting with # and normal)?

e.g. File name: File.txt cat File.txt Result: #INBOUND_QUEUE=FAQ1 INBOUND_QUEUE=FAQ2 I want to get the value for one which is not commented out. Thanks, (3 Replies)
Discussion started by: Tanu
3 Replies

2. UNIX for Advanced & Expert Users

compiling php5 on solaris 9. please help.

I'm trying to compile PHP5. I've installed mysql5 successfully and apache1.3 is working great, but I get the message below when I compile PHP5. I double checked if I have libxml2 installed and I do. I installed libxml2 binary from sunfreeware. Please see below for details: ./configure... (5 Replies)
Discussion started by: xnightcrawl
5 Replies
Login or Register to Ask a Question