# mod_php does not exist in binary format



## bsaidus (Mar 14, 2013)

Hi.

I'm trying to install PHP as a module for Apache from the tbz package and I have found that it's not included in binary format and if I want to use it I must install it from the port. So my question is: is there any tutorial on how to install PHP as a CGI for Apache?

Thank you.


----------



## SirDice (Mar 14, 2013)

bsaidus said:
			
		

> So my question is: is there any tutorial on how to install php as a cgi for apache.


It isn't rocket science.


```
cd /usr/ports/lang/php5
make install clean
(enable the Apache module)
```

Handbook: 5.6 Using the Ports Collection


----------



## bsaidus (Mar 16, 2013)

SirDice said:
			
		

> It isn't rocket science.
> 
> 
> ```
> ...



No, it isn't rocket science, but did you consider for a moment that there are people in this world who don't have an Internet connection?


----------



## chatwizrd (Mar 16, 2013)

Then how did they get FreeBSD in the first place?


----------



## ondra_knezour (Mar 16, 2013)

On FreeBSD machine connected to the internet do 
`# portsnap fetch update` (or extract, consult portsnap())
`$ cd /usr/ports/lang/php5`
`# make config`
select options you want
`# make fetch-recursive`


Then transfer at least /usr/ports/distfiles to machine without internet connection and run `# make install` with same options selected above. Both machines should share same version of ports tree, otherwise you will end with files downloaded for some port version and trying to build some older version, so I would prefer to copy whole /usr/ports from connected machine to second one.

By the way, from page linked above


> For users which cannot be connected all the time, the make fetch option is provided. Run this command within /usr/ports and the required files will be downloaded. This command also works in the lower level categories, such as /usr/ports/net. Note that if a port depends on libraries or other ports, this will not fetch the distfiles of ports from another category. Use make fetch-recursive to fetch all the dependencies of a port.



Reading definitely isn't rocket science


----------



## kpa (Mar 17, 2013)

Using FreeBSD in a system that does not have an internet connection is a very very small niche, it's not anymore worth catering specially to people who can not or will not follow the advancements in technology.


----------



## bsaidus (Mar 18, 2013)

People! I have internet at work, but at home no


----------

