Pantek Library
Hosting Provided By
CybrHost
High Speed Hosting

Re: struggling with 3.2

From: Dom De Vitto <dom(at)DeVitto.com>
Date: Sat Nov 30 2002 - 13:42:19 EST


Jason,
I've done the same just a week ago - it turns out that the PHP port mysql code doesn't know that Apache is chrooted, and by default will try and connect to /var/run/mysql/mysql.sock, which obviously isn't within the chrooted environment.

The simplest fix is to simply put this in /etc/my.cnf [client]
  password=webby
  host=localhost
  user=zeus
  socket=/var/www/var/run/mysql/mysql.sock [mysqld]
  bind=127.0.0.1
  socket=/var/www/var/run/mysql/mysql.sock

# mkdir -p /var/www/var/run/mysql
# chown mysql /var/www/var/run/mysql
and then restart mysqld and apache.
This directs mysqld and mysql clients (which are not chrooted) to use the socket within the chroot jail, and the mysql module doesn't know/care that it is chrooted.

An alternative is to hard link /var/www/var/run/mysql/mysql.sock to /var/run/mysql/mysql.sock

Dom
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Dom De Vitto                                       Tel. 07855 805 271
http://www.devitto.com                         mailto:
dom(at)devitto.com
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  

-----Original Message-----
From: owner-misc@openbsd.org [mailto:owner-misc@openbsd.org] On Behalf Of Jason Dixon
Sent: Saturday, November 30, 2002 6:30 PM To: scott
Cc: misc@openbsd.org
Subject: Re: struggling with 3.2

On Sat, 2002-11-30 at 13:09, scott wrote:
> hi
>
> I've just installed a new i386 based OpenBSD 3.2 box, and I'm having

Unless you've configured it otherwise (via "-u" in rc.conf), Apache is chrooted in /var/www in 3.2. Check the list archives for solutions using "chroot" and "httpd" as keywords.

Do you need help?X

-J. Received on Sat Nov 30 13:42:44 2002

This archive was generated by hypermail 2.1.8 : Wed Aug 23 2006 - 13:31:48 EDT


Contact Us  Legal Notices  Order Services Online 
Pantek Home  Privacy Policy  IT news  Site Map  Pantek Library