Hi all,
I need some help
here the setup xampp on a windows pc
all page work except
wxgraphs.php
Server error.
The website encountered an error while retrieving
http://192.168.1.4/wxgraphs.php. It may be down for maintenance or configured incorrectly.
Here are some suggestions:
Reload this web page later.
More information on this error
Below is the original error message
HTTP Error 500 (Internal Server Error): An unexpected condition was encountered while the server was attempting to fulfill the request.
Code: Select all
<?php
############################################################################
# A Project of TNET Services, Inc. and Saratoga-Weather.org (Canada/World-ML template set)
############################################################################
#
# Project: Sample Included Website Design
# Module: sample.php
# Purpose: Sample Page
# Authors: Kevin W. Reed <kreed@tnet.com>
# TNET Services, Inc.
#
# Copyright: (c) 1992-2007 Copyright TNET Services, Inc.
############################################################################
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
############################################################################
# This document uses Tab 4 Settings
############################################################################
require_once("Settings.php");
require_once("common.php");
############################################################################
$TITLE= $SITE['organ'] . " - " . langtransstr("Trend Graphs");
$showGizmo = true; // set to false to exclude the gizmo
include("top.php");
############################################################################
?>
</head>
<body>
<?php
############################################################################
include("header.php");
############################################################################
include("menubar.php");
############################################################################
$graphImageDir = './';
if(isset($SITE['graphImageDir'])) {$graphImageDir = $SITE['graphImageDir']; }
?>
<div id="main-copy">
<h1><?php langtrans('Weather Trend Graphs'); ?></h1>
<?php if(isset($SITE['WXsoftware']) and $SITE['WXsoftware'] <> '') { // have software defined ?>
<p><?php print langtrans('Graphs generated by')." ".$SITE['WXsoftwareLongName']." "; ?>
<?php if(isset($wdversion)) {echo " (".$wdversion.")";} ?></p>
<?php } else { // software not defined yet ?>
<p> </p>
<p>Weather software not specified in configuration.</p>
<?php } // end software not defined yet ?>
<?php if(isset($SITE['WXsoftware']) and $SITE['WXsoftware'] == 'WL') { // WeatherLink graph names ?>
<h2><?php echo langtransstr('Temperature') . ' / ' . langtransstr('Humidity'); ?></h2>
<?php genImageLink('OutsideTempHistory.gif','Temperature'); ?>
<?php genImageLink('OutsideHumidityHistory.gif','Humidity'); ?>
<br />
<?php genImageLink('DewPointHistory.gif','Dew Point'); ?>
<?php genImageLink('THWHistory.gif','THW Index'); ?>
<br />
<?php genImageLink('WindChillHistory.gif','Wind Chill'); ?>
<?php genImageLink('HeatIndexHistory.gif','Heat Index'); ?>
<br />
<h2><?php echo langtransstr('Wind') . ' / ' . langtransstr('Barometer'); ?></h2>
<?php genImageLink('WindSpeedHistory.gif','Wind Speed'); ?>
<?php genImageLink('WindDirectionHistory.gif','Wind Direction'); ?>
<br />
<?php genImageLink('HiWindSpeedHistory.gif','High Wind Speed'); ?>
<?php genImageLink('BarometerHistory.gif','Barometer'); ?>
<br />
<h2><?php langtrans('Rain'); ?></h2>
<?php genImageLink('RainHistory.gif','Rain'); ?>
<?php genImageLink('RainRateHistory.gif','Rain Rate'); ?>
<br />
<?php // figure out to display solar and/or UV based on site settings
if($SITE['SOLAR'] and $SITE['UV']) { // have both sensors ?>
<h2><?php echo langtransstr('Solar Radiation') . ' / ' . langtransstr('UV Index'); ?></h2>
<?php genImageLink('SolarRadHistory.gif','Solar Radiation'); ?>
<?php genImageLink('UVHistory.gif','UV Index'); ?>
<? } elseif ($SITE['SOLAR']) { ?>
<h2><?php echo langtransstr('Solar Radiation'); ?></h2>
<?php genImageLink('SolarRadHistory.gif','Solar Radiation'); ?>
<? } elseif ($SITE['UV']) { ?>
<h2><?php echo langtransstr('UV Index'); ?></h2>
<?php genImageLink('UVHistory.gif','UV Index'); ?>
<? } // end solar/uv selection ?>
<?php } // end WeatherLink graph names ?>
<?php if(isset($SITE['WXsoftware']) and $SITE['WXsoftware'] == 'VWS') { // VWS graph names ?>
<h2><?php echo langtransstr('Temperature') . ' / ' . langtransstr('Humidity'); ?></h2>
<?php genImageLink('vws742.jpg','Temperature'); ?>
<?php genImageLink('vws740.jpg','Humidity'); ?>
<br />
<?php genImageLink('vws757.jpg','Dew Point'); ?>
<?php genImageLink('vws2811.jpg','THW Index'); ?>
<br />
<?php genImageLink('vws754.jpg','Wind Chill'); ?>
<?php genImageLink('vws756.jpg','Heat Index'); ?>
<br />
<h2><?php echo langtransstr('Wind') . ' / ' . langtransstr('Barometer'); ?></h2>
<?php genImageLink('vws737.jpg','Wind Speed'); ?>
<?php genImageLink('vws736.jpg','Wind Direction'); ?>
<br />
<?php genImageLink('vws1325.jpg','High Wind Speed'); ?>
<?php genImageLink('vws758.jpg','Barometer'); ?>
<br />
<h2><?php langtrans('Rain'); ?></h2>
<?php genImageLink('vws744.jpg','Rain'); ?>
<?php genImageLink('vws859.jpg','Rain Rate'); ?>
<br />
<?php // figure out to display solar and/or UV based on site settings
if($SITE['SOLAR'] and $SITE['UV']) { // have both sensors ?>
<h2><?php echo langtransstr('Solar Radiation') . ' / ' . langtransstr('UV Index'); ?></h2>
<?php genImageLink('vws753.jpg','Solar Radiation'); ?>
<?php genImageLink('vws752.jpg','UV Index'); ?>
<? } elseif ($SITE['SOLAR']) { ?>
<h2><?php echo langtransstr('Solar Radiation'); ?></h2>
<?php genImageLink('vws753.jpg','Solar Radiation'); ?>
<? } elseif ($SITE['UV']) { ?>
<h2><?php echo langtransstr('UV Index'); ?></h2>
<?php genImageLink('vws752.jpg','UV Index'); ?>
<? } // end solar/uv selection ?>
<?php } // end VWS graph names ?>
<?php if(isset($SITE['WXsoftware']) and $SITE['WXsoftware'] == 'CU') { // Cumulus graph names ?>
<h2><?php echo langtransstr('Temperature') . ' / ' . langtransstr('Humidity'); ?></h2>
<?php genImageLink('temp.png','Temperature',620,248); ?>
<br />
<?php genImageLink('hum.png','Humidity',620,248); ?>
<br />
<h2><?php echo langtransstr('Wind') . ' / ' . langtransstr('Barometer'); ?></h2>
<?php genImageLink('wind.png','Wind Speed',620,248); ?>
<br />
<?php genImageLink('windd.png','Wind Direction',620,248); ?>
<br />
<?php genImageLink('press.png','Barometer',620,248); ?>
<br />
<h2><?php langtrans('Rain'); ?></h2>
<?php genImageLink('raint.png','Rain',620,248); ?>
<br />
<?php genImageLink('rain.png','Rain Rate',620,248); ?>
<br />
<?php } // end VWS graph names ?>
<?php if(isset($SITE['WXsoftware']) and $SITE['WXsoftware'] == 'WD') { // Weather-Display graph names ?>
<h1><?php langtrans('Last 24 Hours'); ?></h1>
<?php genImageLink('curr24hourgraph.gif','Last 24 hours',469,555); ?>
<br /><br />
<h1><?php langtrans('Last 72 Hours'); ?></h1>
<?php genImageLink('curr72hourgraph.gif','Last 72 hours',469,555); ?>
<br /><br />
<h1><?php langtrans('Month to Date'); ?></h1>
<?php genImageLink('monthtodate.gif','Month to Date',469,555); ?>
<?php } // end WD graph names ?>
</div><!-- end main-copy -->
<?php
#--------------------------------------------------------------------------
# function genImageLink
#--------------------------------------------------------------------------
function genImageLink ( $imagename, $alttext, $width=310, $height=200) {
global $graphImageDir;
if(!file_exists($graphImageDir.$imagename)) {
print "$graphImageDir$imagename not found.";
} else {
print "<img src=\"$graphImageDir$imagename\" alt=\"$alttext\" width=\"$width\" height=\"$height\" />\n";
}
}
#--------------------------------------------------------------------------
# end genImageLink function
#--------------------------------------------------------------------------
############################################################################
include("footer.php");
############################################################################
# End of Page
############################################################################
?>
how can i fix this Beau