# I have broken php5 Freebsd 8-1



## jesse (Oct 11, 2010)

I get


```
make install
===>  Installing for php5-5.3.2_1
===>   php5-5.3.2_1 depends on file: /usr/local/sbin/apxs - found
===>   php5-5.3.2_1 depends on executable: pkg-config - found
===>   php5-5.3.2_1 depends on shared library: pcre.0 - found
===>   php5-5.3.2_1 depends on shared library: xml2.5 - found
===>   Generating temporary packing list
===>  Checking if lang/php5 already installed
"Makefile", line 601: warning: duplicate script for target "main/internal_functions.lo" ignored
Installing PHP SAPI module:       apache2handler
apxs:Error: file libphp5.la is not a DSO
*** Error code 1

Stop in /usr/ports/lang/php5/work/php-5.3.2.
*** Error code 1

Stop in /usr/ports/lang/php5.
*** Error code 1

Stop in /usr/ports/lang/php5.
```

I have run `make deinstall` 
How do I reinstall php.


----------



## roxanne (Oct 11, 2010)

`make install clean` may help.


----------



## SirDice (Oct 11, 2010)

This might be related:


> 20100518:
> AFFECTS: users of devel/apr0, devel/apr1, www/apache20, www/apache22
> AUTHOR: pgollucci@FreeBSD.org
> 
> ...


----------



## jesse (Oct 12, 2010)

Thank you for your replies. I need to learn about portmaster and portupgrade.

Have been trying to install this FreeBSD server just using 'pkg_add -r'.


----------



## jesse (Oct 12, 2010)

*Solved*



			
				roxanne said:
			
		

> `make install clean` may help.



I ended up running

`portsnap fetch extract`

`portmanager -u`

Then went to /usr/ports/lang/php5

`make install clean`

as php was not installed, now my only problem is php won't run any scripts except phpinfo()


----------



## SirDice (Oct 12, 2010)

If you want to use PHP in Apache you will have to build from source. The package only contains the CLI version, it does NOT contain the apache module.


----------



## dennylin93 (Oct 12, 2010)

Or you can use CGI (FastCGI would be better though).


----------

