473,788 Members | 2,646 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

2 MySQL : How does PHP can use the good socket ?

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_s ocket /var/mysql/mysql1.sock

php_admin_value mysql.default_h ost 127.0.0.1

php_admin_value mysql.default_p ort 3306

</IfModule>

in httpd2.conf, I use :

<IfModule mod_php4.c>

php_admin_value mysql.default_s ocket /var/mysql/mysql2.sock

php_admin_value mysql.default_h ost 127.0.0.1

php_admin_value mysql.default_p ort 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_s ocket is set with the good value !

Does anyone have a solution for the 2 last cases ?
Jul 16 '05 #1
0 2179

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
2491
by: Dennis Francis B. Tutanes | last post by:
$B$*@$OC$K$J$C$F$*$j$^$9!#(B $B%D%?%M%9(B@TSTI$B$G$9!#(B SEND-PR: -*- send-pr -*- SEND-PR: Lines starting with `SEND-PR' will be removed automatically, as SEND-PR: will all comments (text enclosed in `<' and `>'). SEND-PR: From: dtutanes To: mysql@lists.mysql.com Subject:
0
3264
by: I.P. | last post by:
Hi, it's my story. I have two 4.0.14 mysql server on one machine with win XP Professional polish version. First acts as master: on port 3300 Second acts as slave: on port 3301 below my configuration:
0
2146
by: I.P. | last post by:
No one has replied to my post. ----- Original Message ----- From: "I.P." <jancio_wodnik@wp.pl> To: <mysql@lists.mysql.com> Sent: Monday, August 18, 2003 1:01 PM Subject: mysql 4.0.14 + replication + windows XP PROF Hi, it's my story.
0
3948
by: Mike Chirico | last post by:
Interesting Things to Know about MySQL Mike Chirico (mchirico@users.sourceforge.net) Copyright (GPU Free Documentation License) 2004 Last Updated: Mon Jun 7 10:37:28 EDT 2004 The latest version of this document can be found at: http://prdownloads.sourceforge.net/souptonuts/README_mysql.txt?download
9
2521
by: Sheldon | last post by:
Hi, I have a mysql setting problem that is driving me mad. Hopefully someone can give some advice: On the local network I have windows 2000/iis5 machine running our intranet site, with php and mysql working ok. Anonymous access is disabled, and root has been assigned a password and given full access to all tables from all hosts (i reliase this isn't secure but its only temporary for testing)
3
1643
by: Kirk Soodhalter | last post by:
Hi, This started as a phpmyadmin problem, but has somehow morphed into a mysql problem. I don't know how to fix it. I am posting the conversation from a php newsgroup since it started there. Thanks for any help you might be able to give. -Kirk Ok, in the midst of fixing this problem I have somehow managed to create
3
1429
by: James Griffiths | last post by:
System Info: RedHat Linux 9 (text only) Mysql 3 When I execute mysql from the command line I receive an error: "error 2002: Mysql cannot connect to socket /var/lib/mysql.sock" (or something similar) - the socket was definately not "/tmp/mysql.sock"
1
3380
by: jlee | last post by:
I'm pretty much a newbie on mysql, and I need some help. I am running mysql Ver 12.22 Distrib 4.0.24, for portbld-freebsd5.4 (i386) on a server hosting an active website. The site's developer uses his own php shopping cart to receive customer orders. The configuration was done via cPanel with no external modifications - which produced no protests when built, ran and connected with no
4
5364
by: Richard | last post by:
Hi All, I've been trying to build a Ruby-on-Rails plus MySQL application. I'm running Ruby 1.8.2, Rails 1.1.4 and MySQL 5.0.15-nt over WinXP-Pro/SP2. I run under an Administrative account. I tried building the first example from Agile Web Development with Rails, 1st ed. Somehow the DB got corrupted and I couldn't recover. Instead of retrying that, I tried building the first example from Ruby For Rails, which worked fine.
0
9656
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10374
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10177
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10121
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
7519
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6750
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5404
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4076
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2898
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.