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 #173380 is a reply to message #173348] Wed, 06 April 2011 20:36 Go to previous messageGo to previous message
Peter Lauren is currently offline  Peter Lauren
Messages: 48
Registered: April 2011
Karma:
Member
On Apr 4, 5:41 am, crankypuss <n...@email.thanks> wrote:
> Jerry Stuckle <jstuck...@attglobal.net> wrote:
>> On 4/3/2011 9:36 PM, Peter Lauren wrote:
>>> On Apr 3, 8:03 am, Luuk<L...@invalid.lan>  wrote:
>>>> On 03-04-2011 13:54, Peter Lauren wrote:
>
>>>> > I am using Windows XP have installed WAMP and PHP as outlined here
>>>> >http://www.wampserver.com/en/
>>>> > and have set my search path so that I need only type
>>>> > php -f PHPExamples.php
>>>> > and the PHP code runs fine. However, I have not managed to get it to
>>>> > run in my FireFox/3.5.9 browser. When I make a simple file with the
>>>> > following contents
>>>> > <html>
>>>> > <body>
>
>>>> > <?php
>>>> > $txt1="Hello World!";
>>>> > $txt2="What a nice day!";
>
>>>> > echo $txt1 . " " . $txt2 . " " . strlen("Hello world!") . " " .
>>>> > strpos("Hello world!","world");
>>>> > ?>
>
>>>> > </body>
>>>> > </html>
>
>>>> > name it Examples.php and call it with a button thus
>>>> > <a href="Examples.php">PHP</a>
>
>>>> > I just get a blank page.
>
>>>> > I would be grateful if someone could tell me what I am doing wrong.
>
>>>> > Thanks,
>>>> > Peter.
>
>>>> how are you looking into this page?
>
>>>> what happens if you point browser to:http://localhost/Examples.php
>
>>>> --
>>>> Luuk
>
>>> I get "Firefox can't establish a connection to the server at
>>> localhost."
>
>> Before you can display a the output from the PHP script, you need to be
>> able to connect to the server.
>
>>> I don't think there's a problem accessing the file.  It's just that it
>>> doesn't display anything on my browser.
>
>>> Thanks,
>>> Peter.
>
>> It won't, if you aren't accessing it through a web server (or the most
>> it would display is the source code for your script).
>
>> To get it to work, you MUST have a running web server and be able to
>> connect to that web server.
>
> ...which means you have to set up apache's configuration file.  I get
> the idea that the OP has installed WAMP but hasn't configured apache,
> or maybe hasn't set up the hosts file, or maybe both.
>
> Peter: Have you edited apache's configuration file "httpd.conf"?
> There's a menu item for that, left-click the WAMP taskbar icon, select
> Apache, select httpd.conf; unless you at least modify the DocumentRoot
> specification, it'll never find your localhost's root document
> directory.

Actually that's another problem I have with the WAMP I downloaded from
wampserver.com. I double (left) click on the wampmanager icon on the
desktop and nothing happens. However I opened httpd.conf with NotePad
and saw DocumentRoot specified by
DocumentRoot "c:/wamp/www/"
Is the root document the Desktop virtual folder which contains the My
Documents, My Computer, My Network Places and Recycle Bin virtual
folders? Thanks.

>
> For apache-specific stuff (like configuration details), you probably
> ought to go to alt.apache.configuration

Thanks. I've checked that out. Thank you so much for your help.
[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: Fri Nov 22 21:20:49 GMT 2024

Total time taken to generate the page: 0.04184 seconds