Php page does not load after installing PHPTriad?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Jack

    Php page does not load after installing PHPTriad?

    Hi there,

    I just installed PHPTriad all went good. I started Apache and MySql
    services.

    If i do http://127.0.0.1. (same as: C:\apache\htdoc s) in by browser i get
    the welcome page of PHPTriad so this looks good.

    Now i want to open a php file so i do this: C:\apache\htdoc s\firstphp.php

    What happens next: Homesite opens and shows me the code:

    <?php
    echo "Hello World!";
    ?>
    and
    <?php
    print ("Hello World!");
    ?>

    If i want to open this in IE i also just see the code, does anyone know what
    i did wrong and why the php file is not loading properly? What did i miss?
    Thanks for responding.
    Jack.




  • Tony Marston

    #2
    Re: Php page does not load after installing PHPTriad?


    "Jack" <no@mail.com> wrote in message
    news:cj61i0$f84 $1@news3.zwoll1 .ov.home.nl...[color=blue]
    > Hi there,
    >
    > I just installed PHPTriad all went good. I started Apache and MySql
    > services.
    >
    > If i do http://127.0.0.1. (same as: C:\apache\htdoc s) in by browser i get
    > the welcome page of PHPTriad so this looks good.
    >
    > Now i want to open a php file so i do this: C:\apache\htdoc s\firstphp.php
    >
    > What happens next: Homesite opens and shows me the code:
    >
    > <?php
    > echo "Hello World!";
    > ?>
    > and
    > <?php
    > print ("Hello World!");
    > ?>
    >
    > If i want to open this in IE i also just see the code, does anyone know
    > what
    > i did wrong and why the php file is not loading properly? What did i miss?
    > Thanks for responding.
    > Jack.[/color]

    If you access http://127.0.0.1 in your browser and the "Welcome to Apache"
    page shows up, then you have set everything up correctly.

    If you then want to access a PHP script in you C:\apache\htdoc s folder what
    you do NOT do is enter the address "C:\apache\htdo cs" in your browser as
    this will not go through Apache. The correct address is
    http://127.0.0.1/script.php If your script exists in
    C:\apache\htdoc s\folder1 then you access it using
    http://127.0.0.1/folder1/script.php.

    Simply pointing your browser at a PHP file will not get it executed - you
    must go through the Apache web server via http://127.0.0.1. The web server
    will then process it before passing the results to the web browser.

    HTH.

    --
    Tony Marston

    This is Tony Marston's web site, containing personal information plus pages devoted to the Uniface 4GL development language, XML and XSL, PHP and MySQL, and a bit of COBOL





    Comment

    • Jack

      #3
      Re: Php page does not load after installing PHPTriad?


      "Tony Marston" <tony@NOSPAM.de mon.co.uk> wrote in message
      news:cj64j7$bnb $1$830fa17d@new s.demon.co.uk.. .[color=blue]
      >
      > "Jack" <no@mail.com> wrote in message
      > news:cj61i0$f84 $1@news3.zwoll1 .ov.home.nl...[color=green]
      > > Hi there,
      > >
      > > I just installed PHPTriad all went good. I started Apache and MySql
      > > services.
      > >
      > > If i do http://127.0.0.1. (same as: C:\apache\htdoc s) in by browser i[/color][/color]
      get[color=blue][color=green]
      > > the welcome page of PHPTriad so this looks good.
      > >
      > > Now i want to open a php file so i do this:[/color][/color]
      C:\apache\htdoc s\firstphp.php[color=blue][color=green]
      > >
      > > What happens next: Homesite opens and shows me the code:
      > >
      > > <?php
      > > echo "Hello World!";
      > > ?>
      > > and
      > > <?php
      > > print ("Hello World!");
      > > ?>
      > >
      > > If i want to open this in IE i also just see the code, does anyone know
      > > what
      > > i did wrong and why the php file is not loading properly? What did i[/color][/color]
      miss?[color=blue][color=green]
      > > Thanks for responding.
      > > Jack.[/color]
      >
      > If you access http://127.0.0.1 in your browser and the "Welcome to Apache"
      > page shows up, then you have set everything up correctly.
      >
      > If you then want to access a PHP script in you C:\apache\htdoc s folder[/color]
      what[color=blue]
      > you do NOT do is enter the address "C:\apache\htdo cs" in your browser as
      > this will not go through Apache. The correct address is
      > http://127.0.0.1/script.php If your script exists in
      > C:\apache\htdoc s\folder1 then you access it using
      > http://127.0.0.1/folder1/script.php.
      >
      > Simply pointing your browser at a PHP file will not get it executed - you
      > must go through the Apache web server via http://127.0.0.1. The web server
      > will then process it before passing the results to the web browser.
      >
      > HTH.
      >
      > --
      > Tony Marston
      >
      > http://www.tonymarston.net
      >[/color]

      Thanks thats it! :-)


      Comment

      Working...