Hi,

I've 2 instances of apache 1.3.27 with php 4.2.3 and mysql 3.23.42 running
on the same server.

The 1st apache listens the port number 80 and communicates with the 1st
mysql with the socket /var/mysql/mysql1.sock (i've also defined the port
3306)

The 2nd apache listens the port number 8080 and communicates with the 2nd
mysql with the socket /var/mysql/mysql2.sock (i've also defined the port
3366)

I've only one "bin" of apache (then of couse one php.ini). So, I start the 2
instances of apache with 2 apachectl (apachectl1 and apachectl2) linked to 2
httpd.conf (httpd1.conf and httpd2.conf)



in httpd1.conf, I use :

<IfModule mod_php4.c>

php_admin_value mysql.default_socket /var/mysql/mysql1.sock

php_admin_value mysql.default_host 127.0.0.1

php_admin_value mysql.default_port 3306

</IfModule>



in httpd2.conf, I use :

<IfModule mod_php4.c>

php_admin_value mysql.default_socket /var/mysql/mysql2.sock

php_admin_value mysql.default_host 127.0.0.1

php_admin_value mysql.default_port 3366

</IfModule>

when I'm connecting, on each apache, a mysql_connect with "IP and user and
password (without mysql's port)" : The connexion is succeded and the good
mysql is well reached !

when I'm connecting, on each apache, a mysql_connect with "127.0.0.1 and
user and password (without mysql's port)" : The connexion is succeded, the
good mysql is well reached !

BUT :

when I'm connecting, on each apache, a mysql_connect with "localhost and
user and password (without mysql's port)" : The connexion is failed !

when I'm connecting, on each apache, a mysql_connect with "user and password
(without mysql's host and port)" : The connexion is failed !

I think in the 2 last cases, it's a problen of socket. When I run the "php
info" : mysql.default_socket is set with the good value !



Does anyone have a solution for the 2 last cases ?