LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Interesting TCP/IP Problem? PosgreSQL and Internet Connection Sharing Don't Work (https://www.linuxquestions.org/questions/linux-networking-3/interesting-tcp-ip-problem-posgresql-and-internet-connection-sharing-dont-work-34334/)

iaypaa 11-01-2002 10:09 AM

Interesting TCP/IP Problem? PosgreSQL and Internet Connection Sharing Don't Work
 
Hi,

I post a thread a few weeks ago now on this forum, but can no longer find it! Anyway, I have been away from my computer for a while, but now still have the same problem, plus a further one, which I'm having a lot of trouble resolving....

Original problem:
I can't share an internet connection, which is available on my Win Me machine, with my Suse Linux 8.1 machine. This worked fine (and without me even having to do anything) when I ran Suse 7.1

New Problem:
I have a postgresql database set up, which I *can* manipulate etc via psql, but I cannot connect to it from a PHP script I've written. In fact, I can't connect to it from psql if I specify the host parameter and provide it with the machines IP address. The webpage and psql comeback with the same error mentioning TCP/IP....

I wonder if these two problems are related, and how I go about solving them?

NB: I'm using DHCP and I cannot ping the linux box from the Win Me machine....

Thanks for your help - it would be very much appreciated as I'm desperate to get this web script working!!!!

Cheers

Paul

irish_rover 11-02-2002 07:43 AM

Can you ping from the linux box to the windows machine? Maybe try setting up your Linux machine with a static ip for now so you can try to get your network going. Make sure you have the the windows machine 's ip address setup as your gateway on the linux machine.

For the gateway, check your /etc/sysconfig/network and make sure it looks similar to this...

NETWORKING=yes
HOSTNAME=dublin
GATEWAY=192.168.0.254 #ip of the windows machine

......

Ok now on to the php problem. Is this php script running on the same machine as your postgresql db? If so you don't want to specify the machine by ip address.....probably specify $host=localhost or whatever depending on your script?

iaypaa 11-04-2002 03:28 AM

I can't ping either machine from the other.

I think that DHCP is working as, for example, if I boot up the Win Me machine first it assigns itself an IP of 192.168.0.1 and the if I boot up the Linux box it gives itself 192.168.0.2....

I'm sure there's some problem with TCP/IP, and that's why PostgreSQL won't accept connections either. What do you actually have to do to set up TCP/IP properly? In Suse 7.1 and Mandrake 8.1, I never had to do anything, but it seems that Suse 8.1 isn't too happy. :(

Btw, I didn't have the config file, but there was an equivalent in a "config" directory.....

Any other ideas?

Cheers

Paul

irish_rover 11-04-2002 05:23 AM

Hmmmm..........now I'm not sure. I will have to think more on this.


All times are GMT -5. The time now is 06:05 AM.