localhost, FrontPage and PHP problems
Posted by: scottmacneill (---.sip.cha.bellsouth.net)
Date: January 24, 2008 11:52PM

I am very much a novice when it comes to both WampServer2 and PHP programming so it's not too surprising that I keep coming up with problems. I appreciate your help, however.

My latest problem is that whenever I use the 'localhost' to check out my web pages I can get either PHP or XHTML to function but not both.

If I try using a page containing only PHP code everything works fine. If I use a page containing only html code, everything works fine. If I combine the two, the html functions but the PHP is dropped.

Sending the combined page up to my actual server and accessing it there executes both the html and the PHP code. This is very simplistic page containing a couple of lines of html code and a phpinfo() request.

How can I get localhost to operate like my server? Is there any way to get FrontPage to execute PHP code via localhost?

Thanks again for all the help.

Options: ReplyQuote
Re: localhost, FrontPage and PHP problems
Posted by: yfastud (Moderator)
Date: January 25, 2008 04:37AM

Can you put a sample codes of the combine you're talking about

Have fun,

FREE One A Day
FREE Photo
FREE Games
FREE Websites
FREE Portable GPS
FREE WAMP Guides

Options: ReplyQuote
Re: localhost, FrontPage and PHP problems
Posted by: scottmacneill (---.sip.cha.bellsouth.net)
Date: January 25, 2008 05:28PM

The code I was using as a test is as follows:

<!-- Testing ability to include header data vis PHP file access -->
<html lang="en" xmlns="[www.w3.org];
<head>
<meta name="generator" content=
"HTML Tidy for Windows (vers 13 May 2007), see www.w3.org" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

<title>First Baptist Church McCaysville/Copperhill</title>
<meta name="KEYWORDS" content="site keywords here" />
<meta name="DESCRIPTION" content="site description here" />
<link rel="stylesheet" href="FBC%20Style.css" type="text/css" />
</head>

<body>

<br />

<h1>This is a line in H1 color</h1><br />

<h2>This is a line in h2 color</h2><br />

<h3>This is a line in h3 color</h3><br />

<h4>This is a line in h4 color</h4><br />

<h5>This is a line in h5 color</h5><br />

<h6>This is a line in h6 color</h6><br />

<?php phpinfo(); ?>

</body></html>

Options: ReplyQuote
Re: localhost, FrontPage and PHP problems
Posted by: yfastud (Moderator)
Date: January 25, 2008 07:15PM

Since I haven no problem running your example, so the question is: did you save the file as php?

Have fun,

FREE One A Day
FREE Photo
FREE Games
FREE Websites
FREE Portable GPS
FREE WAMP Guides

Options: ReplyQuote
Re: localhost, FrontPage and PHP problems
Posted by: scottmacneill (---.sip.cha.bellsouth.net)
Date: January 25, 2008 10:12PM

I did save it as a .php file. Actually, I tried both php and html extensions to no avail.

Is there some setting that I'm missing? I have also noticed that if I try something like the following:

<?php
print "This is line1/n";
print "This is line2/n";
?>

When I run the script, the output shows as follows:

This is line1Thisis line2

i.e. The /n new line command is ignored.

Smething is definitely messed up with my installation (Which I have done 3X).

Options: ReplyQuote


Sorry, only registered users may post in this forum.