--- goldfish-002.php	2008-01-07 21:37:31.000000000 +0100
+++ goldfish-002-p1.php	2008-05-08 10:51:34.000000000 +0200
@@ -19,10 +19,22 @@
 	    
 	    (c) 2007-2008 Remo Fritzsche	(Main application programmer)
 	    (c) 2007-2008 Manuel Aller		(Additional programming)
+	    
+	    Version 002, patch level 1
 	*/
 
     ini_set('display_errors', true);
-    error_reporting( E_ALL );
+    error_reporting( E_ALL );
+    
+    ######################################
+    # Check PHP version                  #
+    ######################################
+    
+	if ( version_compare( PHP_VERSION, "5.0.0" ) == - 1 )
+	{
+		echo "Error, you are currently not running PHP 5 or later. Exiting.\n";
+		exit;
+	}
     
     ######################################
     # Configuration                      #
@@ -41,6 +53,7 @@
     $conf['mysql_database'] = "mailserver";
     
     /* Database Queries */
+    
     # This query has to return the path (`path`) of the corresponding
     # maildir-Mailbox with email-address %m
     $conf['q_mailbox_path'] = "SELECT CONCAT('/home/vmail/', SUBSTRING_INDEX(email,'@',-1), '/', SUBSTRING_INDEX(email,'@',1), '/') as `path` FROM view_users WHERE `email` = '%m'";
@@ -104,7 +117,8 @@
 		  }
 		  else
 		  {
-			echo "Configuration not writeable.\n";
+			echo "Error: The log file is not writeable.\n";
+			echo "The log has not been written.\n";
 		  }
 		}
     }
@@ -305,4 +319,4 @@
 
 	$log->writeLog($conf);
 	echo "End execution.";
-?>
+?>
\ Kein Zeilenumbruch am Dateiende.

