Maybe this can help:
http://www.protoc.org/blog/2014/11/23/first-thoughts-on-the-new-openbsd-httpd-server/
I don't use php nor owncloud, but I use sqlite3 through C++ and my
understanding, and it works for me, is that required libraries must be in
/var/www/lib since this is a chroot environment.

libsqlite3 and libpthread are required by sqlite3.

$>ls -lh /var/www/usr/lib
total 62796
-r--r--r--  1 root  daemon   3.1M Dec 13 09:26 libc.so.77.0
-rw-r--r--  1 root  daemon   184K Jul  1 14:51 libcgicc.so.5.0
-rwxr-xr-x  1 root  daemon   7.0M Jul  1 09:25 libestdc++.so.16.0*
-r--r--r--  1 root  daemon   578K Dec 13 19:56 libm.so.8.0
-r--r--r--  1 root  daemon   578K Jun 29  2014 libm.so.9.0
-r--r--r--  1 root  daemon   4.3M Jun 29  2014 libperl.so.14.0
-r--r--r--  1 root  daemon   204K Jun 29  2014 libpthread.so.18.0
-r--r--r--  1 root  daemon   3.4M Dec 13 09:27 libsqlite3.so.27.0
-r--r--r--  1 root  daemon   5.4M Dec 13 19:58 libstdc++.so.55.0
-r--r--r--  1 root  daemon   5.5M Dec 13 09:35 libstdc++.so.57.0
-r--r--r--  1 root  daemon   128K Jun 29  2014 libutil.so.12.0
-r--r--r--  1 root  daemon   141K Dec 13 19:56 libutil.so.12.1


Mario


On Sun, Dec 28, 2014 at 10:22:19PM +0100, Clemens Goessnitzer wrote:
>>What do you have in /var/www/usr/lib
>
># ls -la /var/www/usr/
>total 16
>drwxr-xr-x   4 root  daemon  512 Dec 28 21:55 .
>drwxr-xr-x  14 root  daemon  512 Dec 28 20:59 ..
>drwxr-xr-x   2 root  daemon  512 Dec 26 23:29 sbin
>drwxr-xr-x   3 root  daemon  512 Dec 28 20:47 share
>
>No such directory.
>
>I also noticed a weird behaviour when trying to install with MySQL/MariaDB.
>When using localhost as db server host, it failed with error "Could not find
>driver". When using 127.0.0.1, it failed with error "User and/or password
>wrong", although I checked those twice.
>
>For database configuration, I followed the instructions given in the
>pkg-readme's for mariadb (section 'Chrooted deamons and MariaDB socket').
>
>quote from the pkg-readme for mariadb
>
>chrooted daemons and MariaDB socket
>===================================
>
>For external program running under a chroot(8) to be able to access the
>MariaDB server without using a network connection, the socket must be
>placed inside the chroot.
>
>e.g. httpd(8) or nginx(8): connecting to MariaDB from PHP
>---------------------------------------------------------
>Create a directory for the MariaDB socket:
>
>    # install -d -m 0711 -o _mysql -g _mysql /var/www/var/run/mysql
>
>Adjust /etc/my.cnf to put and connect to the MariaDB socket
>within the chroot:
>
>    [client]
>    socket = /var/www/var/run/mysql/mysql.sock
>
>    [mysqld]
>    socket = /var/www/var/run/mysql/mysql.sock
>
>
>end quote
>
>I also did everything mentioned in the readme of the owncloud port: setting
>php memory limit, and upload to appropriate values and creating a link for
>the UTF-8 locale. All php packages required as listed on owncloud.org are
>installed and running.
>
>quote from 
>https://github.com/toddfries/OpenBSD-ports-patches/tree/master/www/owncloud/pkg
>
>OpenBSD: README,v 1.28 2014/06/24 08:49:14 ajacoutot Exp $
>
>+-----------------------------------------------------------------------
>| Running ${FULLPKGNAME} on OpenBSD
>+-----------------------------------------------------------------------
>
>ownCloud is installed under
>    ${INSTDIR}
>It should point to the root directory of the HTTP server. e.g.
>    # ln -s ../owncloud /var/www/htdocs/owncloud
>
>Official installation intructions are available at:
>
>http://doc.owncloud.org/server/6.0/admin_manual/installation/installation_source.html
>
>Post-installation instructions
>==============================
>ownCloud attempts to use the UTF-8 locale, which does not work by
>default inside the /var/www chroot. This causes warning messages in
>ownCloud's admin configuration page and logs. To prevent this problem,
>run the following as root:
>  # mkdir -p /var/www/usr/share/locale/UTF-8/
>  # cp /usr/share/locale/UTF-8/LC_CTYPE \
>          /var/www/usr/share/locale/UTF-8/
>
>end quote
>
>server configuration:
>
>server "default" {
>        listen on wpi0 port 80
>        directory index index.php
>
>        location "*.php" {
>                fastcgi socket "/run/php-fpm.sock"
>        }
>}
>
>include "/etc/mime.types"
>
>The mime.types is the one from nginx.

Reply via email to