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 #173442 is a reply to message #173432] Wed, 13 April 2011 10:46 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:02 pm, Jerry Stuckle <jstuck...@attglobal.net> wrote:
>> On 4/8/2011 7:55 PM, Peter Lauren wrote:
>>
>>
>>
>>> On Apr 8, 2:01 pm, Jerry Stuckle<jstuck...@attglobal.net>  wrote:
>>>> On 4/8/2011 1:45 PM, Peter Lauren wrote:
>>
>>>> > On Apr 8, 8:04 am, "Mr. B-o-B"<mr.chew.b...@gmail.com>    wrote:
>>>> >> Peter Lauren cried from the depths of the abyss...
>>
>>>> >>> I just noticed that I do have the Wampserver icon on the quick launch
>>>> >>> part of the task bar.  I do actually get one menu, with the function
>>>> >>> you mention, with a a single click of the left button and a smaller
>>>> >>> menu, with the Exit function, with a single click of the right.  So it
>>>> >>> looks like I'm in business.
>>
>>>> >> Fantastic.
>>
>>>> > Thanks.  But I'm still having a problem.  I left-click on the task bar
>>>> > icon, click on Apache:httpd.conf, and a file opens in notepad.  In
>>>> > admin. mode, I can edit the file and set
>>>> > DocumentRoot "f:/SomeOther/Directory"
>>>> > It still uses the .php file in c:\wamp\www
>>
>>>> > Thanks,
>>>> > Peter.
>>
>>>> Did you stop and restart Apache after making the changes?  The
>>>> configuration file is only run when Apache starts up, not on every request.
>>
>>> 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
>>
>> Please read what everyone else has been telling you.
>>
>> YOU CAN'T.
>>
> Seems that everyone except Denis is telling me that but Denis seems to
> be saying that using localhost will make the code only run on my
> machine and not over the Internet. Am I having some sort of mental
> block here?

Sounds that way to me.

The PHP code you are running on an apache server (via wampserver in
your case) has to receive http messages that describe a client
request. The incoming http messages are what kicks it off---apache
just sits there listening until it receives a message that is "aimed"
at your domain; when it receives an http request it runs your PHP code
and it generates the response message in the form of an html page (or
whatever it happens to generate, could be a download file for
example).

You can send the http requests to your server (that is running your
PHP code) through basically anything that can establish a connection
to it, for example another server could do it with a socket connection
to your server's port-80. But what most "users" use to send the
requests is a browser. A browser is mostly rendering engine, most of
its code revolves around displaying the response messages your (or
whatever) server generates.

In order to tell the browser where to send the http requests that kick
the process off, it has to know which of umptyzillion servers on the
net to send the message to. You tell it this by typing the server's
address in the location bar.

Since your server is running as "http:/localhost/" you need to type
that in or your browser won't send the request to your server. If you
set up your server to run as "http:/z/ (for example) then that's what
you'd need to type in, and you would do that setup within apache's
configuration file http.conf and you would define the domain "z" using
the windows "hosts" file. Or you could use "http://127.0.0.1/" which
amounts to the same thing but doesn't use symbolic notation.

I'm not a javascript guy, but you *might* be able to run some
front-end javascript application on your browser that would supply the
domain name without your having to type it. I understand that the
Opera browser offers a lot more customization capability than most so
you might want to look at it once you get things running. For that
matter you could download the source code for FireFox (I think it's
available) and modify it to create your own browser.

It isn't magic, it's a matter of grasping the context in which your
PHP code is running. Your "mental block" seems to be that you want
the browser to know what server you mean, without telling it.

--
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 11:20:38 GMT 2024

Total time taken to generate the page: 0.04728 seconds