By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,812 Members | 863 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,812 IT Pros & Developers. It's quick & easy.

Php page does not load after installing PHPTriad?

P: n/a
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\htdocs) 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\htdocs\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.


Jul 17 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a

"Jack" <no@mail.com> wrote in message
news:cj**********@news3.zwoll1.ov.home.nl...
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\htdocs) 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\htdocs\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.


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\htdocs folder what
you do NOT do is enter the address "C:\apache\htdocs" 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\htdocs\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


Jul 17 '05 #2

P: n/a

"Tony Marston" <to**@NOSPAM.demon.co.uk> wrote in message
news:cj*******************@news.demon.co.uk...

"Jack" <no@mail.com> wrote in message
news:cj**********@news3.zwoll1.ov.home.nl...
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\htdocs) 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\htdocs\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.
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\htdocs folder

what you do NOT do is enter the address "C:\apache\htdocs" 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\htdocs\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


Thanks thats it! :-)
Jul 17 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.