Thanks for the info.
Minh

--- Robert <[EMAIL PROTECTED]> wrote:

> K H A I wrote:
> > Dear Friends,
> >  
> > I have problem running php script with querry and
> mysql. under
> > openbsd4.0
> > php sqlqurery.php works fine.
> > but when i run over web browser, it
> > does not recognise the hostname which return
> mysql_error() function.
> > "unknown
> > hostname xx.yyy.zzz" How do i tackle this issue?
> > for openbsd
> > the config file
> > for apache under /var/www/conf/httpd.conf
> > and by default mysql is under
> > /var/mysql
> > and the socket is /var/run/mysql/myqsl.sock
> > I have change for
> > my.conf to reflect the new socket connection to
> > /var/www/run/mysql/mysql.sock
> > and the problems still exists.
> >  
> > Any info is greatly appreciated.
> >  
> > Minh.
> 
> I'll leave the mysql-user jokes to someone else.
> 
> 
> You should do your homework first, before crying for
> help on the ml!
> Check mailinglist-archives, man pages, faq... google
> and even the apache 
> or mysql-docs would have helped you!
> 
> 
> You know your problem... Apache cannot resolve
> hostnames.
> 
> How does dns resolving work on a unix-like operating
> system?
> (simple version...)
> - look at /etc/resolv.conf -> man resolv.conf
>    first line usualy is: lookup file bind
> - what file?
>    /etc/hosts -> man hosts
> - bind?
>    that points to the nameserver line in
> /etc/resolv.conf
> - there is a "nameserver <some ip>" line in
> /etc/resolv.conf?
>    usualy there is
> 
> So your system has all this? But why doesn't it
> work? It works for other 
> stuff. Whats different?
> Oy! Apache is chrooted in /var/www by default. ->
> man chroot
> Where does Apache look for the resolv.conf?
> Right! /etc/resolv.conf
> 
> *the register making its sound repeatedly* (or not)
> 
> By now you have read the chroot manpage and/or by
> looking at the faq 
> know that for the chrooted apache / is /var/www and
> when it looks for 
> /etc/resolv.conf it actualy tries the files
> /var/www/etc/resolv.conf ...
> 
> 
> Feel educated!
> (If you are guessing, the educative part was: Do
> your homework first! )
> 
> -Robert
> 
> [Sorry list, but perhaps such an explenation will be
> found easier in the 
> futur by uneducated searches. ;)]
> 
> 
> If you are still reading, short copy'n'pastable
> version:
> 
> sudo mkdir -p /var/www/etc
> sudo cp /etc/resolv.conf /var/www/etc/
> sudo cp /etc/resolv.conf /var/www/etc/
> 
> 



 
____________________________________________________________________________________
Want to start your own business?
Learn how on Yahoo! Small Business.
http://smallbusiness.yahoo.com/r-index

Reply via email to