FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » PHP Runs In WinXP Command Window But Not In Browser
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: PHP Runs In WinXP Command Window But Not In Browser [message #173443 is a reply to message #173433] Wed, 13 April 2011 10:58 Go to previous messageGo to previous message
crankypuss is currently offline  crankypuss
Messages: 147
Registered: March 2011
Karma:
Senior Member
Peter Lauren <peterdlauren(at)gmail(dot)com> wrote:

> On Apr 8, 8:57 pm, "Mr. B-o-B" <mr.chew.b...@gmail.com> wrote:
>> On 4/8/2011 6:55 PM, Peter Lauren wrote:
>>
>>> I fixed the Forbidden problem.  There was a part in the httpd.conf
>>> file that said
>>> # This should be changed to whatever you set DocumentRoot to.
>>
>>> I fixed that and now it works.
>>
>>> Still haven't figured out how to get it to work w/o the /localhost/
>>> part though
>>
>> What everyone is telling you here is true.  You will not be able to drop
>> the localhost.
>>
>> What is it you are trying to do exactly?  If you want something to run
>> in your browser w/o a server (aka localhost or whatever) you are in the
>> wrong group.  You will need to look at a client side language like
>> javascript.
>>
>> If you are hoping to create a php program that you can just run the only
>> way I know how to do this is with NUSphere's PHP Dock.
>>
>> http://www.nusphere.com/products/phpdock.htm
>>
>> It will take your php code, and make it into a stand alone application.
>>   It's not free, but it might be worth it for you.
>> I have used this at work, and it's pretty slick.
>>
>> Otherwise, you will need to use a server to process your php.  After
>> all, it is a server side language.
>>
>> Enjoy!
>>
>> Mr. B-o-b
>
> Hi Bob,
>
> I would like to be able to run my code (PHP or Java) on my browser and
> over the Internet. I may be misinterpreting Denis but he seems to be
> saying that using localhost will make the code only work on the local
> machine. That is the source of my confusion.

Your code only exists on your local machine. From the same machine
you can address it as localhost because that is a fixed name that is
known to mean "this machine", ie 127.0.0.1 Your server could ALSO be
accessed from elsewhere on the internet (if wampserver is "online"),
but the user would need to know the ip-address to send requests to.
How that works is basically that a DNS (Distributed Name Server as I
recall, though it's been a while and I'm fuzzy on whether the "D" is
for "Distributed") which takes a symbolic name and returns an
ip-address of the form a.b.c.d (don't ask *me* about ipv6 addressing
this week, or even the inmost details of ipv4 addressing, please).

To set up a (socket or other) connection between the user's
application (in this case the browser) and the server which runs the
PHP code, an ip-address is absolutely required. The ip-address
consists of numbers that completely locate the server node within the
network. Symbolic names are converted to numeric ip-addresses by name
servers (DNS). If the client and server are on the same machine they
can use 127.0.0.1 or "localhost" which is a convention set up to avoid
a firm requirement for the involvement of a DNS.

The whole thing is analogous to making a phone call. If you want to
call a server you have to have its number. The localhost convention
is analogous to dialing 911 in that it says 127.0.0.1 defines the
local server. Aside from that you have to know the phone number you
want, or look it up in the directory (DNS).

--
no aluminum siding offers today
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: neither var_dump() nor die() displays anything
Next Topic: Spaces in filenames
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Tue Nov 26 13:37:52 GMT 2024

Total time taken to generate the page: 0.04544 seconds