svn commit: r644 - trunk/mapbender/http/tools/mapbender_setup.php

marko at osgeo.org marko at osgeo.org
Thu Jul 6 18:17:58 EDT 2006


Author: marko
Date: 2006-07-06 22:17:58+0000
New Revision: 644

Modified:
   trunk/mapbender/http/tools/mapbender_setup.php

Log:
fixed no-pgsql-extension bug
added some more mapbender.conf constants

Modified: trunk/mapbender/http/tools/mapbender_setup.php
Url: https://mapbender.osgeo.org/source/browse/mapbender/trunk/mapbender/http/tools/mapbender_setup.php?view=diff&rev=644&p1=trunk/mapbender/http/tools/mapbender_setup.php&p2=trunk/mapbender/http/tools/mapbender_setup.php&r1=643&r2=644
==============================================================================
--- trunk/mapbender/http/tools/mapbender_setup.php	(original)
+++ trunk/mapbender/http/tools/mapbender_setup.php	2006-07-06 22:17:58+0000
@@ -4,13 +4,13 @@
  # Created on 18.05.2006/10:03:40
  #  
  # http://www.mapbender.org/index.php/Installation_en
- # Projekt: mapbender
+ # Projekt: mapbender 
  # File: mb_setupchecker.php
  #
  # by Marko Samson 
  # contact marko.samson at osgeo.org or marko.samson at wald-und-holz.nrw.de
- # created with PHPeclipse
- #
+ # created with PHPeclipse 
+ # 
  # 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, or (at your option)
@@ -26,10 +26,10 @@
  # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  
  include_once("../../conf/mapbender.conf");
- $con = @db_connect(DBSERVER,OWNER,PW);
+ 
 ?>
  <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
-        "http://www.w3.org/TR/html4/loose.dtd">
+        "http://www.w3.org/TR/html4/loose.dtd"> 
 <html>
 	<head><meta http-equiv="cache-control" content="no-cache">
 	<meta http-equiv="pragma" content="no-cache">
@@ -103,10 +103,10 @@
 	<table style="border: 2px solid rgb(128, 128, 128); -moz-border-radius-topleft: 8px; -moz-border-radius-topright: 8px; -moz-border-radius-bottomright: 8px; -moz-border-radius-bottomleft: 8px;" bgcolor=#dddddd cellspacing=0 cellpadding=0 width="95%">
 	<th colspan="3" bgcolor=#F0F0F0>PHP Extensioncheck</th>
 	<?php
-	if(!extension_loaded('mysql')) $check="<tr ><td width=\"25%\">MySQL check</td><td width=\"10\"></td><td><font color=#FF0000 >MySQL not installed! You have to include mysql-extension!)</font></td></tr>";
+	if(!extension_loaded('mysql')) $check="<tr ><td width=\"25%\">MySQL check</td><td width=\"10\"></td><td><font color=#FF0000 >MySQL not installed! (You have to include mysql-extension if you want to use MySQL as MB-Database!)</font></td></tr>";
 	else $check="<tr ><td width=\"25%\">MySQL check</td><td width=\"10\">X</td><td><font color=#00D000 >MySQL installed</font></td></tr>";
 #PGSQL
-	if(!extension_loaded('pgsql')) $check.="<tr><td>PostgreSQL check</td><td></td><td><font color=#FF0000>PostgreSQL not installed (You must have MySQL or PostgreSQL)</font></td></tr>";
+	if(!extension_loaded('pgsql')) $check.="<tr><td>PostgreSQL check</td><td></td><td><font color=#FF0000>PostgreSQL not installed (You have to include pgsql-extension if you want to use Postgres as MB-Database!)</font></td></tr>";
 	else $check.="<tr><td>PostgreSQL check</td><td>X</td><td><font color=#00D000>PostgreSQL installed</font></td></tr>";
 #GD
 	if(extension_loaded('gd')) $check.="<tr ><td>GD2 check</td><td>X</td><td><font color=#00D000>GD installed</font></td></tr>";
@@ -124,7 +124,7 @@
 	<table style="border: 2px solid rgb(128, 128, 128); -moz-border-radius-topleft: 8px; -moz-border-radius-topright: 8px; -moz-border-radius-bottomright: 8px; -moz-border-radius-bottomleft: 8px;" bgcolor=#dddddd cellspacing=0 cellpadding=0 width="95%">
 	<th colspan="3" bgcolor=#F0F0F0>Database check</th>
 	<?php
-	db_select_db(DB,$con);
+	$con = @db_connect(DBSERVER,OWNER,PW);
 	if (SYS_DBTYPE=="mysql"){
 		$check = "<tr ><td width=\"25%\">Administration Database</td><td>X</td><td><font color=#00D000>MySQL</td><tr>";
 		$check .= "<tr ><td>Connect to Database</td>";
@@ -204,31 +204,41 @@
 	<th colspan="3" bgcolor=#F0F0F0>mapbender.conf check</th>
 	<?php 
 # SYS_DBTYPE
-	if (SYS_DBTYPE == 'mysql' || SYS_DBTYPE == 'pgsql') $check ="<tr><td>Administration Database</td><td >X</td><td><font color=#00D000>" . SYS_DBTYPE . "</font></td></tr>";
-	else $check ="<tr><td width=\"25%\">Administration Database</td><td width=\"10\"></td><td><font color=#FF0000>" . SYS_DBTYPE . " is not defined for mysql or pgsql</font></td></tr>";
+	if ((SYS_DBTYPE == 'mysql' || SYS_DBTYPE == 'pgsql') && defined('SYS_DBTYPE')) $check ="<tr><td>Administration Database</td><td >X</td><td><font color=#00D000>" . SYS_DBTYPE . "</font></td></tr>";
+	else $check ="<tr><td width=\"25%\">Administration Database</td><td width=\"10\"></td><td><font color=#FF0000>SYS_DBTYPE is not defined for mysql or pgsql</font></td></tr>";
 # DBSERVER
-	if (DBSERVER !="<HOST>" && DBSERVER != "") $check .="<tr><td>DB-Server</td><td>X</td><td><font color=#00D000>" . DBSERVER . "</font><font color='#0000FF'> (is this your DB-Server)</font></td></tr>";
-	else $check .="<tr><td>DB-Server</td><td></td><td><font color=#FF0000>" . DBSERVER . " is not defined</font></td></tr>";
+	if (DBSERVER !="<HOST>" && DBSERVER != "" && defined('DBSERVER')) $check .="<tr><td>DB-Server</td><td>X</td><td><font color=#00D000>" . DBSERVER . "</font><font color='#0000FF'> (is this your DB-Server)</font></td></tr>";
+	else $check .="<tr><td>DB-Server</td><td></td><td><font color=#FF0000>DBSERVER is not defined</font></td></tr>";
 # Mapbender-DB
-	if (DB !="<database>" && DB != "") $check .="<tr><td>Mapbender-DB</td><td>X</td><td><font color=#00D000>" . DB . "</font><font color='#0000FF'> (is this your Mapbender-DB)</font></td></tr>";
-	else $check .="<tr><td>Mapbender-DB</td><td></td><td><font color=#FF0000>" . DB . " is not defined</font></td></tr>";
+	if (DB !="<database>" && DB != "" && defined('DB')) $check .="<tr><td>Mapbender-DB</td><td>X</td><td><font color=#00D000>" . DB . "</font><font color='#0000FF'> (is this your Mapbender-DB)</font></td></tr>";
+	else $check .="<tr><td>Mapbender-DB</td><td></td><td><font color=#FF0000>DB is not defined</font></td></tr>";
 # DB Owner
-	if (OWNER !="<owner>" && OWNER != "") $check .="<tr><td>DB-Owner</td><td>X</td><td><font color=#00D000>" . OWNER . "</font><font color='#0000FF'> (is this your DB-Owner)</font></td></tr>";
-	else $check .="<tr><td>DB-Owner</td><td></td><td><font color=#FF0000>" . OWNER . " is not defined</font></td></tr>";
+	if (OWNER !="<owner>" && OWNER != "" && defined('OWNER')) $check .="<tr><td>DB-Owner</td><td>X</td><td><font color=#00D000>" . OWNER . "</font><font color='#0000FF'> (is this your DB-Owner)</font></td></tr>";
+	else $check .="<tr><td>DB-Owner</td><td></td><td><font color=#FF0000>OWNER is not defined</font></td></tr>";
 # PREPAREDSTATEMENTS
 	if (defined('PREPAREDSTATEMENTS')){
 		if (PREPAREDSTATEMENTS == true){
-			if (phpversion()<'5.1.0') $check.="<tr><td width=\"25%\">PREPAREDSTATEMENTS-<br>compatibility</td><td width=\"10\"></td><td><font color=\"#ff0000\">PREPAREDSTATEMENTS = true and php version " . phpversion() . " is incompatible<br>set PREPAREDSTATEMENTS to false or update php to >=5.1</td></tr>";
-			else $check .="<tr><td width=\"25%\">PREPAREDSTATEMENTS-<br>compatibility</td><td width=\"10\">X</td><td><font color=#00D000>true and php " . phpversion() . " should work</td><tr/>";
+			if (phpversion()<'5.1.0') $check.="<tr><td width=\"25%\">PREPAREDSTATEMENTS-<br>compatibility</td><td width=\"10\"></td><td><font color=\"#ff0000\">PREPAREDSTATEMENTS =set to 'true' and php version " . phpversion() . " is incompatible<br>set PREPAREDSTATEMENTS to false or update php to >=5.1</td></tr>";
+			else $check .="<tr><td width=\"25%\">PREPAREDSTATEMENTS-<br>compatibility</td><td width=\"10\">X</td><td><font color=#00D000>set to 'true' and php " . phpversion() . " should work</td><tr/>";
 		}
 		else{
-			if (phpversion()<'5.1.0') $check .="<tr><td width=\"25%\">PREPAREDSTATEMENTS-<br>compatibility</td><td width=\"10\">X</td><td><font color=#00D000>false and php " . phpversion() . " should work </font><font color='#0000FF'> (but think about upgrading to php 5.1)</td><tr/>";
-			else $check .="<tr><td width=\"25%\">PREPAREDSTATEMENTS-<br>compatibility</td><td width=\"10\">X</td><td><font color=#00D000>false and php " . phpversion() . " should work <font color=#0000FF>(but you can set PREPAREDSTATEMENTS to 'true')</font></td><tr/>";
+			if (phpversion()<'5.1.0') $check .="<tr><td width=\"25%\">PREPAREDSTATEMENTS-<br>compatibility</td><td width=\"10\">X</td><td><font color=#00D000>set to 'false' and php " . phpversion() . " should work </font><font color='#0000FF'> (but think about upgrading to php 5.1)</td><tr/>";
+			else $check .="<tr><td width=\"25%\">PREPAREDSTATEMENTS-<br>compatibility</td><td width=\"10\">X</td><td><font color=#00D000>set to 'false' and php " . phpversion() . " should work <font color=#0000FF>(but you can set PREPAREDSTATEMENTS to 'true')</font></td><tr/>";
 		}
 	}
-    else $check .="<tr><td width=\"25%\">PREPAREDSTATEMENTS-<br>compatibility</td><td width=\"10\"></td><td><font color=#FF0000>PREPAREDSTATEMENTS is not defined</td><tr/>";	
-# Login Path
-	$check .= "<tr height=10/><tr><td>Login-Path</td><td colspan=2><a href='" . LOGIN . "' target='_blank'>" . LOGIN . "</a><br><font color=#0000FF> (if this link doesn't work, check out your 'URL to Login' in your mapbender.conf<br>Perhaps an alias in your httpd.conf will solve the prob')</td>"; 	 	 	
+    else $check .="<tr><td width=\"25%\">PREPAREDSTATEMENTS-<br>compatibility</td><td width=\"10\"></td><td><font color=#FF0000>PREPAREDSTATEMENTS is not defined</td><tr/>";
+# CHARSET
+	if (CHARSET != "" && defined('CHARSET')) $check .="<tr><td>CHARSET</td><td>X</td><td><font color=#00D000>" . CHARSET . "</font><font color='#0000FF'></font></td></tr>";
+	else $check .="<tr><td>CHARSET</td><td></td><td><font color=#FF0000>CHARSET is not defined</font></td></tr>";
+# TMPDIR
+	if (TMPDIR != "" && defined('TMPDIR')) $check .="<tr><td>TMPDIR</td><td>X</td><td><font color=#00D000>" . TMPDIR . "</font><font color='#0000FF'></font></td></tr>";
+	else $check .="<tr><td>TMPDIR</td><td></td><td><font color=#FF0000>TMPDIR is not defined</font></td></tr>";
+# MAXLOGIN
+	if (MAXLOGIN != "" && defined('MAXLOGIN')) $check .="<tr><td>MAXLOGIN</td><td>X</td><td><font color=#00D000>" . MAXLOGIN . "</font><font color='#0000FF'></font></td></tr>";
+	else $check .="<tr><td>MAXLOGIN</td><td></td><td><font color=#FF0000>MAXLOGIN is not defined</font></td></tr>";		    	
+# LOGIN
+	if (defined('LOGIN')) $check .= "<tr height=10/><tr><td>Login-Path</td><td colspan=2><a href='" . LOGIN . "' target='_blank'>" . LOGIN . "</a><br><font color=#0000FF> (if this link doesn't work, check out your 'URL to Login' in your mapbender.conf<br>Perhaps an alias in your httpd.conf will solve the prob')</td>";
+	else $check .= "<tr height=10/><tr><td>Login-Path</td><td colspan=2><font color=#FF0000>LOGIN is not defined</font></td>";
 	echo $check;	
 	echo "<tr height=10/><tr bgcolor=#F0F0F0><td colspan=3>Legend:<br><font color=#FF0000>red = maybe your Mapbender will run into trouble</font><br><font color=#0000FF>blue = just a tip</font><br><font color=#00D000>green = seems to be alright</font></td></tr>";
 	echo "</table>";




More information about the Mapbender_commits mailing list