diff --git a/common.inc.php b/common.inc.php
index e9b2d88..c64775b 100644
--- a/common.inc.php
+++ b/common.inc.php
@@ -24,6 +24,24 @@
$sfiabversion=@file("version.txt");
$config['version']=$sfiabversion[0];
+
+//make sure the data subdirectory is writable, if its not, then we're screwed, so make sure it is!
+if(!is_writable("data"))
+{
+ echo "
SFIAB ERROR";
+ echo "Science Fair In A Box - ERROR
";
+ echo "data/ subdirectory is not writable by the web server";
+ echo "
";
+ echo "Details
";
+ echo "The data/ subdirectory is used to store files uploaded through the SFIAB software. The web server must have write access to this directory in order to function properly. Please contact your system administrator (if you are the system administrator, chown/chmod the data directory appropriately).";
+ echo "
";
+ echo "";
+ exit;
+}
+
+
+
+
//first things first - make sure our DB version matches our CODE version
$dbcodeversion=@file("db/db.code.version.txt");
$dbdbversion=@file("db/db.db.version.txt");
@@ -47,11 +65,42 @@ if($dbcodeversion[0]!=$dbdbversion[0])
echo "