On 2013-02-09, ole <ole.hellqv...@gmail.com> wrote:
> Hi Matthias
>
> I dont know if this is any help to you,
> but I managed to get my php/mysql running by following 
> the guide at: 
> http://www.h-i-r.net/2009/10/oamp-openbsd-46-chroot-apache-mysql-php.html
> it worked for 5.2 as well.
>
> From that information I also made a small startup script:
> "
> sudo rm /var/www/var/run/mysql/mysql.sock
> sudo ln /var/run/mysql/mysql.sock /var/www/var/run/mysql/mysql.sock 

this only works if /var/www/var/run/mysql and /var/run/mysql are on the
same filesystem; it would often be preferable to use a separate filesystem
for /var/www to avoid risk of running out of space for other important
files in /var (particularly /var/log and /var/db).

a cleaner method is given in the pkg-readme for drupal:

--snip--
In order to run with standard OpenBSD chroot'ed httpd:

- make sure you can connect to your database.

Create a directory for the mysql socket.

        mkdir -p /var/www/var/run/mysql

Adjust ${SYSCONFDIR}/my.cnf to put the mysql socket into the chroot.

        [client]
        socket = /var/www/var/run/mysql/mysql.sock

        [mysqld]
        socket = /var/www/var/run/mysql/mysql.sock
--snip--

> sudo apachectl start

using "/etc/rc.d/httpd start" is preferred as it ensures that httpd is run
with the correct login class. but with the above method you don't need any
particular script, the standard rc.conf.local changes (i.e. adding mysqld
to pkg_scripts line and setting "httpd_flags=") will work.

Reply via email to