Re: [PHP-DB] Question on the port PHP uses to connect to remote MySQL

2003-01-29 Thread Matt Vos
In a default setup, I believe the port is 3306.
Check your MySQL config files, as this can be changed.

Matt
- Original Message - 
From: Louis Feng [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, January 28, 2003 10:34 PM
Subject: [PHP-DB] Question on the port PHP uses to connect to remote MySQL


 Here is my problem. I have PHP running on one machine, mysql on another 
 one. Everything works fine till I put a firewall on the PHP machine, 
 which blocks pretty much every port there is except port 80. Now, PHP 
 can't connect to the mysql database anymore. If I disable the firewall 
 on the PHP machine it works again. So I eliminate the reasons down to 
 that PHP must uses some port for mysql return the query. The question is 
 which port does PHP use for the connection? I'm NOT talking about 3306 
 which is used by Mysql. Anyone could help? Thanks in advance.
 
 Louis
 
 
 -- 
 PHP Database Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-DB] Question on the port PHP uses to connect to remote MySQL

2003-01-29 Thread Jeffrey_N_Dyke

it IS 3306(in a default setup) that you'll need to allow traffic through
the firewall for this scenario.  I have similar needs and that is the port
we open.


   
 
Matt Vos 
 
vos@techcomne   To: Louis Feng [EMAIL PROTECTED], 
[EMAIL PROTECTED]   
t.com   cc:   
 
 Subject: Re: [PHP-DB] Question on the 
port PHP uses to connect to  
01/29/2003remote MySQL 
 
09:29 AM   
 
   
 
   
 




In a default setup, I believe the port is 3306.
Check your MySQL config files, as this can be changed.

Matt
- Original Message -
From: Louis Feng [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, January 28, 2003 10:34 PM
Subject: [PHP-DB] Question on the port PHP uses to connect to remote MySQL


 Here is my problem. I have PHP running on one machine, mysql on another
 one. Everything works fine till I put a firewall on the PHP machine,
 which blocks pretty much every port there is except port 80. Now, PHP
 can't connect to the mysql database anymore. If I disable the firewall
 on the PHP machine it works again. So I eliminate the reasons down to
 that PHP must uses some port for mysql return the query. The question is
 which port does PHP use for the connection? I'm NOT talking about 3306
 which is used by Mysql. Anyone could help? Thanks in advance.

 Louis


 --
 PHP Database Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php



--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php





-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-DB] Question on the port PHP uses to connect to remote MySQL

2003-01-29 Thread Louis Feng
Thanks for reply, I'm going to try that, but how could this be? I just 
want to make sure I was clear that there is no problem to connect to the 
remote MySQL server and there is nothing blocking that machine. It's the 
PHP machine that's blocking any incoming traffic from the MySQL machine. 
How could PHP use a port number that is also used by MySQL?

Louis

[EMAIL PROTECTED] wrote:

it IS 3306(in a default setup) that you'll need to allow traffic through
the firewall for this scenario.  I have similar needs and that is the port
we open.


   
   Matt Vos  
   vos@techcomne   To: Louis Feng [EMAIL PROTECTED], [EMAIL PROTECTED]   
   t.com   cc:
Subject: Re: [PHP-DB] Question on the port PHP uses to connect to  
   01/29/2003remote MySQL  
   09:29 AM
   
   




In a default setup, I believe the port is 3306.
Check your MySQL config files, as this can be changed.

Matt
- Original Message -
From: Louis Feng [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, January 28, 2003 10:34 PM
Subject: [PHP-DB] Question on the port PHP uses to connect to remote MySQL


 

Here is my problem. I have PHP running on one machine, mysql on another
one. Everything works fine till I put a firewall on the PHP machine,
which blocks pretty much every port there is except port 80. Now, PHP
can't connect to the mysql database anymore. If I disable the firewall
on the PHP machine it works again. So I eliminate the reasons down to
that PHP must uses some port for mysql return the query. The question is
which port does PHP use for the connection? I'm NOT talking about 3306
which is used by Mysql. Anyone could help? Thanks in advance.

Louis


--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

   



--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




 



--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-DB] Question on the port PHP uses to connect to remote MySQL

2003-01-29 Thread Louis Feng
Hi Jeff,

Thanks for your help. The machine [A] is running MySQL is Not behind a 
firewall, therefore all connection to [A] works fine (including 3306). 
The machine [B] running PHP/apache is behind a firewall, and only port 
80 is open on [B]. If I want to do some query on MySQL of [A] from [B] 
where PHP resides, then the problem occurs (from other machines without 
firewall to do the query on [A] work fine). Basically PHP can send out 
query to [A] (since [A] is open), but when [A] returns the result to 
PHP, it's blocked by the firewall on [B], because I believe PHP uses 
certain port for MySQL return the result. Is it clear?

I attached a picture and hopefully helps. Thanks!

Louis

[EMAIL PROTECTED] wrote:

 
loius.  how do you know it's the mysql host that can not get to the 
php host? i may have misunderstood.  port 3306 needs to be enabled to 
allow traffic though the firewall and into the mysql host, since that 
connection has been established the data is returned back to the php 
host.   the mysql host shouldn't be able to connect to the php host in 
the same way, only through a connection originating through port 3306. 
 then you can also limit to domain names that are allowed to enter the 
mysql host on 3306.

don't know if this helps, but i think this is your scenario.  let me 
know.  i'm definitely interested.  Hopefully i explained it correctly, 
i'm definitely not a firewall guy...but i try to pay attention.

Jeff
*Louis Feng [EMAIL PROTECTED]*
01/29/2003 07:11 PM

To: [EMAIL PROTECTED]
cc: Matt Vos [EMAIL PROTECTED], Louis Feng [EMAIL PROTECTED], 
[EMAIL PROTECTED]
bcc:
Subject: Re: [PHP-DB] Question on the port PHP uses to connect to 
remote MySQL


Thanks for reply, I'm going to try that, but how could this be? I just
want to make sure I was clear that there is no problem to connect to the
remote MySQL server and there is nothing blocking that machine. It's the
PHP machine that's blocking any incoming traffic from the MySQL machine.
How could PHP use a port number that is also used by MySQL?

Louis

[EMAIL PROTECTED] wrote:

it IS 3306(in a default setup) that you'll need to allow traffic through
the firewall for this scenario.  I have similar needs and that is the 
port
we open.



Matt Vos
vos@techcomne   To: Louis Feng 
[EMAIL PROTECTED], [EMAIL PROTECTED]
t.com   cc:
 Subject: Re: [PHP-DB] 
Question on the port PHP uses to connect to
01/29/2003remote MySQL
09:29 AM






In a default setup, I believe the port is 3306.
Check your MySQL config files, as this can be changed.

Matt
- Original Message -
From: Louis Feng [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, January 28, 2003 10:34 PM
Subject: [PHP-DB] Question on the port PHP uses to connect to remote 
MySQL




Here is my problem. I have PHP running on one machine, mysql on another
one. Everything works fine till I put a firewall on the PHP machine,
which blocks pretty much every port there is except port 80. Now, PHP
can't connect to the mysql database anymore. If I disable the firewall
on the PHP machine it works again. So I eliminate the reasons down to
that PHP must uses some port for mysql return the query. The question is
which port does PHP use for the connection? I'm NOT talking about 3306
which is used by Mysql. Anyone could help? Thanks in advance.

Louis


--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php





--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php









-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP-DB] Question on the port PHP uses to connect to remote MySQL

2003-01-28 Thread Louis Feng
Here is my problem. I have PHP running on one machine, mysql on another 
one. Everything works fine till I put a firewall on the PHP machine, 
which blocks pretty much every port there is except port 80. Now, PHP 
can't connect to the mysql database anymore. If I disable the firewall 
on the PHP machine it works again. So I eliminate the reasons down to 
that PHP must uses some port for mysql return the query. The question is 
which port does PHP use for the connection? I'm NOT talking about 3306 
which is used by Mysql. Anyone could help? Thanks in advance.

Louis


--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DB] Question on the port PHP uses to connect to remote MySQL

2003-01-28 Thread Jason Wong
On Wednesday 29 January 2003 11:34, Louis Feng wrote:
 Here is my problem. I have PHP running on one machine, mysql on another
 one. Everything works fine till I put a firewall on the PHP machine,
 which blocks pretty much every port there is except port 80. Now, PHP
 can't connect to the mysql database anymore. If I disable the firewall
 on the PHP machine it works again. So I eliminate the reasons down to
 that PHP must uses some port for mysql return the query. 


 The question is
 which port does PHP use for the connection? 

Most likely it varies. Your firewall should have stateful inspection so that 
whatever port was used to initiate the connection with mysql should be 
allowed through.

-- 
Jason Wong - Gremlins Associates - www.gremlins.biz
Open Source Software Systems Integrators
* Web Design  Hosting * Internet  Intranet Applications Development *


/*
We're all in this alone.
-- Lily Tomlin
*/


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php