So sprach Don Read am Tue, Apr 17, 2001 at 05:13:14PM -0500:
> define('DBHOST', 'localhost');
> // define('DBHOST', 'myhost.domain.com');
>
> define('QRY', 'select * from foo');
>
> $db=mysql_connect(DBHOST, DBUSER, DBPASS);
> if ( $db )
> testquery(QRY);
>
>
> ?>
>
> set the define(s) to something sensible for your setup.
>
> 'myhost.domain.com' would be your network hostname for the box, either in
> /etc/hosts or from your DNS server.
>
> test the numbers using the 'localhost' (the AF_UNIX socket).
> comment/uncoment the 'myhost' line & re-test (AF_INET connect).
the first define, defines a connect using a AF_UNIX socket? Are you sure?
According to the manual, I'd have thought, that I'd need to do:
define('DBHOST', 'localhost:/tmp/mysql.sock' );
Alexander Skwar
--
How to quote: http://learn.to/quote (german) http://quote.6x.to (english)
Homepage: http://www.digitalprojects.com | http://www.iso-top.de
iso-top.de - Die günstige Art an Linux Distributionen zu kommen
Uptime: 1 day 0 hours 33 minutes
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]