Per,
It just occurred to me that your host may have upgraded to PHP5 from PHP4. Here is a PHP page that may help. Just place this page in your WeatherFlash directory on the server and call it as a web page from the internet. It will show if your permissions are set correctly and what version of PHP is being used. If it is PHP5 then do a search of this forum and find my post that has the changes that need to be made. Thanks to Ken True for these. Hope this helps.
Jay
<?php
// wflash-filetest.php script by Ken True - webmaster@saratoga-weather.org
//
// Version 1.00 - 03-Nov-2007 - Initial release
//
$Version = "wflash-filetest.php Version 1.00 - 03-Nov-2007";
//
error_reporting(E_ALL); // uncomment to turn on full error reporting
//
// script available at http://saratoga-weather.org/scripts.php
//
// you may copy/modify/use this script as you see fit,
// no warranty is expressed or implied.
// ------------settings -- no need to change these -----------
// this file should be installed in the same directory as WeatherFlash
//
//
$testName = 'wflash-test.txt';
$wflashDir = './'; // directory for the the WeatherFlash files
// will assume Data/ and Config/ directories below this dir.
//-------------end of settings-------------------------------
if (isset($_REQUEST['sce']) && strtolower($_REQUEST['sce']) == 'view' ) {
//--self downloader --
$filenameReal = __FILE__;
$download_size = filesize($filenameReal);
header('Pragma: public');
header('Cache-Control: private');
header('Cache-Control: no-cache, must-revalidate');
header("Content-type: text/plain");
header("Accept-Ranges: bytes");
header("Content-Length: $download_size");
header('Connection: close');
readfile($filenameReal);
exit;
}
error_reporting(E_ALL);
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>PHP file writing test for WeatherFlash</title>
<style type="text/css">
body {
background-color:#FFFFFF;
font-family:Verdana, Arial, Helvetica, sans-serif;
font-size: 12px;
}
</style>
</head>
<h1>Test for WeatherFlash file writing by PHP</h1>
<?php
echo "<h2>PHP Version " . phpversion() ."</h2>";
$errorcnt = 0;
echo "<h2>Now testing for write access to Data directory</h2>\n";
$errorcnt += try_file($wflashDir . 'Data/' . $testName);
echo "<h2>Now testing for write access to Config directory</h2>\n";
$errorcnt += try_file($wflashDir . 'Config/' . $testName);
if ($errorcnt > 0) {
echo "<h2>Test concluded .. errors found. See 'Warning:' messages for details.</h2>\n";
} else {
echo "<h2>Test concluded .. no errors found. WeatherFlash should work correctly based on permissions.</h2>\n";
}
function try_file( $filename) {
$NOWgmt = time();
$NOWdate = gmdate("D, d M Y H:i:s", $NOWgmt);
echo "<p>Using $filename as test file.</p>\n";
echo "<p>Now date='$NOWdate'</p>\n";
$errors = 0;
$fp = fopen($filename,"w");
if ($fp) {
$rc = fwrite($fp,$NOWdate);
if ($rc <> strlen($NOWdate)) {
echo "<p>unable to write $filename: rc=$rc</p>\n";
$errors++;
}
fclose($fp);
} else {
echo "<p>Unable to open $filename for write.</p>\n";
$errors++;
}
if(file_exists($filename)) {
$contents = implode('',file($filename));
echo "<p>File says='$contents'</p>\n";
if ($contents == $NOWdate) {
echo "<p>Write and read-back successful.. contents identical.</p>\n";
} else {
echo "<p>Read-back unsuccessful. contents different.</p>\n";
$errors++;
}
if(unlink($filename)) {
echo "<p>Test file $filename deleted.</p>\n";
}
} else {
echo "<p>File $filename not found.</p>\n";
$errors++;
}
return($errors);
}
?>
<body>
</body>
</html>