/usr/ports/textproc/libxml2
libxml2-2.6.26.tar.bz2

cd /usr/ports/textproc/libxslt
===> Registering installation for libxslt-1.1.17

ftp://ftp.cac.washington.edu/imap/
make bsf SSLTYPE=none
ee c-client/LDFLAGS
rm -ldl
make bsf SSLTYPE=none

/usr/ports/mail/imap-uw
make install -DWITHOUT_SSL

rm -rf php-4.4.4
rm -rf apache_1.3.37
tar -zxf php-4.4.4.tar.gz
tar -zxf apache_1.3.37.tar.gz

cd apache_1.3.37 && ./configure

cd ../php-4.4.4
./configure –with-freetype-dir=/usr/local/include/freetype2 –with-mysql=/usr/local/mysql –with-apache=../apache_1.3.37 –with-gettext –enable-mod_charset –with-zlib –with-gd –with-jpeg-dir=/usr/local/include –with-dom –with-dom-xslt –with-iconv –with-imap=../imap-2006c1
make
make install

cd ../apache_1.3.37
./configure –prefix=/usr/local/apache –activate-module=src/modules/php4/libphp4.a –disable-module=all –server-uid=apache –server-gid=www –enable-module=vhost_alias –enable-module=env –enable-module=log_config –enable-module=log_referer –enable-module=mime –enable-module=negotiation –enable-module=status –enable-module=include –enable-module=autoindex –enable-module=dir –enable-module=cgi –enable-module=asis –enable-module=imap –enable-module=actions –enable-module=userdir –enable-module=alias –enable-module=rewrite –enable-module=access –enable-module=php4 –enable-module=auth –enable-module=setenvif –enable-suexec –suexec-caller=apache –suexec-docroot=/home/www/virtual –suexec-logfile=/usr/local/apache/logs/suexec.log –suexec-uidmin=5000 –suexec-gidmin=5000
make

killall httpd
cp ./src/httpd /usr/local/chroot/usr/local/apache/bin/
cp ./src/support/suexec /usr/local/chroot/usr/local/apache/bin/
chmod u+s /usr/local/chroot/usr/local/apache/bin/suexec

chroot /usr/local/chroot/ /usr/local/apache/bin/httpd -t
chroot /usr/local/chroot/ /usr/local/apache/bin/httpd

http://noc.smarthost.kiev.ua/info.php

bash-2.05b# /usr/local/apache/bin/httpd -l
Compiled-in modules:
http_core.c
mod_vhost_alias.c
mod_env.c
mod_log_config.c
mod_log_referer.c
mod_mime.c
mod_negotiation.c
mod_status.c
mod_include.c
mod_autoindex.c
mod_dir.c
mod_cgi.c
mod_asis.c
mod_imap.c
mod_actions.c
mod_userdir.c
mod_alias.c
mod_rewrite.c
mod_access.c
mod_auth.c
mod_setenvif.c
mod_php4.c
suexec: enabled; valid wrapper /usr/local/apache/bin/suexec

1. gunzip -c apache_1.3.x.tar.gz | tar xf –
2. cd apache_1.3.x
3. ./configure
4. cd ..

5. gunzip -c php-4.x.y.tar.gz | tar xf –
6. cd php-4.x.y
7. ./configure –with-mysql –with-apache=../apache_1.3.x
8. make
9. make install

10. cd ../apache_1.3.x

11. ./configure –prefix=/www –activate-module=src/modules/php4/libphp4.a
(The above line is correct! Yes, we know libphp4.a does not exist at this
stage. It isn’t supposed to. It will be created.)

12. make
(you should now have an httpd binary which you can copy to your Apache bin
dir if
is is your first install then you need to “make install” as well)

13. cd ../php-4.x.y
14. cp php.ini-dist /usr/local/lib/php.ini

15. You can edit /usr/local/lib/php.ini file to set PHP options.
Edit your httpd.conf or srm.conf file and add:
AddType application/x-httpd-php .php

long utf8_mime2text (SIZEDTEXT *src,SIZEDTEXT *dst,long flags);