|
OpenBSD installation notesThis section contains notes and hints specific to installing PHP on » OpenBSD 3.6. Using binary packages to install PHP on OpenBSD is the recommended and simplest method. The core package has been separated from the various modules, and each can be installed and removed independently from the others. The files you need can be found on your OpenBSD CD or on the FTP site.
The main package you need to install is Example 2.6. OpenBSD Package Install Example# pkg_add php4-core-4.3.8.tgz Read the » packages(7) manual page for more information about binary packages on OpenBSD. You can also compile up PHP from source using the » ports tree. However, this is only recommended for users familiar with OpenBSD. The PHP 4 port is split into two sub-directories: core and extensions. The extensions directory generates sub-packages for all of the supported PHP modules. If you find you do not want to create some of these modules, use the no_* FLAVOR. For example, to skip building the imap module, set the FLAVOR to no_imap.
Older releases of OpenBSD used the FLAVORS system to compile up a statically linked PHP. Since it is hard to generate binary packages using this method, it is now deprecated. You can still use the old stable ports trees if you wish, but they are unsupported by the OpenBSD team. If you have any comments about this, the current maintainer for the port is Anil Madhavapeddy (avsm at openbsd dot org). Code Examples / Notes » install.unix.openbsdsanchero
On OpenBSD 3.2, given the steps outlined above using pre-built packages you will get a new "/var/www/conf/httpd.conf" that contains a section like this: <IfDefine SSL> AddModule mod_ssl.c AddModule mod_php4.c </IfDefine> This causes mod_php4 to load only when starting Apache w/SSL, so if this isn't what you want add the mod_php4 line again above (or below) this section, like so: AddModule mod_php4.c <<------ SEE? - now should load normally. <IfDefine SSL> AddModule mod_ssl.c AddModule mod_php4.c </IfDefine> I also added this for good measure: <IfModule mod_php4.c> AddType application/x-httpd-php .php [blah blah] </IfModule> Seems to work. ameen
I just finished spinning my wheels with PHP/Apache on OpenBSD 3.3, and it took a Google to fix my problem. I followed the instructions by (0429196301 at netcabo dot pt) written on Sep 19, 2003 and kept being fed a segmentation fault when I tried to start httpd. Then I read the page cited below that suggested playing with the order of the LoadModules, and put the PHP first. I followed that recommendation and httpd started without problems! Page that saved me: http://archives.neohapsis.com/archives/openbsd/2002-04/3074.html "Change around the order of the Apache modules, this is one of the drawbacks to the module API for Apache 1.3 is that the order is very important. I would try making the PHP 4 module first, Perl module second and FP module last. " openbsd-fanatic
I am user that is just migrating to open source and thought I would take openbsd for a spin. This article, by Gregory L. Magnusson, really helped me to get a working apache-php-mysql server going on openbsd. http://www.devx.com/security/Article/28059/0/page/1 hg
Also you should add "-a /var/www/dev/log" to the syslogd_flags for propper logging of php-extensions like imap.so and create a /var/www/etc/master.passwd with an www-user-entry and run pwd_mkdb -d /var/www/etc /var/www/etc/master.passwd for propper use of libc-client.a functions in imap.so. |