Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.php > #911 > unrolled thread

PHP Runs In WinXP Command Window But Not In Browser

Started byPeter Lauren <peterdlauren@gmail.com>
First post2011-04-03 04:54 -0700
Last post2011-04-28 08:12 -0700
Articles 20 on this page of 133 — 14 participants

Back to article view | Back to comp.lang.php


Contents

  PHP Runs In WinXP Command Window But Not In Browser Peter Lauren <peterdlauren@gmail.com> - 2011-04-03 04:54 -0700
    Re: PHP Runs In WinXP Command Window But Not In Browser Luuk <Luuk@invalid.lan> - 2011-04-03 14:03 +0200
      Re: PHP Runs In WinXP Command Window But Not In Browser Peter Lauren <peterdlauren@gmail.com> - 2011-04-03 18:36 -0700
        Re: PHP Runs In WinXP Command Window But Not In Browser Jerry Stuckle <jstucklex@attglobal.net> - 2011-04-03 21:54 -0400
          Re: PHP Runs In WinXP Command Window But Not In Browser crankypuss <no@email.thanks> - 2011-04-04 03:41 -0600
            Re: PHP Runs In WinXP Command Window But Not In Browser Peter Lauren <peterdlauren@gmail.com> - 2011-04-06 13:36 -0700
              Re: PHP Runs In WinXP Command Window But Not In Browser Tim Streater <timstreater@waitrose.com> - 2011-04-06 22:14 +0100
                Re: PHP Runs In WinXP Command Window But Not In Browser Peter Lauren <peterdlauren@gmail.com> - 2011-04-06 20:54 -0700
                  Re: PHP Runs In WinXP Command Window But Not In Browser Tim Streater <timstreater@waitrose.com> - 2011-04-07 09:08 +0100
              Re: PHP Runs In WinXP Command Window But Not In Browser "Mr. B-o-B" <mr.chew.baka@gmail.com> - 2011-04-06 16:21 -0500
                Re: PHP Runs In WinXP Command Window But Not In Browser Peter Lauren <peterdlauren@gmail.com> - 2011-04-06 21:00 -0700
                  Re: PHP Runs In WinXP Command Window But Not In Browser crankypuss <no@email.thanks> - 2011-04-07 03:28 -0600
                    Re: PHP Runs In WinXP Command Window But Not In Browser Peter Lauren <peterdlauren@gmail.com> - 2011-04-07 19:53 -0700
                      Re: PHP Runs In WinXP Command Window But Not In Browser "Mr. B-o-B" <mr.chew.baka@gmail.com> - 2011-04-08 07:04 -0500
                        Re: PHP Runs In WinXP Command Window But Not In Browser Peter Lauren <peterdlauren@gmail.com> - 2011-04-08 10:45 -0700
                          Re: PHP Runs In WinXP Command Window But Not In Browser Jerry Stuckle <jstucklex@attglobal.net> - 2011-04-08 14:01 -0400
                            Re: PHP Runs In WinXP Command Window But Not In Browser Peter Lauren <peterdlauren@gmail.com> - 2011-04-08 16:45 -0700
                            Re: PHP Runs In WinXP Command Window But Not In Browser Peter Lauren <peterdlauren@gmail.com> - 2011-04-08 16:55 -0700
                              Re: PHP Runs In WinXP Command Window But Not In Browser Jerry Stuckle <jstucklex@attglobal.net> - 2011-04-08 20:02 -0400
                                Re: PHP Runs In WinXP Command Window But Not In Browser Peter Lauren <peterdlauren@gmail.com> - 2011-04-12 20:07 -0700
                                  Re: PHP Runs In WinXP Command Window But Not In Browser Jerry Stuckle <jstucklex@attglobal.net> - 2011-04-13 05:23 -0400
                                    Re: PHP Runs In WinXP Command Window But Not In Browser Peter Lauren <peterdlauren@gmail.com> - 2011-04-13 10:59 -0700
                                      Re: PHP Runs In WinXP Command Window But Not In Browser Tim Streater <timstreater@waitrose.com> - 2011-04-13 19:33 +0100
                                        Re: PHP Runs In WinXP Command Window But Not In Browser Peter Lauren <peterdlauren@gmail.com> - 2011-04-18 11:29 -0700
                                      Re: PHP Runs In WinXP Command Window But Not In Browser Michael Fesser <netizen@gmx.de> - 2011-04-13 20:36 +0200
                                        Re: PHP Runs In WinXP Command Window But Not In Browser Peter Lauren <peterdlauren@gmail.com> - 2011-04-18 14:08 -0700
                                          Re: PHP Runs In WinXP Command Window But Not In Browser "P E Schoen" <paul@pstech-inc.com> - 2011-04-19 01:31 -0400
                                            Re: PHP Runs In WinXP Command Window But Not In Browser Peter Lauren <peterdlauren@gmail.com> - 2011-04-28 08:17 -0700
                                  Re: PHP Runs In WinXP Command Window But Not In Browser crankypuss <no@email.thanks> - 2011-04-13 04:46 -0600
                                    Re: PHP Runs In WinXP Command Window But Not In Browser Peter Lauren <peterdlauren@gmail.com> - 2011-04-18 09:05 -0700
                                      Re: PHP Runs In WinXP Command Window But Not In Browser Denis McMahon <denis.m.f.mcmahon@gmail.com> - 2011-04-18 17:22 +0000
                                        Re: PHP Runs In WinXP Command Window But Not In Browser Peter Lauren <peterdlauren@gmail.com> - 2011-04-18 14:35 -0700
                                          Re: PHP Runs In WinXP Command Window But Not In Browser crankypuss <no@email.thanks> - 2011-04-19 03:15 -0600
                                            Re: PHP Runs In WinXP Command Window But Not In Browser Peter Lauren <peterdlauren@gmail.com> - 2011-04-28 11:05 -0700
                              Re: PHP Runs In WinXP Command Window But Not In Browser "Mr. B-o-B" <mr.chew.baka@gmail.com> - 2011-04-08 19:57 -0500
                                Re: PHP Runs In WinXP Command Window But Not In Browser Jerry Stuckle <jstucklex@attglobal.net> - 2011-04-08 22:49 -0400
                                Re: PHP Runs In WinXP Command Window But Not In Browser Peter Lauren <peterdlauren@gmail.com> - 2011-04-12 20:31 -0700
                                  Re: PHP Runs In WinXP Command Window But Not In Browser crankypuss <no@email.thanks> - 2011-04-13 04:58 -0600
                                  Re: PHP Runs In WinXP Command Window But Not In Browser Tim Streater <timstreater@waitrose.com> - 2011-04-13 13:23 +0100
                                  Re: PHP Runs In WinXP Command Window But Not In Browser "Mr. B-o-B" <mr.chew.baka@gmail.com> - 2011-04-13 07:29 -0500
                                    Re: PHP Runs In WinXP Command Window But Not In Browser Peter Lauren <peterdlauren@gmail.com> - 2011-04-18 09:44 -0700
                                      Re: PHP Runs In WinXP Command Window But Not In Browser Denis McMahon <denis.m.f.mcmahon@gmail.com> - 2011-04-18 17:25 +0000
                                        Re: PHP Runs In WinXP Command Window But Not In Browser Peter Lauren <peterdlauren@gmail.com> - 2011-04-18 14:37 -0700
                                          Re: PHP Runs In WinXP Command Window But Not In Browser "James Carlock" <jcarlock1@somemail.com> - 2011-04-18 19:07 -0400
                                            Re: PHP Runs In WinXP Command Window But Not In Browser Jerry Stuckle <jstucklex@attglobal.net> - 2011-04-18 20:14 -0400
                                              Re: PHP Runs In WinXP Command Window But Not In Browser "Mr. B-o-B" <mr.chew.baka@gmail.com> - 2011-04-18 22:05 -0500
                                                Re: PHP Runs In WinXP Command Window But Not In Browser Jerry Stuckle <jstucklex@attglobal.net> - 2011-04-19 06:03 -0400
                                                  Re: PHP Runs In WinXP Command Window But Not In Browser "Mr. B-o-B" <mr.chew.baka@gmail.com> - 2011-04-19 06:50 -0500
                                                    Re: PHP Runs In WinXP Command Window But Not In Browser Jerry Stuckle <jstucklex@attglobal.net> - 2011-04-19 19:52 -0400
                                                      Re: PHP Runs In WinXP Command Window But Not In Browser "Mr. B-o-B" <mr.chew.baka@gmail.com> - 2011-04-19 21:00 -0500
                                                        Re: PHP Runs In WinXP Command Window But Not In Browser Jerry Stuckle <jstucklex@attglobal.net> - 2011-04-19 22:12 -0400
                                                          Re: PHP Runs In WinXP Command Window But Not In Browser "Mr. B-o-B" <mr.chew.baka@gmail.com> - 2011-04-19 21:27 -0500
                                                            Re: PHP Runs In WinXP Command Window But Not In Browser Jerry Stuckle <jstucklex@attglobal.net> - 2011-04-19 22:58 -0400
                                                              Re: PHP Runs In WinXP Command Window But Not In Browser "Mr. B-o-B" <mr.chew.baka@gmail.com> - 2011-04-19 22:56 -0500
                                                              Re: PHP Runs In WinXP Command Window But Not In Browser "Mr. B-o-B" <mr.chew.baka@gmail.com> - 2011-04-19 23:11 -0500
                                                                Re: PHP Runs In WinXP Command Window But Not In Browser Jerry Stuckle <jstucklex@attglobal.net> - 2011-04-20 05:20 -0400
                                                                  Re: PHP Runs In WinXP Command Window But Not In Browser "Mr. B-o-B" <mr.chew.baka@gmail.com> - 2011-04-20 07:27 -0500
                                                                    Re: PHP Runs In WinXP Command Window But Not In Browser Tim Streater <timstreater@waitrose.com> - 2011-04-20 16:44 +0100
                                                                      Re: PHP Runs In WinXP Command Window But Not In Browser The Natural Philosopher <tnp@invalid.invalid> - 2011-04-20 17:16 +0100
                                                                Re: PHP Runs In WinXP Command Window But Not In Browser The Natural Philosopher <tnp@invalid.invalid> - 2011-04-20 11:30 +0100
                                            Re: PHP Runs In WinXP Command Window But Not In Browser Peter Lauren <peterdlauren@gmail.com> - 2011-04-19 18:59 -0700
                                              Re: PHP Runs In WinXP Command Window But Not In Browser "James Carlock" <jcarlock1@somemail.com> - 2011-04-24 09:23 -0400
                                                Re: PHP Runs In WinXP Command Window But Not In Browser Peter Lauren <peterdlauren@gmail.com> - 2011-04-29 12:46 -0700
                                                Re: PHP Runs In WinXP Command Window But Not In Browser Peter Lauren <peterdlauren@gmail.com> - 2011-04-29 12:45 -0700
                              Re: PHP Runs In WinXP Command Window But Not In Browser crankypuss <no@email.thanks> - 2011-04-09 02:29 -0600
                                Re: PHP Runs In WinXP Command Window But Not In Browser Peter Lauren <peterdlauren@gmail.com> - 2011-04-12 20:33 -0700
                                  Re: PHP Runs In WinXP Command Window But Not In Browser Jerry Stuckle <jstucklex@attglobal.net> - 2011-04-13 05:25 -0400
                                    Re: PHP Runs In WinXP Command Window But Not In Browser crankypuss <no@email.thanks> - 2011-04-13 05:00 -0600
                                      Re: PHP Runs In WinXP Command Window But Not In Browser Tim Streater <timstreater@waitrose.com> - 2011-04-13 13:43 +0100
                                        Re: PHP Runs In WinXP Command Window But Not In Browser crankypuss <no@email.thanks> - 2011-04-13 08:17 -0600
                                    Re: PHP Runs In WinXP Command Window But Not In Browser Peter Lauren <peterdlauren@gmail.com> - 2011-04-13 11:16 -0700
                                      Re: PHP Runs In WinXP Command Window But Not In Browser Jerry Stuckle <jstucklex@attglobal.net> - 2011-04-13 15:12 -0400
                                        Re: PHP Runs In WinXP Command Window But Not In Browser crankypuss <no@email.thanks> - 2011-04-14 04:37 -0600
                                          Re: PHP Runs In WinXP Command Window But Not In Browser Jerry Stuckle <jstucklex@attglobal.net> - 2011-04-14 08:53 -0400
                                            Re: PHP Runs In WinXP Command Window But Not In Browser crankypuss <no@email.thanks> - 2011-04-14 12:47 -0600
                                        Re: PHP Runs In WinXP Command Window But Not In Browser Peter Lauren <peterdlauren@gmail.com> - 2011-04-18 14:10 -0700
                                  Re: PHP Runs In WinXP Command Window But Not In Browser Denis McMahon <denis.m.f.mcmahon@gmail.com> - 2011-04-13 20:57 +0000
                                    Re: PHP Runs In WinXP Command Window But Not In Browser Peter Lauren <peterdlauren@gmail.com> - 2011-04-18 14:22 -0700
                                      Re: PHP Runs In WinXP Command Window But Not In Browser crankypuss <no@email.thanks> - 2011-04-19 03:42 -0600
                              Re: PHP Runs In WinXP Command Window But Not In Browser Michael Fesser <netizen@gmx.de> - 2011-04-09 12:26 +0200
                                Re: PHP Runs In WinXP Command Window But Not In Browser The Natural Philosopher <tnp@invalid.invalid> - 2011-04-09 12:10 +0100
                                  Re: PHP Runs In WinXP Command Window But Not In Browser Tim Streater <timstreater@waitrose.com> - 2011-04-09 17:09 +0100
                                Re: PHP Runs In WinXP Command Window But Not In Browser Peter Lauren <peterdlauren@gmail.com> - 2011-04-12 20:43 -0700
                                  Re: PHP Runs In WinXP Command Window But Not In Browser crankypuss <no@email.thanks> - 2011-04-13 05:08 -0600
                                Re: PHP Runs In WinXP Command Window But Not In Browser Peter Lauren <peterdlauren@gmail.com> - 2011-04-12 20:43 -0700
                                  Re: PHP Runs In WinXP Command Window But Not In Browser William Gill <nospam@domain.invalid> - 2011-04-13 15:13 -0400
                                    Re: PHP Runs In WinXP Command Window But Not In Browser Tim Streater <timstreater@waitrose.com> - 2011-04-13 20:21 +0100
                                      Re: PHP Runs In WinXP Command Window But Not In Browser William Gill <nospam@domain.invalid> - 2011-04-13 19:22 -0400
                                        Re: PHP Runs In WinXP Command Window But Not In Browser Tim Streater <timstreater@waitrose.com> - 2011-04-14 10:10 +0100
                                Re: PHP Runs In WinXP Command Window But Not In Browser Peter Lauren <peterdlauren@gmail.com> - 2011-04-12 20:57 -0700
                                  Re: PHP Runs In WinXP Command Window But Not In Browser Tim Streater <timstreater@waitrose.com> - 2011-04-13 13:20 +0100
                                    Re: PHP Runs In WinXP Command Window But Not In Browser Peter Lauren <peterdlauren@gmail.com> - 2011-04-18 09:19 -0700
                                      Re: PHP Runs In WinXP Command Window But Not In Browser crankypuss <no@email.thanks> - 2011-04-19 03:42 -0600
                                        Re: PHP Runs In WinXP Command Window But Not In Browser William Gill <nospam@domain.invalid> - 2011-04-19 10:36 -0400
                                          Re: PHP Runs In WinXP Command Window But Not In Browser The Natural Philosopher <tnp@invalid.invalid> - 2011-04-19 18:46 +0100
                                            Re: PHP Runs In WinXP Command Window But Not In Browser Denis McMahon <denis.m.f.mcmahon@gmail.com> - 2011-04-19 20:32 +0000
                                              Re: PHP Runs In WinXP Command Window But Not In Browser Tim Streater <timstreater@waitrose.com> - 2011-04-19 21:35 +0100
                                              Re: PHP Runs In WinXP Command Window But Not In Browser The Natural Philosopher <tnp@invalid.invalid> - 2011-04-19 22:19 +0100
                                            Re: PHP Runs In WinXP Command Window But Not In Browser Jerry Stuckle <jstucklex@attglobal.net> - 2011-04-19 19:52 -0400
                                            Re: PHP Runs In WinXP Command Window But Not In Browser William Gill <nospam@domain.invalid> - 2011-04-19 22:15 -0400
                                              Re: PHP Runs In WinXP Command Window But Not In Browser Peter Lauren <peterdlauren@gmail.com> - 2011-04-28 12:18 -0700
              Re: PHP Runs In WinXP Command Window But Not In Browser crankypuss <no@email.thanks> - 2011-04-07 03:19 -0600
        Re: PHP Runs In WinXP Command Window But Not In Browser Tim Streater <timstreater@waitrose.com> - 2011-04-04 09:53 +0100
    Re: PHP runs in WinXP command window but not in browser Tim Streater <timstreater@waitrose.com> - 2011-04-03 13:39 +0100
      Re: PHP runs in WinXP command window but not in browser Peter Lauren <peterdlauren@gmail.com> - 2011-04-03 18:42 -0700
        Re: PHP runs in WinXP command window but not in browser Jerry Stuckle <jstucklex@attglobal.net> - 2011-04-03 21:55 -0400
        Re: PHP runs in WinXP command window but not in browser crankypuss <no@email.thanks> - 2011-04-04 03:48 -0600
          Re: PHP runs in WinXP command window but not in browser Peter Lauren <peterdlauren@gmail.com> - 2011-04-06 13:43 -0700
        Re: PHP runs in WinXP command window but not in browser "Peter H. Coffin" <hellsop@ninehells.com> - 2011-04-04 17:31 -0500
          Re: PHP runs in WinXP command window but not in browser Peter Lauren <peterdlauren@gmail.com> - 2011-04-06 20:40 -0700
    Re: PHP Runs In WinXP Command Window But Not In Browser Denis McMahon <denis.m.f.mcmahon@gmail.com> - 2011-04-04 17:19 +0000
      Re: PHP Runs In WinXP Command Window But Not In Browser Jim Higgins <invalid@invalid.invalid> - 2011-04-05 18:36 +0000
        Re: PHP Runs In WinXP Command Window But Not In Browser Jerry Stuckle <jstucklex@attglobal.net> - 2011-04-05 16:07 -0400
        Re: PHP Runs In WinXP Command Window But Not In Browser Tim Streater <timstreater@waitrose.com> - 2011-04-05 23:01 +0100
        Re: PHP Runs In WinXP Command Window But Not In Browser Denis McMahon <denis.m.f.mcmahon@gmail.com> - 2011-04-05 23:27 +0000
        Re: PHP Runs In WinXP Command Window But Not In Browser William Gill <nospam@domain.invalid> - 2011-04-13 12:14 -0400
      Re: PHP Runs In WinXP Command Window But Not In Browser Peter Lauren <peterdlauren@gmail.com> - 2011-04-06 20:18 -0700
      Re: PHP Runs In WinXP Command Window But Not In Browser Peter Lauren <peterdlauren@gmail.com> - 2011-04-06 20:19 -0700
        Re: PHP Runs In WinXP Command Window But Not In Browser Denis McMahon <denis.m.f.mcmahon@gmail.com> - 2011-04-07 13:16 +0000
        Re: PHP Runs In WinXP Command Window But Not In Browser Denis McMahon <denis.m.f.mcmahon@gmail.com> - 2011-04-07 14:09 +0000
          Re: PHP Runs In WinXP Command Window But Not In Browser Peter Lauren <peterdlauren@gmail.com> - 2011-04-08 10:33 -0700
            Re: PHP Runs In WinXP Command Window But Not In Browser Jerry Stuckle <jstucklex@attglobal.net> - 2011-04-08 14:00 -0400
          Re: PHP Runs In WinXP Command Window But Not In Browser Peter Lauren <peterdlauren@gmail.com> - 2011-04-08 10:34 -0700
            Re: PHP Runs In WinXP Command Window But Not In Browser Denis McMahon <denis.m.f.mcmahon@gmail.com> - 2011-04-08 18:17 +0000
          Re: PHP Runs In WinXP Command Window But Not In Browser Peter Lauren <peterdlauren@gmail.com> - 2011-04-08 10:53 -0700
            Re: PHP Runs In WinXP Command Window But Not In Browser Denis McMahon <denis.m.f.mcmahon@gmail.com> - 2011-04-08 18:30 +0000
              Re: PHP Runs In WinXP Command Window But Not In Browser Peter Lauren <peterdlauren@gmail.com> - 2011-04-12 20:06 -0700
                Re: PHP Runs In WinXP Command Window But Not In Browser crankypuss <no@email.thanks> - 2011-04-13 05:11 -0600
                Re: PHP Runs In WinXP Command Window But Not In Browser Tim Streater <timstreater@waitrose.com> - 2011-04-13 13:25 +0100
                Re: PHP Runs In WinXP Command Window But Not In Browser William Gill <nospam@domain.invalid> - 2011-04-13 13:46 -0400
                  Re: PHP Runs In WinXP Command Window But Not In Browser Peter Lauren <peterdlauren@gmail.com> - 2011-04-18 11:27 -0700
                    Re: PHP Runs In WinXP Command Window But Not In Browser William Gill <nospam@domain.invalid> - 2011-04-18 19:15 -0400
                      Re: PHP Runs In WinXP Command Window But Not In Browser Peter Lauren <peterdlauren@gmail.com> - 2011-04-28 08:12 -0700

Page 6 of 7 — ← Prev page 1 2 3 4 5 [6] 7  Next page →


#1320

FromPeter Lauren <peterdlauren@gmail.com>
Date2011-04-28 12:18 -0700
Message-ID<50cdb9ed-5ac1-4770-9e38-d87508539509@k22g2000yqh.googlegroups.com>
In reply to#1214
On Apr 19, 10:15 pm, William Gill <nos...@domain.invalid> wrote:
> On 4/19/2011 1:46 PM, The Natural Philosopher wrote:
>
>
>
> > William Gill wrote:
>
> >> When a user types peter.example.com into his browser, the browser says
> >> "???" ; then asks one of the root servers (who maintain a list of all
> >> the building directories for the ".com" part of peter.example.com
> >> "where do I begin?"; the root server says "Ask Peter's hosting company
> >> at xxx.xxx.xxx.xxx"
>
> > No. The browser does NOT do that. The browser sends a request to
> > whatever DNS server its configured to look up and the DNS server does
> > all that, and relays the answer back
>
> > And peter, remember that people who assure you they knwo what they are
> > talking about may in fact not know any more than you do..:-)
>
> You are correct, the browser doesn't communicate directly with the root
> servers, but as Tim mentions, it is done on the browser's behalf until
> ultimately the browser gets its answer.
>
> My question then is this: Does splitting that particular hair of the
> name resolution mechanics do more to clarify things for Peter, who had
> some initial difficulty grasping localhost, registrar, and hosting
> company, or does it serve more as an opportunity to show how smart you
> think you are?

Actually I understood the difference between a registrar and a hosting
company.  I registered my name with 1and1 some time back and am
gathering info. about a hosting company.

[toc] | [prev] | [next] | [standalone]


#993

Fromcrankypuss <no@email.thanks>
Date2011-04-07 03:19 -0600
Message-ID<t30rp61n6pj2c4c5popeuehoaog682c4rb@4ax.com>
In reply to#979
Peter Lauren <peterdlauren@gmail.com> wrote:

>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

Double-click is not the same as left-click.  It takes different
actions for each.

> 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/"

I'm not sure where it is if you don't set it where you want it.

>Is the root document the Desktop virtual folder which contains the My
>Documents, My Computer, My Network Places and Recycle Bin virtual
>folders?  Thanks.

I'm not sure what you're asking there.  You probably need to look
through httpd.conf in some detail.  

>>
>> 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.

Best luck having fun with it. <g>

-- 
no aluminum siding offers today

[toc] | [prev] | [next] | [standalone]


#941

FromTim Streater <timstreater@waitrose.com>
Date2011-04-04 09:53 +0100
Message-ID<timstreater-F169A1.09533004042011@news.individual.net>
In reply to#930
In article 
<d1db1616-5fe8-403a-a782-4b3f2061ba7a@m13g2000yqb.googlegroups.com>,
 Peter Lauren <peterdlauren@gmail.com> 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."

Are you running a server on your machine? If not, FF won't be able to 
connect to it at localhost.

> I don't think there's a problem accessing the file.

No server means no one is reading the file. FF is trying to connect to 
the server on your machine and gives up because there isn't one.

> It's just that it doesn't display anything on my browser.

FF has not been given anything to display.

-- 
Tim

"That excessive bail ought not to be required, nor excessive fines imposed,
nor cruel and unusual punishments inflicted"  --  Bill of Rights 1689

[toc] | [prev] | [next] | [standalone]


#913

FromTim Streater <timstreater@waitrose.com>
Date2011-04-03 13:39 +0100
Message-ID<timstreater-DF4075.13394703042011@news.individual.net>
In reply to#911
In article 
<c1edd513-4191-4d35-8325-9da8fd71f242@e21g2000yqe.googlegroups.com>,
 Peter Lauren <peterdlauren@gmail.com> 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.

PHP doesn't run in your browser, or indeed in anyone's browser. You need 
to be running server software such as apache:

+--------------+                                  +----------------+
|              |                                  |                |
|   Your       |                                  | Web Server     |
|  machine     +------- Internet -----------------+ running apache |
|   and        |                                  | (your web page |
| browser      |                                  | is here too)   |
|              |                                  |                |
+--------------+                                  +----------------+

The web server can be your own machine but this doesn't alter the basic 
approach.

-- 
Tim

"That excessive bail ought not to be required, nor excessive fines imposed,
nor cruel and unusual punishments inflicted"  --  Bill of Rights 1689

[toc] | [prev] | [next] | [standalone]


#931

FromPeter Lauren <peterdlauren@gmail.com>
Date2011-04-03 18:42 -0700
Message-ID<27ece291-ca5d-4873-9609-268a5cb0c896@f30g2000yqa.googlegroups.com>
In reply to#913
On Apr 3, 8:39 am, Tim Streater <timstrea...@waitrose.com> wrote:
> In article
> <c1edd513-4191-4d35-8325-9da8fd71f...@e21g2000yqe.googlegroups.com>,
>  Peter Lauren <peterdlau...@gmail.com> 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.
>
> PHP doesn't run in your browser, or indeed in anyone's browser. You need
> to be running server software such as apache:
>
> +--------------+                                  +----------------+
> |              |                                  |                |
> |   Your       |                                  | Web Server     |
> |  machine     +------- Internet -----------------+ running apache |
> |   and        |                                  | (your web page |
> | browser      |                                  | is here too)   |
> |              |                                  |                |
> +--------------+                                  +----------------+
>
> The web server can be your own machine but this doesn't alter the basic
> approach.
>
> --
> Tim
>
> "That excessive bail ought not to be required, nor excessive fines imposed,
> nor cruel and unusual punishments inflicted"  --  Bill of Rights 1689

I've been trying to run Apache which I downloaded from http://www.wampserver.com/en/.
The PHP command works fine in the command Window but I did see a
thread, on their forum, about Apache not starting.  The forum
moderator said that could be because stuff like zonealarm, and
firewall/antivirus may cause a conflict.  I have them running on my PC
but I don't want to turn them off and make my PC vulnerable to
hackers.  Should I use a different version of Apache?  Should I use
WAMP at all?

Thanks,
Peter.

[toc] | [prev] | [next] | [standalone]


#934

FromJerry Stuckle <jstucklex@attglobal.net>
Date2011-04-03 21:55 -0400
Message-ID<inb8f1$jse$3@dont-email.me>
In reply to#931
On 4/3/2011 9:42 PM, Peter Lauren wrote:
> On Apr 3, 8:39 am, Tim Streater<timstrea...@waitrose.com>  wrote:
>> In article
>> <c1edd513-4191-4d35-8325-9da8fd71f...@e21g2000yqe.googlegroups.com>,
>>   Peter Lauren<peterdlau...@gmail.com>  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.
>>
>> PHP doesn't run in your browser, or indeed in anyone's browser. You need
>> to be running server software such as apache:
>>
>> +--------------+                                  +----------------+
>> |              |                                  |                |
>> |   Your       |                                  | Web Server     |
>> |  machine     +------- Internet -----------------+ running apache |
>> |   and        |                                  | (your web page |
>> | browser      |                                  | is here too)   |
>> |              |                                  |                |
>> +--------------+                                  +----------------+
>>
>> The web server can be your own machine but this doesn't alter the basic
>> approach.
>>
>> --
>> Tim
>>
>> "That excessive bail ought not to be required, nor excessive fines imposed,
>> nor cruel and unusual punishments inflicted"  --  Bill of Rights 1689
>
> I've been trying to run Apache which I downloaded from http://www.wampserver.com/en/.
> The PHP command works fine in the command Window but I did see a
> thread, on their forum, about Apache not starting.  The forum
> moderator said that could be because stuff like zonealarm, and
> firewall/antivirus may cause a conflict.  I have them running on my PC
> but I don't want to turn them off and make my PC vulnerable to
> hackers.  Should I use a different version of Apache?  Should I use
> WAMP at all?
>
> Thanks,
> Peter.

Did you try asking in their forum?  They provided the advice; they 
should be able to tell you how to solve it.

And please note that this is a PHP forum - not an Apache setup forum!

-- 
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================

[toc] | [prev] | [next] | [standalone]


#943

Fromcrankypuss <no@email.thanks>
Date2011-04-04 03:48 -0600
Message-ID<um4jp65mojuvornghthi1ftdu26edbktc0@4ax.com>
In reply to#931
Peter Lauren <peterdlauren@gmail.com> wrote:

>On Apr 3, 8:39 am, Tim Streater <timstrea...@waitrose.com> wrote:
>> In article
>> <c1edd513-4191-4d35-8325-9da8fd71f...@e21g2000yqe.googlegroups.com>,
>>  Peter Lauren <peterdlau...@gmail.com> 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.
>>
>> PHP doesn't run in your browser, or indeed in anyone's browser. You need
>> to be running server software such as apache:
>>
>> +--------------+                                  +----------------+
>> |              |                                  |                |
>> |   Your       |                                  | Web Server     |
>> |  machine     +------- Internet -----------------+ running apache |
>> |   and        |                                  | (your web page |
>> | browser      |                                  | is here too)   |
>> |              |                                  |                |
>> +--------------+                                  +----------------+
>>
>> The web server can be your own machine but this doesn't alter the basic
>> approach.
>>
>> --
>> Tim
>>
>> "That excessive bail ought not to be required, nor excessive fines imposed,
>> nor cruel and unusual punishments inflicted"  --  Bill of Rights 1689
>
>I've been trying to run Apache which I downloaded from http://www.wampserver.com/en/.
>The PHP command works fine in the command Window but I did see a
>thread, on their forum, about Apache not starting.  The forum
>moderator said that could be because stuff like zonealarm, and
>firewall/antivirus may cause a conflict.  I have them running on my PC
>but I don't want to turn them off and make my PC vulnerable to
>hackers.  Should I use a different version of Apache?  Should I use
>WAMP at all?
>
>Thanks,
>Peter.

Before you can get PHP to be executed by your local Apache server in
response to a browser request, you have to configure the Apache
server.  It sounds like you haven't done that part yet.  You might
also have to modify the windows "hosts" file.  And be careful not to
make your WAMP/Apache server a security hole that invites the entire
internet world into your PC.  alt.apache.configuration is the group to
ask apache configuration questions in, if you decide that's what you
need.

-- 
no aluminum siding offers today

[toc] | [prev] | [next] | [standalone]


#980

FromPeter Lauren <peterdlauren@gmail.com>
Date2011-04-06 13:43 -0700
Message-ID<ed23792d-f4f6-425e-9fe3-7271f9f2eade@f2g2000yqf.googlegroups.com>
In reply to#943
On Apr 4, 5:48 am, crankypuss <n...@email.thanks> wrote:
  alt.apache.configuration is the group to
> ask apache configuration questions in, if you decide that's what you
> need.
>

Thank you for letting me know about that group.  It's just what I was
looking for.

[toc] | [prev] | [next] | [standalone]


#953

From"Peter H. Coffin" <hellsop@ninehells.com>
Date2011-04-04 17:31 -0500
Message-ID<slrnipkhli.2mh.hellsop@nibelheim.ninehells.com>
In reply to#931
On Sun, 3 Apr 2011 18:42:45 -0700 (PDT), Peter Lauren wrote:
> On Apr 3, 8:39?am, Tim Streater <timstrea...@waitrose.com> wrote:
>> The web server can be your own machine but this doesn't alter the basic
>> approach.
>
> I've been trying to run Apache which I downloaded from http://www.wampserver.com/en/.
> The PHP command works fine in the command Window but I did see a
> thread, on their forum, about Apache not starting.  The forum
> moderator said that could be because stuff like zonealarm, and
> firewall/antivirus may cause a conflict.  

If you've misconfigured them, maybe. Every sane firewall, including
every out-of-the-box one of the major vendors excepts localhost
connections from blocking, because many applications do that to
communicate internally, since Windows doesn't have OS sockets. *USUALLY*
a suggestion that a firewall is causing a problem on a local machines is
an indication that the speaker doesn't really have a clue and isn't
interested in the problem. 

> I have them running on my PC but I don't want to turn them off and
> make my PC vulnerable to hackers. Should I use a different version of
> Apache? Should I use WAMP at all?

WAMP's a perfectly reasonable thing to use. You'll need to make sure
that you've got the services started properly. Which means going back to
the WAMP setup and making sure you've dotted all the tees and crossed all
the eyes. Get that Apache working THEN worry about making PHP hook up to
it. It may be as simple as "you haven't turned it on yet".

-- 
If any foreign minister begins to defend to the death a "peace 
conference," you can be sure his government has already placed its 
orders for new battleships and airplanes.  -Joseph Stalin

[toc] | [prev] | [next] | [standalone]


#985

FromPeter Lauren <peterdlauren@gmail.com>
Date2011-04-06 20:40 -0700
Message-ID<32a14701-0b12-4877-a227-c8b09ca51e68@u8g2000yqh.googlegroups.com>
In reply to#953
Thanks for the info.  It is reassuring that I don't need to invite the
world in on order to connect to the world.  I thought that it should
be possible, and necessary, to have a firewall up when running a
server.

Thanks again,
Peter.

Peter H. Coffin wrote:
> On Sun, 3 Apr 2011 18:42:45 -0700 (PDT), Peter Lauren wrote:
> > On Apr 3, 8:39?am, Tim Streater <timstrea...@waitrose.com> wrote:
> >> The web server can be your own machine but this doesn't alter the basic
> >> approach.
> >
> > I've been trying to run Apache which I downloaded from http://www.wampserver.com/en/.
> > The PHP command works fine in the command Window but I did see a
> > thread, on their forum, about Apache not starting.  The forum
> > moderator said that could be because stuff like zonealarm, and
> > firewall/antivirus may cause a conflict.
>
> If you've misconfigured them, maybe. Every sane firewall, including
> every out-of-the-box one of the major vendors excepts localhost
> connections from blocking, because many applications do that to
> communicate internally, since Windows doesn't have OS sockets. *USUALLY*
> a suggestion that a firewall is causing a problem on a local machines is
> an indication that the speaker doesn't really have a clue and isn't
> interested in the problem.
>
> > I have them running on my PC but I don't want to turn them off and
> > make my PC vulnerable to hackers. Should I use a different version of
> > Apache? Should I use WAMP at all?
>
> WAMP's a perfectly reasonable thing to use. You'll need to make sure
> that you've got the services started properly. Which means going back to
> the WAMP setup and making sure you've dotted all the tees and crossed all
> the eyes. Get that Apache working THEN worry about making PHP hook up to
> it. It may be as simple as "you haven't turned it on yet".
>
> --
> If any foreign minister begins to defend to the death a "peace
> conference," you can be sure his government has already placed its
> orders for new battleships and airplanes.  -Joseph Stalin

[toc] | [prev] | [next] | [standalone]


#950

FromDenis McMahon <denis.m.f.mcmahon@gmail.com>
Date2011-04-04 17:19 +0000
Message-ID<4d99fdab$0$3318$bed64819@gradwell.net>
In reply to#911
On Sun, 03 Apr 2011 04:54:02 -0700, Peter Lauren wrote:

> I am using Windows XP have installed WAMP and PHP as outlined here
> http://www.wampserver.com/en/ ........ [deleted]

Simplified explanation for how php works on a webserver:

1) A surfer users their web browser to send a request to a webserver at 
"http://<host>/<path>/<file>"

("<file>" is usually somename.php)

2) The webserver at "<host>" determines what file in it's filesystem 
"<path>/<file>" refers to.

3) The webserver at "<host>" determines that the file in it's filesystem 
that "<path>/<file>" refers to should be parsed for php code before 
sending it to the surfers browser.

4) The webserver at "<host>" sends the actual file that "<path>/<file>" 
refers to to the php script processor, and then sends the output from the 
php script processor back to the web browser.

You need to check that your web server is working. If it's on the same 
machine as you are developing code on, try using your web browser to 
connect to:

a) http://localhost/

or

b) http://127.0.0.1/

(If it is some other machine, modify the (a) host name or (b) ip address 
as appropriate)

If your web server is working, you should get a default page announcing 
itself as apache (as you have installed wamp).

If you don't get a "welcome to apache webserver" page, then you need to 
start the webserver. That is beyond the scope of my knowledge, try 
googling "wamp start webserver process"

Once the web server is working, you next need to locate where the 
webserver root is. This is not the root of your hard disc (or it damn 
well shouldn't be) and will be specified in a configuration file. Again, 
google is your friend.

In the document root, insert a file called phpinfo.php with the text 
between the cutlines below:

---8<--- cut here ---8<---
<?php phpinfo(); ?>
---8<--- cut here ---8<---

Then connect to the following url:

http://<(a) server host name or (b) server ip address>/phpinfo.php

And if you have been successful, and the web server is running, and your 
configuration is correct, you will get displayed on your screen a large 
amount of information about the php and web server configuration.

Rgds

Denis McMahon

[toc] | [prev] | [next] | [standalone]


#970

FromJim Higgins <invalid@invalid.invalid>
Date2011-04-05 18:36 +0000
Message-ID<cqnmp6pjjps2kjlgb3h1j73u7alkj0jbfk@4ax.com>
In reply to#950
On 04 Apr 2011 17:19:39 GMT, Denis McMahon
<denis.m.f.mcmahon@gmail.com> wrote:

>On Sun, 03 Apr 2011 04:54:02 -0700, Peter Lauren wrote:
>
>> I am using Windows XP have installed WAMP and PHP as outlined here
>> http://www.wampserver.com/en/ ........ [deleted]
>
>Simplified explanation for how php works on a webserver:
>
>1) A surfer users their web browser to send a request to a webserver at 
>"http://<host>/<path>/<file>"
>
>("<file>" is usually somename.php)
>
>2) The webserver at "<host>" determines what file in it's filesystem 
>"<path>/<file>" refers to.
>
>3) The webserver at "<host>" determines that the file in it's filesystem 
>that "<path>/<file>" refers to should be parsed for php code before 
>sending it to the surfers browser.
>
>4) The webserver at "<host>" sends the actual file that "<path>/<file>" 
>refers to to the php script processor, and then sends the output from the 
>php script processor back to the web browser.
>
>You need to check that your web server is working. If it's on the same 
>machine as you are developing code on, try using your web browser to 
>connect to:
>
>a) http://localhost/
>
>or
>
>b) http://127.0.0.1/
>
>(If it is some other machine, modify the (a) host name or (b) ip address 
>as appropriate)
>
>If your web server is working, you should get a default page announcing 
>itself as apache (as you have installed wamp).
>
>If you don't get a "welcome to apache webserver" page, then you need to 
>start the webserver. That is beyond the scope of my knowledge, try 
>googling "wamp start webserver process"
>
>Once the web server is working, you next need to locate where the 
>webserver root is. This is not the root of your hard disc (or it damn 
>well shouldn't be) and will be specified in a configuration file. Again, 
>google is your friend.
>
>In the document root, insert a file called phpinfo.php with the text 
>between the cutlines below:
>
>---8<--- cut here ---8<---
><?php phpinfo(); ?>
>---8<--- cut here ---8<---
>
>Then connect to the following url:
>
>http://<(a) server host name or (b) server ip address>/phpinfo.php
>
>And if you have been successful, and the web server is running, and your 
>configuration is correct, you will get displayed on your screen a large 
>amount of information about the php and web server configuration.


I'm new to the group and the thread...

Denis, the above is good stuff - THANK YOU - but how does one
configure so that simply clicking on that phpinfo.php file results in
the same action as connecting to 
http://localhost/phpinfo.php

The answer to that would make life so much simpler.  Having to type
"http://localhost/" before every file name while trying to develop
something is a total pain in the butt.

[toc] | [prev] | [next] | [standalone]


#971

FromJerry Stuckle <jstucklex@attglobal.net>
Date2011-04-05 16:07 -0400
Message-ID<infsqp$hpq$1@dont-email.me>
In reply to#970
On 4/5/2011 2:36 PM, Jim Higgins wrote:
> On 04 Apr 2011 17:19:39 GMT, Denis McMahon
> <denis.m.f.mcmahon@gmail.com>  wrote:
>
>> On Sun, 03 Apr 2011 04:54:02 -0700, Peter Lauren wrote:
>>
>>> I am using Windows XP have installed WAMP and PHP as outlined here
>>> http://www.wampserver.com/en/ ........ [deleted]
>>
>> Simplified explanation for how php works on a webserver:
>>
>> 1) A surfer users their web browser to send a request to a webserver at
>> "http://<host>/<path>/<file>"
>>
>> ("<file>" is usually somename.php)
>>
>> 2) The webserver at "<host>" determines what file in it's filesystem
>> "<path>/<file>" refers to.
>>
>> 3) The webserver at "<host>" determines that the file in it's filesystem
>> that "<path>/<file>" refers to should be parsed for php code before
>> sending it to the surfers browser.
>>
>> 4) The webserver at "<host>" sends the actual file that"<path>/<file>"
>> refers to to the php script processor, and then sends the output from the
>> php script processor back to the web browser.
>>
>> You need to check that your web server is working. If it's on the same
>> machine as you are developing code on, try using your web browser to
>> connect to:
>>
>> a) http://localhost/
>>
>> or
>>
>> b) http://127.0.0.1/
>>
>> (If it is some other machine, modify the (a) host name or (b) ip address
>> as appropriate)
>>
>> If your web server is working, you should get a default page announcing
>> itself as apache (as you have installed wamp).
>>
>> If you don't get a "welcome to apache webserver" page, then you need to
>> start the webserver. That is beyond the scope of my knowledge, try
>> googling "wamp start webserver process"
>>
>> Once the web server is working, you next need to locate where the
>> webserver root is. This is not the root of your hard disc (or it damn
>> well shouldn't be) and will be specified in a configuration file. Again,
>> google is your friend.
>>
>> In the document root, insert a file called phpinfo.php with the text
>> between the cutlines below:
>>
>> ---8<--- cut here ---8<---
>> <?php phpinfo(); ?>
>> ---8<--- cut here ---8<---
>>
>> Then connect to the following url:
>>
>> http://<(a) server host name or (b) server ip address>/phpinfo.php
>>
>> And if you have been successful, and the web server is running, and your
>> configuration is correct, you will get displayed on your screen a large
>> amount of information about the php and web server configuration.
>
>
> I'm new to the group and the thread...
>
> Denis, the above is good stuff - THANK YOU - but how does one
> configure so that simply clicking on that phpinfo.php file results in
> the same action as connecting to
> http://localhost/phpinfo.php
>
> The answer to that would make life so much simpler.  Having to type
> "http://localhost/" before every file name while trying to develop
> something is a total pain in the butt.

You don't.  You MUST use a web server to serve the php pages.  But then 
that's what links and bookmarks are for.

-- 
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================

[toc] | [prev] | [next] | [standalone]


#973

FromTim Streater <timstreater@waitrose.com>
Date2011-04-05 23:01 +0100
Message-ID<timstreater-CB1128.23010605042011@news.individual.net>
In reply to#970
In article <cqnmp6pjjps2kjlgb3h1j73u7alkj0jbfk@4ax.com>,
 Jim Higgins <invalid@invalid.invalid> wrote:

> On 04 Apr 2011 17:19:39 GMT, Denis McMahon
> <denis.m.f.mcmahon@gmail.com> wrote:

> >Then connect to the following url:
> >
> >http://<(a) server host name or (b) server ip address>/phpinfo.php
> >
> >And if you have been successful, and the web server is running, and your 
> >configuration is correct, you will get displayed on your screen a large 
> >amount of information about the php and web server configuration.
> 
> 
> I'm new to the group and the thread...
> 
> Denis, the above is good stuff - THANK YOU - but how does one
> configure so that simply clicking on that phpinfo.php file results in
> the same action as connecting to 
> http://localhost/phpinfo.php
> 
> The answer to that would make life so much simpler.  Having to type
> "http://localhost/" before every file name while trying to develop
> something is a total pain in the butt.

You're expecting things to work by magic. How do you suppose that 
double-clicking a file is going to make the results display in a window 
of another application?

I gave, in an earlier post, a simple ascii-art picture of how web pages 
are served up. The only way you can avoid that [1] is if the file 
extension is such that double-clicking the file opens it in a browser. 
But in that case, *no* PHP execution will occur, the page will be 
treated as if it contains *only* html. Browsers know nothing about PHP 
and cannot do anything with it. The web server, by contrast, has as one 
of its purposes to feed a requested page to the PHP interpreter, and 
then feed the results of that back to your browser. Once the PHP has 
run, there is no PHP left in the output stream, only the results.

[1] At least, this works on the Mac, I'm assuming the same is true for 
other platforms.

-- 
Tim

"That excessive bail ought not to be required, nor excessive fines imposed,
nor cruel and unusual punishments inflicted"  --  Bill of Rights 1689

[toc] | [prev] | [next] | [standalone]


#974

FromDenis McMahon <denis.m.f.mcmahon@gmail.com>
Date2011-04-05 23:27 +0000
Message-ID<4d9ba56b$0$19594$bed64819@gradwell.net>
In reply to#970
On Tue, 05 Apr 2011 18:36:08 +0000, Jim Higgins wrote:

> Denis, the above is good stuff - THANK YOU - but how does one configure
> so that simply clicking on that phpinfo.php file results in the same
> action as connecting to
> http://localhost/phpinfo.php

You can't.

Well, possibly you can, but it's more complex than I can set up quickly. 
You'd need to code something that would generate an appropriate url and 
pass it to your web browser, and to generate the url you'd need to know 
where under your document root the file was, so you would have to:

1) find the actual file system path to the file
2) compare to the file system path for docroot
3) if the leftmost part of the filesystem path matches the docroot path, 
remove it
3a) convert from windows to url format paths if appropriate
4) add the http://localhost/ in place of the removed part
5) call the web browser with the url

eg if the file is:

c:\documents and settings\jim higgins\testing\htdocs\test1\phpinfo.php

and the apache docroot is:

c:\documents and settings\jim higgins\testing\htdocs

then you need to invoke a browser with the url:

http://localhost/test1/phpinfo.php

It's probably possibly on a linux box with a bit of scripting, I have no 
idea how to do it on a windows box, but personally, I want php files on 
the server to open in my text editor when I double click them.

Rgds

Denis McMahon

[toc] | [prev] | [next] | [standalone]


#1064

FromWilliam Gill <nospam@domain.invalid>
Date2011-04-13 12:14 -0400
Message-ID<io4i64$t26$1@dont-email.me>
In reply to#970
On 4/5/2011 2:36 PM, Jim Higgins wrote:
> Denis, the above is good stuff - THANK YOU - but how does one
> configure so that simply clicking on that phpinfo.php file results in
> the same action as connecting to
> http://localhost/phpinfo.php
>
> The answer to that would make life so much simpler.  Having to type
> "http://localhost/" before every file name while trying to develop
> something is a total pain in the butt.

There are two things you can do to "make life so much simpler", both are 
beyond the scope of this forum.  However, they are:

1) set up an IDE to run your php script/file as you edit i.e. PSPad 
w/appropriate compiler settings to execute PHP.

and

2) establish virtual host(s) in your host file and httpd.conf or 
httpd-vhosts.conf. the vhost (ServerName) can be any name you like such 
as "dev" or "dev1." If you really want to "make life so much simpler" 
set DirectoryIndex to the name of your file, or simply name your file 
index.php while testing.  Then all you have to type into the browser is 
"dev" (you don't even need the "http://" because the browser will assume 
that for you.

However, like I said. Further details should be sought in Apache and 
PSPad documentation.

BTW I stopped using wamp configurations on my Win boxes in favor of 
individual installation of each component (Apache, PHP, MySql, etc.) 
because it gave me greater control over my environment, and updates. It 
requires a little more effort up front, but helps to insure you know 
what's what, and pays off in many ways.

[toc] | [prev] | [next] | [standalone]


#983

FromPeter Lauren <peterdlauren@gmail.com>
Date2011-04-06 20:18 -0700
Message-ID<d7aec0ce-33b3-476f-b846-2237b9421fa6@d28g2000yqf.googlegroups.com>
In reply to#950
On Apr 4, 1:19 pm, Denis McMahon <denis.m.f.mcma...@gmail.com> wrote:
> On Sun, 03 Apr 2011 04:54:02 -0700, Peter Lauren wrote:
> > I am using Windows XP have installed WAMP and PHP as outlined here
> >http://www.wampserver.com/en/........ [deleted]
>
> Simplified explanation for how php works on a webserver:
>
> 1) A surfer users their web browser to send a request to a webserver at
> "http://<host>/<path>/<file>"
>
> ("<file>" is usually somename.php)
>
> 2) The webserver at "<host>" determines what file in it's filesystem
> "<path>/<file>" refers to.
>
> 3) The webserver at "<host>" determines that the file in it's filesystem
> that "<path>/<file>" refers to should be parsed for php code before
> sending it to the surfers browser.
>
> 4) The webserver at "<host>" sends the actual file that "<path>/<file>"
> refers to to the php script processor, and then sends the output from the
> php script processor back to the web browser.
>
> You need to check that your web server is working. If it's on the same
> machine as you are developing code on, try using your web browser to
> connect to:
>
> a)http://localhost/
>
> or
>
> b)http://127.0.0.1/
>
> (If it is some other machine, modify the (a) host name or (b) ip address
> as appropriate)
>
> If your web server is working, you should get a default page announcing
> itself as apache (as you have installed wamp).
>
> If you don't get a "welcome to apache webserver" page, then you need to
> start the webserver. That is beyond the scope of my knowledge, try
> googling "wamp start webserver process"
>
> Once the web server is working, you next need to locate where the
> webserver root is. This is not the root of your hard disc (or it damn
> well shouldn't be) and will be specified in a configuration file. Again,
> google is your friend.
>
> In the document root, insert a file called phpinfo.php with the text
> between the cutlines below:
>
> ---8<--- cut here ---8<---
> <?php phpinfo(); ?>
> ---8<--- cut here ---8<---
>
> Then connect to the following url:
>
> http://<(a) server host name or (b) server ip address>/phpinfo.php
>
> And if you have been successful, and the web server is running, and your
> configuration is correct, you will get displayed on your screen a large
> amount of information about the php and web server configuration.
>
> Rgds
>
> Denis McMahon

Hi Denis,

On Win XP I went to Start:Run and ran
net start wampapache

When I go to http://localhost/, I get a page with the wampserver icon
and a bunch of stuff including the following.

 Server Configuration

Apache Version :
    2.2.17
PHP Version :
    5.3.5
Loaded Extensions :

        * Core
        * bcmath
        * calendar
[and several other extensions]

MySQL Version :
    5.5.8
---------------------------------------------------------------

The httpd.conf file gives DocumentRoot "c:/wamp/www/"

However when I just have <a href="index.php">PHP</a>
on my web page, I get a message that it cannot find the file because
it is looking in the folder that contains the html file.  When I use
<a href="c:/wamp/www/index.php">PHP</a>
I get an alert message "Firefox doesn't know how to open this address,
because the protocol (c) isn't associated with any program"

Thanks,
Peter.

[toc] | [prev] | [next] | [standalone]


#984

FromPeter Lauren <peterdlauren@gmail.com>
Date2011-04-06 20:19 -0700
Message-ID<5fc91d44-39ef-4966-abe5-85b6b1a559ab@j13g2000yqj.googlegroups.com>
In reply to#950
On Apr 4, 1:19 pm, Denis McMahon <denis.m.f.mcma...@gmail.com> wrote:
> On Sun, 03 Apr 2011 04:54:02 -0700, Peter Lauren wrote:
> > I am using Windows XP have installed WAMP and PHP as outlined here
> >http://www.wampserver.com/en/........ [deleted]
>
> Simplified explanation for how php works on a webserver:
>
> 1) A surfer users their web browser to send a request to a webserver at
> "http://<host>/<path>/<file>"
>
> ("<file>" is usually somename.php)
>
> 2) The webserver at "<host>" determines what file in it's filesystem
> "<path>/<file>" refers to.
>
> 3) The webserver at "<host>" determines that the file in it's filesystem
> that "<path>/<file>" refers to should be parsed for php code before
> sending it to the surfers browser.
>
> 4) The webserver at "<host>" sends the actual file that "<path>/<file>"
> refers to to the php script processor, and then sends the output from the
> php script processor back to the web browser.
>
> You need to check that your web server is working. If it's on the same
> machine as you are developing code on, try using your web browser to
> connect to:
>
> a)http://localhost/
>
> or
>
> b)http://127.0.0.1/
>
> (If it is some other machine, modify the (a) host name or (b) ip address
> as appropriate)
>
> If your web server is working, you should get a default page announcing
> itself as apache (as you have installed wamp).
>
> If you don't get a "welcome to apache webserver" page, then you need to
> start the webserver. That is beyond the scope of my knowledge, try
> googling "wamp start webserver process"
>
> Once the web server is working, you next need to locate where the
> webserver root is. This is not the root of your hard disc (or it damn
> well shouldn't be) and will be specified in a configuration file. Again,
> google is your friend.
>
> In the document root, insert a file called phpinfo.php with the text
> between the cutlines below:
>
> ---8<--- cut here ---8<---
> <?php phpinfo(); ?>
> ---8<--- cut here ---8<---
>
> Then connect to the following url:
>
> http://<(a) server host name or (b) server ip address>/phpinfo.php
>
> And if you have been successful, and the web server is running, and your
> configuration is correct, you will get displayed on your screen a large
> amount of information about the php and web server configuration.
>
> Rgds
>
> Denis McMahon

Hi Denis,

On Win XP I went to Start:Run and ran
net start wampapache

When I go to http://localhost/, I get a page with the wampserver icon
and a bunch of stuff including the following.

 Server Configuration

Apache Version :
    2.2.17
PHP Version :
    5.3.5
Loaded Extensions :

        * Core
        * bcmath
        * calendar
[and several other extensions]

MySQL Version :
    5.5.8
---------------------------------------------------------------

The httpd.conf file gives DocumentRoot "c:/wamp/www/"

However when I just have <a href="index.php">PHP</a>
on my web page, I get a message that it cannot find the file because
it is looking in the folder that contains the html file.  When I use
<a href="c:/wamp/www/index.php">PHP</a>
I get an alert message "Firefox doesn't know how to open this address,
because the protocol (c) isn't associated with any program"

Thanks,
Peter.

[toc] | [prev] | [next] | [standalone]


#996

FromDenis McMahon <denis.m.f.mcmahon@gmail.com>
Date2011-04-07 13:16 +0000
Message-ID<4d9db912$0$26521$bed64819@gradwell.net>
In reply to#984
On Wed, 06 Apr 2011 20:19:00 -0700, Peter Lauren wrote:

> On Apr 4, 1:19 pm, Denis McMahon <denis.m.f.mcma...@gmail.com> wrote:
>> On Sun, 03 Apr 2011 04:54:02 -0700, Peter Lauren wrote:
>> > I am using Windows XP have installed WAMP and PHP as outlined here
>> >http://www.wampserver.com/en/........ [deleted]
>>
>> Simplified explanation for how php works on a webserver:
>>
>> 1) A surfer users their web browser to send a request to a webserver at
>> "http://<host>/<path>/<file>"
>>
>> ("<file>" is usually somename.php)
>>
>> 2) The webserver at "<host>" determines what file in it's filesystem
>> "<path>/<file>" refers to.
>>
>> 3) The webserver at "<host>" determines that the file in it's
>> filesystem that "<path>/<file>" refers to should be parsed for php code
>> before sending it to the surfers browser.
>>
>> 4) The webserver at "<host>" sends the actual file that "<path>/<file>"
>> refers to to the php script processor, and then sends the output from
>> the php script processor back to the web browser.
>>
>> You need to check that your web server is working. If it's on the same
>> machine as you are developing code on, try using your web browser to
>> connect to:
>>
>> a)http://localhost/
>>
>> or
>>
>> b)http://127.0.0.1/
>>
>> (If it is some other machine, modify the (a) host name or (b) ip
>> address as appropriate)
>>
>> If your web server is working, you should get a default page announcing
>> itself as apache (as you have installed wamp).
>>
>> If you don't get a "welcome to apache webserver" page, then you need to
>> start the webserver. That is beyond the scope of my knowledge, try
>> googling "wamp start webserver process"
>>
>> Once the web server is working, you next need to locate where the
>> webserver root is. This is not the root of your hard disc (or it damn
>> well shouldn't be) and will be specified in a configuration file.
>> Again, google is your friend.
>>
>> In the document root, insert a file called phpinfo.php with the text
>> between the cutlines below:
>>
>> ---8<--- cut here ---8<---
>> <?php phpinfo(); ?>
>> ---8<--- cut here ---8<---
>>
>> Then connect to the following url:
>>
>> http://<(a) server host name or (b) server ip address>/phpinfo.php
>>
>> And if you have been successful, and the web server is running, and
>> your configuration is correct, you will get displayed on your screen a
>> large amount of information about the php and web server configuration.
>>
>> Rgds
>>
>> Denis McMahon
> 
> Hi Denis,
> 
> On Win XP I went to Start:Run and ran net start wampapache
> 
> When I go to http://localhost/, I get a page with the wampserver icon
> and a bunch of stuff including the following.
> 
>  Server Configuration
> 
> Apache Version :
>     2.2.17
> PHP Version :
>     5.3.5
> Loaded Extensions :
> 
>         * Core
>         * bcmath
>         * calendar
> [and several other extensions]
> 
> MySQL Version :
>     5.5.8
> ---------------------------------------------------------------
> 
> The httpd.conf file gives DocumentRoot "c:/wamp/www/"
> 
> However when I just have <a href="index.php">PHP</a> on my web page, I
> get a message that it cannot find the file because it is looking in the
> folder that contains the html file.  When I use <a
> href="c:/wamp/www/index.php">PHP</a> I get an alert message "Firefox
> doesn't know how to open this address, because the protocol (c) isn't
> associated with any program"
> 
> Thanks,
> Peter.


1) If the php file doesn't exist, then of course your web server will 
give an error message 404 if it is asked for it.

2) You must use url style addressing in href="" in your web documents, 
not operating system based file paths.

3) The file that I suggested you create was:

>> In the document root, insert a file called phpinfo.php with the text
>> between the cutlines below:
>>
>> ---8<--- cut here ---8<---
>> <?php phpinfo(); ?>
>> ---8<--- cut here ---8<---
>>
>> Then connect to the following url:
>>
>> http://<(a) server host name or (b) server ip address>/phpinfo.php

So:

1) create a file in eg notepad that just contains the following as a 
single line of text:

<?php phpinfo(); ?>

2) save it in directory "c:\wamp\www\" as filename "phpinfo.php"

3) access it in your web browser as "http://localhost/phpinfo.php"

Now, if you want a file called "index.php" you have to create that file 
in the directory "c:\wamp\www" and it should probably contain php script 
commands.

Rgds

Denis McMahon

[toc] | [prev] | [next] | [standalone]


#997

FromDenis McMahon <denis.m.f.mcmahon@gmail.com>
Date2011-04-07 14:09 +0000
Message-ID<4d9dc592$0$26521$bed64819@gradwell.net>
In reply to#984
On Wed, 06 Apr 2011 20:19:00 -0700, Peter Lauren wrote:

> The httpd.conf file gives DocumentRoot "c:/wamp/www/"

The following is something you ABSOLUTELY MUST understand:

DocumentRoot is a definition for the software running on your machine and 
is relative to your local file system.

internet www urls know EXACTLY NOTHING about the filesystem of the 
machine that is running any given webserver

File name "fred.type" in the directory defined by "DocumentRoot" on the 
machine at ip address "a.b.c.d" is referenced with the url: "http//
a.b.c.d/fred.type"

If the machine also has a dns entry that maps name "webserver" to ip 
address "a.b.c.d", then the file can also be referenced with the url 
"http//webserver/fred.type"

the dns name "localhost" is a special dns name for the special ip address 
"127.0.0.1" which means "the same machine as I am", this means that if 
your web server is running on the same machine that you are using a web 
browser on, you can look at html file "filename.htm" or php file 
"filename.php" in the DocumentRoot" by using the urls "http://localhost/
filename.htm" and "http://localhost/filename.php" respectively in the 
address bar of your browser.

Note, however, that you REALLY REALLY SHOULD NOT use "localhost" or 
"127.0.0.1" in any url inside a file in the "DocumentRoot" directory or 
it's sub directories, as the special dns entry and special ip address 
will ONLY WORK if you are using a browser on the SAME MACHINE as the 
webserver.

So, for example if you want to include a link to the file at "c:\wamp\www
\index.php" inside the file "c:\wamp\www\index.htm" so that you link from 
the htm file to the php file when DocumentRoot is "c:\wamp\www", your 
link inside the htm file would look something like:

<a href="index.php">link text</a>

And when you access the file "http://localhost/index.htm" and clink on 
the link "link text" it should then jump to the output of the php script 
"index.php".

Of course, "index.php" needs some php code inside it for this to work. 
Try the following line for a start:

<?php echo "<p>Hello, This is php</p>"; ?>

Here endeth the lesson. If you have not now managed to get your server 
displaying php files correctly, then either (a) your configuration is 
broken, (b) your installation is broken, (c) I screwed up the 
instructions, or (d) you're not following the instructions correctly.

If (c) is the case, I'm sure several people will tell us both!

Rgds

Denis McMahon

[toc] | [prev] | [next] | [standalone]


Page 6 of 7 — ← Prev page 1 2 3 4 5 [6] 7  Next page →

Back to top | Article view | comp.lang.php


csiph-web