Live view test server won't execute php scripts
Hello everyone!
I've had a web developer design a site for me based on php. Rather than
bother them for simple image changes and content updates, I'm trying to learn
to do those things myself. I'm very new to Dreamweaver and I'm having
difficulties getting php script to execute through my test server. I have the
latest versions of Dreamweaver, MySQL, php, and Apache installed on my machine.
I've downloaded the source files off of my hosting server. The problem is
when I try to "Live View" the "index.php" off of the root file on the test
server, Dreamweaver gives me an error that says:
"The testing server did not execute any of the scripts in your document.
Possible explanations include:
1.> The test server is not running
2.> The test server ignores files with .php. in the extension
3.> The documents did not contain any scripts."
I know my system is working properly because I created a page "timetest.php"
with the following code:
<p>This page was created at <?php echo date("h:i:s a", time()); ?> on
the computer running PHP.</p>
...and it works fine in "Live View".
Any ideas what the problem might be? I've been reading books and searching
online and I haven't been able to figure it out. Here's what the code on
"index.php" looks like:
<?
#
--------------------------------------------------------------------------------
--------------------
# * FILE: /index.php
#
--------------------------------------------------------------------------------
--------------------
#
--------------------------------------------------------------------------------
--------------------
# LOAD CONFIG
#
--------------------------------------------------------------------------------
--------------------
include("./conf/loadconfig.inc.php");
#
--------------------------------------------------------------------------------
--------------------
# SITE CONTENT
#
--------------------------------------------------------------------------------
--------------------
$contentObj = new Content();
$sitecontentinfo = $contentObj->retrieveContentInfoByType("Home Page");
if ($sitecontentinfo) {
$headertagtitle = $sitecontentinfo["title"];
$headertagdescription = $sitecontentinfo["description"];
$headertagkeywords = $sitecontentinfo["keywords"];
$sitecontent = $sitecontentinfo["content"];
} else {
$headertagtitle = "";
$headertagdescription = "";
$headertagkeywords = "";
$sitecontent = "";
}
#
--------------------------------------------------------------------------------
--------------------
# HEADER
#
--------------------------------------------------------------------------------
--------------------
$extrastyle = array(DEFAULT_URL."/layout/general_front.css",
DEFAULT_URL."/layout/color/".LAYOUT_THEME_COLOR.".css");
$headertag_title = $headertagtitle;
$headertag_description = $headertagdescription;
$headertag_keywords = $headertagkeywords;
include(DIRECTORY_ROOT."/layout/header.php");
?>
<blockquote class="leftContent">
<?
// LEFT SEARCH
include(DIRECTORY_ROOT."/listing/search.php");
?>
<? /* ul class="standard-iconlink">
<li class="favoritesview-icon">
<a href="<?=DEFAULT_URL?>/favorites.php<?=$favorites_lnk?>">View Quick
List</a>
</li>
</ul>
<? // BASE JOIN
include(INCLUDES_DIR."/views/view_join.php");
*/ ?>
<? // GOOGLE ADS
include(INCLUDES_DIR."/code/google_ads.php");
?>
<?
$banner = system_showBanner("TEXT_AD", $category_id, $banner_section,
$amount = 2);
if ($banner) {
?><div class="bannerleftText"><?=$banner?></div><?
}
?>
</blockquote>
<blockquote class="middleContent">
<?
if ($sitecontent) {
echo "<div class=\"dynamicContent\">".$sitecontent."</div>";
}
?>
<? include(DIRECTORY_ROOT."/front_featured_listing.php"); ?>
<? //CR 3510 Comment Promotion and Ratings functionality
/*
<? include(DIRECTORY_ROOT."/front_featured_promotion.php"); ?>
*/?>
<? if (CLASSIFIED_FEATURE == "on")
include(DIRECTORY_ROOT."/front_featured_classified.php"); ?>
<? if (ARTICLE_FEATURE == "on")
include(DIRECTORY_ROOT."/front_featured_article.php"); ?>
<?
$contentObj = new Content();
$content = $contentObj->retrieveContentByType("Home Page Bottom");
if ($content) {
echo "<blockquote>";
echo "<div class=\"dynamicContent\">".$content."</div>";
echo "</blockquote>";
}
?>
</blockquote>
<? /*
<blockquote class="rightContent">
<? if (EVENT_FEATURE == "on")
include(DIRECTORY_ROOT."/front_featured_event.php"); ?>
<?
$banner = system_showBanner("FEATURED", $category_id, $banner_section,
$amount = 3);
if ($banner) {
?><div
class="rightBanner"><h4>Advertisers</h4><span><?=$banner?></span></div><?
}
?>
</blockquote>
*/?>
<?
#
--------------------------------------------------------------------------------
--------------------
# FOOTER
#
--------------------------------------------------------------------------------
--------------------
include(DIRECTORY_ROOT."/layout/footer.php");
?>
|