Test for ec-lightning.php file caching and GD image function

Using $RealCacheName as test file.

\n"; echo "

Now date='$NOWdate'

\n"; $fp = fopen($RealCacheName,"w"); if ($fp) { $rc = fwrite($fp,$NOWdate); if ($rc <> strlen($NOWdate)) { echo "

unable to write $RealCacheName: rc=$rc

\n"; } fclose($fp); } else { echo "

Unable to open $RealCacheName for write.

\n"; } $contents = implode('',file($RealCacheName)); echo "

File says='$contents'

\n"; if ($contents == $NOWdate) { echo "

Write and read-back successful.. contents identical -- ec-lightning.php cache should work fine with \$lightningDir = '$lightningDir'; setting.

\n"; } else { echo "

Read-back unsuccessful. contents different -- ec-lightning.php cache will not work correctly

\n"; } ?>

Checking for legendLightning.png required image file

MISSING file: Right-click on this image lightning legend and Save Image As...to filename legendLightning.png in the directory on your website.
After that is done, rerun this program to check again.

Your legendLightning.png is correctly placed in and shows like this: lightning legend

Site is running PHP Version " . phpversion() .""; ?>

To run the ec-lightning.php script, you also need GD enabled in PHP.
Make sure the following displays Yes for all items (except for 'WebP Support', 'T1Lib Support' and 'JIS-mapped Japanese Font Support' which are not needed).

Current GD status:

  • GD support: "; if(function_exists("gd_info")){ echo "YES"; $info = gd_info(); $keys = array_keys($info); for($i=0; $i\n
  • " . $keys[$i] .": " . yesNo($info[$keys[$i]]); else echo "
  • \n
  • " . $keys[$i] .": " . $info[$keys[$i]]; } } else { echo "NO"; } echo "
  • "; } function yesNo($bool){ if($bool) return " YES"; else return " NO"; } ?>