Sections
|
 |
 |
 |
PHP and OpenBSD
PHP (4.0.6) installation process I followed:
- Download the PHP source package:
wget 'http://www.php.net:8000/distributions/php-4.0.6.tar.gz'
- Extract the sources:
tar xvfz php-4.0.6.tar.gz
And cd to the php-4.0.6 directory.
- Configure PHP:
./configure --with-apxs --with-mysql=/usr/local \
--with-config-file-path=/var/www/conf --disable-xml \
--disable-pear --enable-bcmath --enable-magic-quotes
Leave out the --with-mysql=/usr/local option if you don't want
MySQL support or MySQL is not installed.
- Compile PHP:
make > /dev/null
- Stop Apache:
/usr/sbin/apachectl stop
- Install the PHP module:
make install
or copy the libphp4.so.0.0 in the .libs/ directly
to /usr/lib/apache/modules/libphp4.so if you like that better (-:
- Edit
/var/www/conf/httpd.conf:
Make sure that the following line is present and commented out:
LoadModule php4_module /usr/lib/apache/modules/libphp4.so
Search for "#AddType application/x-httpd-php .php" and remove the # in
front of it, thereby telling Apache the line isn't a comment anymore.
I added also the .php3 extenstion to it, so files ending in .php3 are also
processed by the PHP engine. The end result:
AddType application/x-httpd-php .php .php3
- Start Apache:
/usr/sbin/apachectl start
|