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 #173451 is a reply to message #173433] Wed, 13 April 2011 12:29 Go to previous messageGo to previous message
Mr. B-o-B is currently offline  Mr. B-o-B
Messages: 42
Registered: April 2011
Karma:
Member
On 4/12/2011 10:31 PM, Peter Lauren 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.
>
> Thanks,
> Peter.

localhost will resolve to whatever machine you are one. If you are
typing localhost on the machine with the webserver/php then you will
reach the webserver/web files. If you go to another machine & type
localhost it will resolve to the machine you are typing this on, and not
your webserver (page not found).

If you want to access your webserver from another machine, you need to
use the IP # of your webserver box. You will need a public IP for
internet use, and if your IP is static you can register a domain name &
setup a dns server, or use one of the many free dns servers available to
resolve your domain name to the ip. Then on the internet if someone
types www.yourdomainname.com then it will resolve to your IP & find the
sevrer.

This is an extremely generic example, but in a nutshell is how it works.
If this blows your mind, you might want to take a step back & do a
little networking 101 reading to help you on your quest.
[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 01:07:59 GMT 2024

Total time taken to generate the page: 0.05043 seconds