Table of Contents:
I love OpenBSD's new package configuration for php4.
The core application is one package and each subsequent module you want to incorporate for php4 is merely a package that needs to be installed (whereas in previous packages a whole package had to be deinstalled and reinstalled.)
Environment: OpenBSD 3.3 current, i386
[ref: http://www.php.net/manual/en/install.openbsd.php]
Read the above, clear and step-by-step, installation instructions.
Please remember to read the instructions specified after each package installation. You will be prompted, required at times to execute a program which will organise the binaries on your system, or to make changes to /var/www/conf/httpd.conf.
If you have followed the php4 installation correctly, then there should be no need to make additional changes to the apache configuration file.
Create a test php file called test.php with the following command:
| # echo "<?php phpinfo() ?>" > /var/www/htdocs/test.php |
Here, we have created a text file called test.php in our web directory. In this file is the php function 'phpinfo()' which will display runtime information concerning the active version of php.
Checking whether php has installed with the web server.
| # lynx localhost/test.php |
|
[ lynx displays the following ...]
PHP Version 4.0.4pl1 System OpenBSD hostname 2.8 GENERIC#399 i386 Build Date Today's Date _______________________________________________________________________________________________________________ [ ... more stuff cut out ... ] |
Of course if you have a browser that supports tables (AOL Navigator, or Microsoft Internet Explorer) then it would a look a lot nicer.
Further test scripts are available, but once the above is working you know you have a 'working' php configuration. The additional scripts can help you with debugging errors or if there are specific components you need to review. Two directories (test, tests) hold a number of different tests for checking the functionality of your php configuration.
Previous releases of this documentation are available for OpenBSD < 3.0, OpenBSD 3.2
Copyright (c) 2000/1/2 Samiuela LV Taufa. All Rights Reserved.
I reserve the right to be totally incorrect even at the best advice of betters. In other words, I'm probably wrong in enough places for you to call me an idiot, but don't 'cause you'll hurt my sensibilities, just tell me where I went wrong and I'll try again.
You are permitted and encouraged to use this guide for fun or for profit as you see fit. If you republish this work in what-ever form, it would be nice (though not enforceable) to be credited.
|
php4 - scripting the web. |
Copyright © 2000/1/2 NoMoa Publishers All rights reserved. Caveat Emptor