Web Mail


Single IP

Project Links
resume
about me
about server
user land
webmail

Photo Albums
bpfountz
lpfountz
twice DIGITAL

Web Pages
bpfountz
lpfountz

Reviews
3054CB
Netgate Q&A
5354AP1 Aries2

You are visiting...
The DigitalPimp


created by:
 Ben Pfountz
Untitled Document
Setting Up PHP5

FreeBSD 4.9-STABLE

The Digitalpimp Collection

Ben Pfountz

Oct 28, 2004

 

NOTE: These instructions will setup and install the PHP port, both the apache module and the command line interface.

 

cd /usr/ports/textproc/libxml2

make clean

make rmconfig

make

[chose default options]

make deinstall

make install

make clean

 

NOTE: using this port will install both the CLI as well as the apache module. If you are not going to use the CLI, then use /usr/ports/www/mod_php5.

 

cd /usr/ports/lang/php5

make clean

make rmconfig

Adjust Makefile.ext to work with mysql5 via the BROKEN_WITH_MYSQL option.

make

 

You can now apply any patches to PHP that may be necessary. I am adding the upload statistics patch found at http://pdoru.from.ro/.

  • First we need to patch PHP
  • <to be written>
  • Next we need to install the extension
  • cd upload_progress_meter
  • I prefer the patch to not delete the upload statistics file after the upload is complete. This allows me to check the size of the uploaded file against the expected size, and delete the file if it is not complete. For behaviour, search for the term 'UNLINK' within upload_progress_meter.c, and comment out that line.
  • phpize
  • NOTE: I had to search and remove the option '--no-verify' in the file configure script.
  • ./configure
  • make
  • make install
  • edit /usr/local/etc/php/extensions.ini, and add 'extension=upload_progress_meter.so'
  • after install, be sure to restart apache, then check /var/log/httpd-error.log for startup errors.
  • edit /usr/local/etc/php.ini, add the following lines:
    • upload_progress_meter.store_method = "file"
    • upload_progress_meter.file = 1
    • upload_progress_meter.file.filename_template = "/tmp/upload_stats/upl_%s.txt"
  • mkdir /tmp/upload_stats
  • chmod [apache_user]:[apache_group] /tmp/upload_stats

.

make deinstall

make install

make clean

 

cd /usr/ports/lang/php5-extensions

make clean

make rmconfig

make

[chose calendar, ctype, exif, gd, mysql, mysqli, pcntl, pcre, posix, session, sockets, tokenizer, xml, zlib]

make deinstall

make install

[chose default options for gd]

make clean



You may wish to adjust your vim syntax file to handle .phps files in the same way as .php files:

/usr/local/share/vim/vim62/filetype.vim



Install Notes
a7v bios
os notes
os install
kernel cfg
ports update
vinum
soft updates
quotas
public pmsns
firewall
named
ppp
dhcpd
samba
apache+modssl
mod_php5
proftpd
qmail
blackhole
courier-imap
shared-folders
sqwebmail
skeleton
dependencies
nut
automount
net-snmpd
mrtg
system update
system config
formt floppy
wireless IPsec
bdes cdrw's
MySQL
Cert Auth
CPES AD 1
CPES AD 2
CPES Grp Plcy
AD1 <-> AD2
AD Reference