Re: Cannot get mysql_connect to work



>Thanks for your help. I guess I'm a little confused about localhost. It

localhost refers to the local machine. The *whole* machine, not
just one directory on it.

>seems that if I open a file in the browser at
>http:/localhost/myFile.html, it actually refers to the file
>/var/www/html/myFile.html.

On the local machine.

If I ftp to localhost and log in as 'gordon', I end up in my home
directory on the local machine. If I ftp to localhost and log in
as 'ralph', I end up in Ralph's home directory on the local machine.
If I http to localhost and request /, I get the web server's document
root directory (or an index file in it). If I ping localhost, I
get *no directory whatever*, I just get ping replies back. If I
log in on MySQL to localhost, I get the database I asked for, and
who cares what directory it's kept in (sometimes databases are
jumbled together in one large file, but if MySQL can figure it out,
that's fine with me) if I get the right one? If I connect an IRC
client to localhost, I end up talking to the IRC server on my local
machine (assuming one exists), and the directory is not relevant.

>So it seems there are two meanings to
>localhost? In one context it refers to the local machine via ip
>address 127.0.0.1, and in the context of the browser, (with Apache
>running?), localhost refers to a specifc directory path on the local
>machine. This is why I'm confused. Can you shed any light on this?

localhost refers to the local machine. The *whole* local machine.
Any directory is implied or specified by parts of the request other
than the hostname.

Gordon L. Burditt
.



Relevant Pages

  • ISA 2000 problem on SBS 2000
    ... I am trying to setup some exam testing software on a workstation which ... require the local machine to open a localhost address (Catlglobal ... from the root of the ISA server or would this replicate throughout all the ...
    (microsoft.public.backoffice.smallbiz2000)
  • Re: ISA 2000 problem on SBS 2000
    ... require the local machine to open a localhost address (Catlglobal ... mess up the OWA settings. ... from the root of the ISA server or would this replicate throughout all the ...
    (microsoft.public.backoffice.smallbiz2000)
  • Re: Test internet from emulator
    ... I was trying to connect to localhost instead of the ip of my local machine. ... Too used to desktop development. ... Rog wrote: ...
    (microsoft.public.dotnet.framework.aspnet.mobile)
  • Re: Latest Solaris 9 recommended patches broke sendmail
    ... Kevin Brammer skrev: ... arch). ... I can't get any locally generated email out of the local machine. ... I get an error which says the localhost rejected the relay. ...
    (comp.unix.solaris)
  • Re: Latest Solaris 9 recommended patches broke sendmail
    ... Kevin Brammer wrote: ... arch). ... I can't get any locally generated email out of the local machine. ... I get an error which says the localhost rejected the relay. ...
    (comp.unix.solaris)