# Apache won't start, needs libmysqlclient.so.15 - help?



## kutu62 (Jan 29, 2010)

After installing apache, mysql and php I tested it to a static and php test page and it works fine.

I then install Wordpress and now apache won't even start.


```
# more /var/log/httpd-error.log
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/local/lib/php/20060613/mysql.so' - Shared object 
"libmysqlclient.so.15" not found, required by "mysql.so" in Unknown on line 0
bigkill#
```

so I need libmysqlclient.so.15


```
# locate libmysqlclient.so.15
# locate libmysqlclient.so.16
/usr/local/lib/mysql/libmysqlclient.so.16
#
```

How do I obtain libmysqlclient.so.15? Don't want to use RPM.. 
*What can I do to avoid this in the future?*

Yesterday and today I have tried various things to try and resolve this.. mostly research but I haven't gotten anywhere. Any help would be appreciated.


----------



## SirDice (Jan 29, 2010)

How did you install php? Did you also install php5-extensions?


----------



## DutchDaemon (Jan 29, 2010)

```
# pkg_info -W /usr/local/lib/mysql/libmysqlclient.so.16
/usr/local/lib/mysql/libmysqlclient.so.16 was installed by package mysql-client-5.1.42
```


```
# pkg_info -W /usr/local/lib/mysql/libmysqlclient.so.15
/usr/local/lib/mysql/libmysqlclient.so.15 was installed by package mysql-client-5.0.89
```

Wordpress depends on databases/php5-mysql, which in turn depends on databases/mysql50-client or databases/mysql51-client (checked on different servers .. so it depends on which mysql it finds, it seems).

Perhaps reinstalling some stuff in a prticular order may help. It looks like your Wordpress expects Mysql 5.0, while you have MySQL 5.1 installed. I'd start with trying to reinstall databases/php5-mysql, hoping it will pick up your current MySQL version correctly and pass the dependency on to Wordpress.


----------



## SirDice (Jan 29, 2010)

It looks like you have some discrepancies in your dependencies (try saying that when you're drunk  ).

The default version is 5.0.x if I'm not mistaken. However most ports will use whichever version is installed.

Add to /etc/make.conf:

```
DEFAULT_MYSQL_VER=51
```
51 will install 5.1.x or you can set it to 55 or 60 for 5.5.x and 6.0.x resp. This will make sure that any port that depends on mysql will install the same version.


----------



## kutu62 (Jan 29, 2010)

DutchDaemon said:
			
		

> I'd start with trying to reinstall databases/php5-mysql, hoping it will pick up your current MySQL version correctly and pass the dependency on to Wordpress.



That cleared out the error in the log however apache still won't start.. =(

nothing of relevance in httpd-error.log

looked for more logs from today in /var/log

```
localhost# ls -la | grep 29
drwxr-xr-x   2 root  wheel      1536 Jan 29 15:34 .
-rw-------   1 root  wheel     19559 Jan 29 14:58 auth.log
-rw-------   1 root  wheel     12911 Jan  8 00:00 auth.log.0.bz2
-rw-------   1 root  wheel     75293 Jan 29 15:45 cron
-rw-------   1 root  wheel     43617 Jan 29 03:02 dmesg.today
-rw-r--r--   1 root  wheel       464 Jan 29 15:39 httpd-error.log
-rw-r--r--   1 root  wheel     34580 Jan 29 12:00 lastlog
-rw-r-----   1 root  wheel      2651 Jan 29 03:02 maillog
-rw-r-----   1 root  wheel      1514 Jan 29 00:00 maillog.0.bz2
-rw-r--r--   1 root  wheel     61587 Jan 29 15:39 messages
-rw-r-----   1 root  wheel       728 Jan 29 03:02 sendmail.st
-rw-r--r--   1 root  wheel      6952 Jan 29 12:00 wtmp
```

only one that looked ot have info relevant to this situation is

/var/log/messages

```
Jan 29 15:00:56 localhost kernel: pid 11649 (httpd), uid 0: exited on signal 11 (core dumped)
```

Maybe uninstall apache22 and reinstall?


----------



## kutu62 (Jan 29, 2010)

hmm I increase the log level and get this when starting apache in httpd log.


```
[Fri Jan 29 16:59:59 2010] [warn] RSA server certificate CommonName (CN) `John Doe' does NOT match server name!?
```

I set the CN to make the output of "hostname" and the error remains.

But still reading about the log message "httpd exited on signal 11" on google leads me to believe I may have a hardware issue.

I'll let you know how it turns out.. any suggestions welcome.


----------



## kutu62 (Jan 29, 2010)

Forget about it.. I'm having the host reinstall FreeBSD and I'm going to install all the ports again.. apache, php, sql, phpmyadmin, wordpress

hopefully the little I have learned up to this point will ensure I install it all correct.. seems more like I need to install in the right order! whatever that may be!


----------



## anomie (Jan 29, 2010)

kutu62 said:
			
		

> ```
> [Fri Jan 29 16:59:59 2010] [warn] RSA server certificate CommonName (CN) `John Doe' does NOT match server name!?
> ```
> 
> I set the CN to make the output of "hostname" and the error remains.



FYI, that sounds like your CSR (and, by extension, your cert) had "John Doe" provided for its common name. 

Try this: 

```
# openssl x509 -text -in server.crt 
Certificate:
        Issuer: C=US, ST=Texas, L=Newbury, O=Foo, Inc., CN=John Doe
        Validity
            Not Before: Jan 29 22:37:40 2010 GMT
            Not After : Jan 29 22:37:40 2011 GMT
...
```


----------



## DutchDaemon (Jan 31, 2010)

How's this coming along?


----------



## kutu62 (Feb 1, 2010)

Thanks for asking DD. I actually just logged in to update you all.

Thanks to all the info here on the forum and with all the support and helping hands I have apache working fine.

I had the host reinstall FreeBSD for me and I install the ports in the following order.

1. PHP
2. APACHE
3. MYSQL v 5.0.89
4. PHPMYADMIN
5. WORDPRESS

Currently load testing the site to see if I'll stick with this server. If load testing goes fine I'll review the needed port updates and work on a upgrade process.. if I can logically handle the upgrade process I'll migrate all my shared hosting sites to this dedicated freebsd install. Still leery about making the move from managed to unmanaged but price / performance is a must. This BSD server admin stuff is a bit foreign but with all your help and some elbow grease on my part, it should all work out.


----------

