# Php5 and Apache2 help



## manilaboy1vic (Oct 16, 2010)

I am having problems with PHP and Apache.

I installed PHP5 from port and it failed.  I did a package add and it was giving errors with gallery.  So I uninstalled PHP5 and Gallery and decided to install PHP5 from source via the PHP site.

I installed it just fine.  Added the lines of config to httpd.conf.  Apache gives me an error about libphp5.so not being found.  I use the locate command and find libphp5.so in ports, so I copied over to the path in httpd.conf.

Here is what is bugging me.


```
hbca# php -v
PHP 5.3.3 (cli) (built: Oct 16 2010 11:32:03)
Copyright (c) 1997-2010 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies
hbca#
```

I see version 5.3.3, but when I make an phpinfo file for my web server I see the wrong version:

http://67.49.120.184/phpinfo.php

Any help would be appreciated.


----------



## manilaboy1vic (Oct 16, 2010)

I am thinking that libphp5.so is from whatever version is in ports or my pkg_add earlier..  It seems as though the correct libphp5.so file was not created with my install from source.


----------



## SirDice (Oct 18, 2010)

manilaboy1vic said:
			
		

> I installed PHP5 from port and it failed.


Failed how?



> I did a package add and it was giving errors with gallery.


The package doesn't contain the apache module.



> So I uninstalled PHP5 and Gallery and decided to install PHP5 from source via the PHP site.


Please don't. If you do you really are on your own. You really should put some time and effort into getting the port to build.


----------



## manilaboy1vic (Oct 22, 2010)

I did a fresh install since this was so out of whack.. PHP is working fine now, along with gallery3 and wordpress.

I will never install from source again unless it's just not in the Ports Collection.


----------

