Anonymous - 2002-02-23

Hello!

Sorry, but my english is rather poor!

My host server does not support "tcp" connection to the MySQL, but my server support "socket" connection to the MySQL. How i may modify PHP-scripts in "phpmychat"???

I have information from my hosting-provider:

> Host: localhost
> Base: amp
> Base-User: amp-sql
> Base-Password: qwerty
> Socket: /tmp/amp-www.sock

If i try connect without using "/tmp/amp-www.sock" host-server speaks me:

"Warning: Access denied for user: 'amp-sql@localhost' (Using password: YES) in /home/ampersnt-www/docs/chat/lib/database/mysql.lib.php4 on line 26
Database error: Link_ID == false, connect failed
MySQL error: 0 ()
Session halted."

My expirience PHP is very slow. Please help me. How i may modify PHP-scripts for the connect via using "socket"?

In the appendix phpmyadmin there is a special variable " $cfgServers [1] ['socket' = ";//Path to the socket " which allows to join through 'socket', in "phpmychat" the similar variable is not present!

P.S.

Ypu may see my hosting-provider's help - php & MySQl connect sample:

<?PHP

require_once('mysql.inc');

if (!($sock = @mysql_connect(MYSQL_SOCKET, MYSQL_USER, MYSQL_PASSWD))) die('mysql_connect: Unable to connect to server');

if (!mysql_select_db(MYSQL_DB)) die('mysql_select_db: '.mysql_error($sock));

& etc .......................................

PLEASE HELP ME!!!!!!!!!!!!!!