# unable to find libphp5.so lib with php5 installation



## abhayrathod (Apr 24, 2009)

Hi,

I am having freebsd 7 i386 installed. I have installed apache and php 5 from the precompiled tbz packages. However after configuring httpd.conf by adding 


```
LoadModule php5_module        libexec/apache22/libphp5.so
```

I have not installed apache 2.22 and php5 from ports.

Can any one please tell how can i get it installed from the precompiled packages. Which modules do I need to install additionally to get the libphp5.so lib installed from pre-compiled packages only.

Thanks


----------



## DutchDaemon (Apr 24, 2009)

Packages are simply precompiled ports. They install files in the exact same place, only faster. You should find that library at /usr/local/libexec/apache22/libphp5.so. I'm assuming you installed Apache before PHP5? That is the required order.


----------



## SirDice (Apr 24, 2009)

The php5 port doesn't build an apache module by default so it's quite likely that the package doesn't contain it.


----------



## abhayrathod (Apr 24, 2009)

I uninstalled apache, PHP and followed following steps
1. Installed apache
2. Installed php 5


```
# pkg_add apache-2.2.6_2.tbz
# pkg_add php5-5.2.5.tbz
```

Added following line to httpd.conf


```
LoadModule php5_module libexec/apache22/libphp5.so
```

Restarted apache and still getting following error


```
# /usr/local/etc/rc.d/apache22 reload
Performing sanity check on apache22 configuration:
httpd: Syntax error on line 105 of /usr/local/etc/apache22/httpd.conf: Cannot load /usr/local/libexec/apache22/libphp5.so into server: /usr/local/libexec/apache22/libphp5.so: Undefined symbol "__h_error"
```


----------



## DutchDaemon (Apr 24, 2009)

Where do these packages come from? They're seriously out of date. Try deinstalling them, and use:


```
pkg_add -r apache22 or
pkg_add -r apache-2.2.11_4
```
and

```
pkg_add -r php5 or
pkg_add -r php5-5.2.9
```


----------



## SirDice (Apr 27, 2009)

Build php5 from the ports, the apache module isn't selected by default. Hence the package doesn't contain the apache module. Probably due to the different versions of apache in the ports tree.


----------



## gilinko (Apr 27, 2009)

SirDice said:
			
		

> Build php5 from the ports, the apache module isn't selected by default. Hence the package doesn't contain the apache module. Probably due to the different versions of apache in the ports tree.



More probably due to that fact that one might be using lighttpd, and not apache at all


----------

