[PC-BSD Testing] ya lost in Documentation Forest

A.Yerenkow yerenkow at uct.ua
Wed Dec 17 01:45:44 PST 2008


On 17.12.2008 11:32, Walt Pawley wrote:
> I need to learn a little PHP. So, I installed Apache 2.2 on my
> PC-BSD and php5 1.5.1 box via pkg_add. Apache served HTML and
> CLI php worked, but embedded php commands didn't do anything
> and *.php files simply browsed as plain text. After mucking
> about in some docs, I pkg_delete'd php5 and built php5 from
> ports. This method seemed to generate files the docs talked
> about that had been missing. This was nice, but didn't get
> anything working. I've reading and experimenting with
> configuration directives, etc. I notice that apachectl simply
> hands the parameter to httpd, so I tried stop followed by start
> as well as restart (didn't make any discernable difference).
>
> This should be really simple but I'm apparently not up to it.
> Anyone willing to provide step-by-step's?
>    
For php, you should have in /usr/local/etc/apache22/httpd.conf such lines:
(put this line around other modules loads;)
LoadModule php5_module        libexec/apache22/libphp5.so

and, most important:
in some section (I currently see that my case it is mime_module)
<IfModule mime_module>
....
blablabla.....
....

(You must insert this)
     AddType application/x-httpd-php .php
     AddType application/x-httpd-php-source .phps

......
</IfModule>

after that
/usr/local/etc/rc.d/apache22 configtest
and if all OK
/usr/local/etc/rc.d/apache22 restart


BTW, this is barely relative to PC-BSD mailing list ;)

> FWIW: I have one other issue that doesn't seem to be responding
> to what I think the docs are telling me - language negotiation.
> Instead of providing the Acceptable file, it provides the
> type-map to the browser. I can live without fixing that but I
> suspect it might be a related issue.
>    



More information about the Testing mailing list