Thread: SF.net SVN: postfixadmin: [180] trunk/setup.php
Brought to you by:
christian_boltz,
gingerdog
From: <Gin...@us...> - 2007-11-03 19:21:22
|
Revision: 180 http://postfixadmin.svn.sourceforge.net/postfixadmin/?rev=180&view=rev Author: GingerDog Date: 2007-11-03 12:21:27 -0700 (Sat, 03 Nov 2007) Log Message: ----------- setup.php: try and make sure the "ALL" domain exists to start with when creating the super admin user; fix html so li elements are closed Modified Paths: -------------- trunk/setup.php Modified: trunk/setup.php =================================================================== --- trunk/setup.php 2007-11-03 19:03:43 UTC (rev 179) +++ trunk/setup.php 2007-11-03 19:21:27 UTC (rev 180) @@ -59,11 +59,11 @@ { if (phpversion() < 5) $phpversion = 4; if (phpversion() >= 5) $phpversion = 5; - print "<li>PHP version " . phpversion () . "\n"; + print "<li>PHP version " . phpversion () . "</li>\n"; } else { - print "<li><b>Unable to check for PHP version. (missing function: phpversion())</b>\n"; + print "<li><b>Unable to check for PHP version. (missing function: phpversion())</b></li>\n"; } // @@ -71,11 +71,11 @@ // if ($f_apache_get_version == 1) { - print "<li>" . apache_get_version() . "\n"; + print "<li>" . apache_get_version() . "</li>\n"; } else { - print "<li><b>Unable to check for Apache version. (missing function: apache_get_version())</b>\n"; + print "<li><b>Unable to check for Apache version. (missing function: apache_get_version())</b></li>\n"; } print "</ul>"; @@ -89,16 +89,16 @@ { if (get_magic_quotes_gpc () == 0) { - print "<li>Magic Quotes: Disabled - OK\n"; + print "<li>Magic Quotes: Disabled - OK</li>\n"; } else { - print "<li><b>Warning: Magic Quotes: ON (internal workaround used)</b>\n"; + print "<li><b>Warning: Magic Quotes: ON (internal workaround used)</b></li>\n"; } } else { - print "<li><b>Unable to check for Magic Quotes. (missing function: get_magic_quotes_gpc())</b>\n"; + print "<li><b>Unable to check for Magic Quotes. (missing function: get_magic_quotes_gpc())</b></li>\n"; } // @@ -107,16 +107,16 @@ $config_loaded = 0; if ($file_config == 1) { - print "<li>Depends on: presence config.inc.php - OK\n"; + print "<li>Depends on: presence config.inc.php - OK</li>\n"; require_once('config.inc.php'); $config_loaded = 1; } else { - print "<li><b>Error: Depends on: presence config.inc.php - NOT FOUND</b><br />\n"; - print "Create the file.<br />"; + print "<li><b>Error: Depends on: presence config.inc.php - NOT FOUND</b><br /></li>\n"; + print "Create the file, and edit as appropriate (e.g. select database type etc)<br />"; print "For example:<br />\n"; - print "<pre>% cp config.inc.php.sample config.inc.php</pre>\n"; + print "<code><pre>cp config.inc.php.sample config.inc.php</pre></code>\n"; $error =+ 1; } @@ -143,7 +143,7 @@ print "<pre>% cd /usr/ports/databases/php$phpversion-pgsql/\n"; print "% make clean install\n"; print " - or with portupgrade -\n"; - print "% portinstall php$phpversion-pgsql</pre>\n"; + print "% portinstall php$phpversion-pgsql</pre></li>\n"; $error =+ 1; } // @@ -151,7 +151,7 @@ // if ($f_mysql_connect == 1) { - print "<li>Depends on: MySQL 3.23, 4.0 - OK\n"; + print "<li>Depends on: MySQL 3.23, 4.0 - OK</li>\n"; } // @@ -165,6 +165,7 @@ if ( !($config_loaded && $CONF['database_type'] == 'mysqli') ) { print "(change the database_type to 'mysqli' in config.inc.php!!)\n"; } + print "</li>"; } } @@ -177,6 +178,7 @@ if ( !($config_loaded && $CONF['database_type'] == 'pgsql') ) { print "(change the database_type to 'pgsql' in config.inc.php!!)\n"; } + print "</li>"; } // @@ -185,11 +187,11 @@ if ($config_loaded) { list ($link, $error_text) = db_connect(TRUE); if ($error_text == "") { - print "<li>Testing database connection - OK"; + print "<li>Testing database connection - OK - {$CONF['database_type']}://{$CONF['database_user']}:xxxxx@{$CONF['database_host']}/{$CONF['database_name']}</li>"; } else { print "<li><b>Error: Can't connect to database</b><br />\n"; print "Please edit the \$CONF['database_*'] parameters in config.inc.php.\n"; - print "$error_text\n"; + print "$error_text</li>\n"; $error ++; } } @@ -199,7 +201,7 @@ // if ($f_session_start == 1) { - print "<li>Depends on: session - OK\n"; + print "<li>Depends on: session - OK</li>\n"; } else { @@ -208,7 +210,7 @@ print "<pre>% cd /usr/ports/www/php$phpversion-session/\n"; print "% make clean install\n"; print " - or with portupgrade -\n"; - print "% portinstall php$phpversion-session</pre>\n"; + print "% portinstall php$phpversion-session</pre></li>\n"; $error =+ 1; } @@ -217,7 +219,7 @@ // if ($f_preg_match == 1) { - print "<li>Depends on: pcre - OK\n"; + print "<li>Depends on: pcre - OK</li>\n"; } else { @@ -226,7 +228,7 @@ print "<pre>% cd /usr/ports/devel/php$phpversion-pcre/\n"; print "% make clean install\n"; print " - or with portupgrade -\n"; - print "% portinstall php$phpversion-pcre</pre>\n"; + print "% portinstall php$phpversion-pcre</pre></li>\n"; $error =+ 1; } @@ -252,6 +254,12 @@ if (isset ($_POST['fPassword'])) $fPassword = escape_string ($_POST['fPassword']); if (isset ($_POST['fPassword2'])) $fPassword2 = escape_string ($_POST['fPassword2']); + // XXX need to ensure domains table includes an 'ALL' entry. + $r = db_query("SELECT * FROM domain WHERE domain = 'ALL'"); + if($r['rows'] == 0) { + db_insert('domain', array('domain' => 'ALL')); // all other fields should default through the schema. + } + list ($error, $tMessage, $pAdminCreate_admin_username_text, $pAdminCreate_admin_password_text) = create_admin($fUsername, $fPassword, $fPassword2, array('ALL'), TRUE); if ($error != 0) { if (isset ($_POST['fUsername'])) $tUsername = escape_string ($_POST['fUsername']); @@ -301,7 +309,6 @@ print "<b>Make sure you delete this setup.php file!</b><br />\n"; print "Also check the config.inc.php file for any settings that you might need to change!<br />\n"; - print "Click here to go to the <a href=\"admin\">admin section</a> (make sure that your .htaccess is setup properly)\n"; } ?> </div> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <chr...@us...> - 2007-12-06 13:03:34
|
Revision: 258 http://postfixadmin.svn.sourceforge.net/postfixadmin/?rev=258&view=rev Author: christian_boltz Date: 2007-12-06 05:03:36 -0800 (Thu, 06 Dec 2007) Log Message: ----------- setup.php: - added missing define('POSTFIXADMIN', 1); https://sourceforge.net/forum/message.php?msg_id=4660403 Modified Paths: -------------- trunk/setup.php Modified: trunk/setup.php =================================================================== --- trunk/setup.php 2007-12-02 21:21:27 UTC (rev 257) +++ trunk/setup.php 2007-12-06 13:03:36 UTC (rev 258) @@ -23,6 +23,8 @@ * Form POST \ GET Variables: -none- */ +define('POSTFIXADMIN', 1); # checked in included files + require_once("languages/en.lang"); require_once("functions.inc.php"); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <chr...@us...> - 2007-12-14 00:05:50
|
Revision: 268 http://postfixadmin.svn.sourceforge.net/postfixadmin/?rev=268&view=rev Author: christian_boltz Date: 2007-12-13 16:05:54 -0800 (Thu, 13 Dec 2007) Log Message: ----------- setup.php: - added check for multibyte string extension (mb_encode_mimeheader) - added note that Apache version check failure can be ignored if another webserver is used Modified Paths: -------------- trunk/setup.php Modified: trunk/setup.php =================================================================== --- trunk/setup.php 2007-12-13 23:22:14 UTC (rev 267) +++ trunk/setup.php 2007-12-14 00:05:54 UTC (rev 268) @@ -49,6 +49,7 @@ $f_pg_connect = function_exists ("pg_connect"); $f_session_start = function_exists ("session_start"); $f_preg_match = function_exists ("preg_match"); +$f_mb_encode_mimeheader = function_exists ("mb_encode_mimeheader"); $file_config = file_exists (realpath ("./config.inc.php")); @@ -77,7 +78,7 @@ } else { - print "<li><b>Unable to check for Apache version. (missing function: apache_get_version())</b></li>\n"; + print "<li><b>Unable to check for Apache version. (missing function: apache_get_version())<br />(Ignore this warning if you use another webserver software.)</b></li>\n"; } print "</ul>"; @@ -234,6 +235,20 @@ $error =+ 1; } +// +// Multibyte functions +// +if ( $f_mb_encode_mimeheader == 1 ) +{ + print "<li>Depends on: multibyte string - OK</li>\n"; +} +else +{ + print "<li><b>Error: Depends on: multibyte string - NOT FOUND</b><br />\n"; + print "To install multibyte string support, install php$phpversion-mbstring</li>\n"; + $error =+ 1; +} + print "</ul>"; if ($error != 0) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <chr...@us...> - 2008-01-06 19:47:39
|
Revision: 289 http://postfixadmin.svn.sourceforge.net/postfixadmin/?rev=289&view=rev Author: christian_boltz Date: 2008-01-06 11:47:45 -0800 (Sun, 06 Jan 2008) Log Message: ----------- setup.php: - added check for $CONF['configured'] Modified Paths: -------------- trunk/setup.php Modified: trunk/setup.php =================================================================== --- trunk/setup.php 2008-01-06 19:39:08 UTC (rev 288) +++ trunk/setup.php 2008-01-06 19:47:45 UTC (rev 289) @@ -113,6 +113,16 @@ print "<li>Depends on: presence config.inc.php - OK</li>\n"; require_once('config.inc.php'); $config_loaded = 1; + + require('config.inc.php'); + if(isset($CONF['configured'])) { + if($CONF['configured'] == TRUE) { + print "<li>Checking \$CONF['configured'] - OK\n"; + } else { + print "<li><b>Error: \$CONF['configured'] is 'false'.<br>\n"; + print "Please edit your config.inc.php settings and then change it.</b>\n"; + } + } } else { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <chr...@us...> - 2008-04-06 23:33:42
|
Revision: 320 http://postfixadmin.svn.sourceforge.net/postfixadmin/?rev=320&view=rev Author: christian_boltz Date: 2008-04-06 16:33:48 -0700 (Sun, 06 Apr 2008) Log Message: ----------- setup.php: - added hardcoded $CONF['theme_logo'] and $CONF['theme_css'] to fix the layout Modified Paths: -------------- trunk/setup.php Modified: trunk/setup.php =================================================================== --- trunk/setup.php 2008-04-06 23:28:40 UTC (rev 319) +++ trunk/setup.php 2008-04-06 23:33:48 UTC (rev 320) @@ -29,6 +29,8 @@ require_once("functions.inc.php"); $CONF['show_header_text'] = 'NO'; +$CONF['theme_logo'] = 'images/logo-default.png'; +$CONF['theme_css'] = 'css/default.css'; require('templates/header.php'); ?> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <Gin...@us...> - 2008-04-10 10:19:28
|
Revision: 328 http://postfixadmin.svn.sourceforge.net/postfixadmin/?rev=328&view=rev Author: GingerDog Date: 2008-04-10 03:19:35 -0700 (Thu, 10 Apr 2008) Log Message: ----------- setup.php - call upgrade.php to undertake DB upgrade/table creation as necessary (revert previous change to $CONF[configured] too) Modified Paths: -------------- trunk/setup.php Modified: trunk/setup.php =================================================================== --- trunk/setup.php 2008-04-10 10:18:46 UTC (rev 327) +++ trunk/setup.php 2008-04-10 10:19:35 UTC (rev 328) @@ -121,8 +121,8 @@ if($CONF['configured'] == TRUE) { print "<li>Checking \$CONF['configured'] - OK\n"; } else { - print "<li><b>Error: \$CONF['configured'] is 'false'.<br>\n"; - print "Please edit your config.inc.php settings and then change it.</b>\n"; + print "<li><b>Warning: \$CONF['configured'] is 'false'.<br>\n"; + print "You must edit your config.inc.php and change this to true (this indicates you've created the database and user)</b>\n"; } } } @@ -269,7 +269,8 @@ } else { - print "<p>Everything seems fine... you are ready to rock & roll!</p>\n"; + print "<p>Everything seems fine... attempting to create/update database structure</p>\n"; + require_once('upgrade.php'); $pAdminCreate_admin_username_text = $PALANG['pAdminCreate_admin_username_text']; $pAdminCreate_admin_password_text = ""; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <chr...@us...> - 2008-05-25 19:42:31
|
Revision: 370 http://postfixadmin.svn.sourceforge.net/postfixadmin/?rev=370&view=rev Author: christian_boltz Date: 2008-05-25 12:42:40 -0700 (Sun, 25 May 2008) Log Message: ----------- setup.php: - remove warning that apache version can't be detected when running on another webserver software https://sourceforge.net/tracker/index.php?func=detail&aid=1865122&group_id=191583&atid=937964 Modified Paths: -------------- trunk/setup.php Modified: trunk/setup.php =================================================================== --- trunk/setup.php 2008-05-25 19:33:43 UTC (rev 369) +++ trunk/setup.php 2008-05-25 19:42:40 UTC (rev 370) @@ -80,7 +80,9 @@ } else { - print "<li><b>Unable to check for Apache version. (missing function: apache_get_version())<br />(Ignore this warning if you use another webserver software.)</b></li>\n"; + # not running on Apache. + # However postfixadmin _is_ running, so obviously we are on a supported webserver ;-)) + # No need to confuse the user with a warning. } print "</ul>"; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <chr...@us...> - 2008-06-10 22:34:21
|
Revision: 379 http://postfixadmin.svn.sourceforge.net/postfixadmin/?rev=379&view=rev Author: christian_boltz Date: 2008-06-10 15:34:25 -0700 (Tue, 10 Jun 2008) Log Message: ----------- setup.php: - check if imap_open is available. If not, print a warning. This was indirectly ;-) requested in https://sourceforge.net/forum/forum.php?thread_id=2071718&forum_id=676076 Modified Paths: -------------- trunk/setup.php Modified: trunk/setup.php =================================================================== --- trunk/setup.php 2008-06-08 15:57:49 UTC (rev 378) +++ trunk/setup.php 2008-06-10 22:34:25 UTC (rev 379) @@ -52,6 +52,7 @@ $f_session_start = function_exists ("session_start"); $f_preg_match = function_exists ("preg_match"); $f_mb_encode_mimeheader = function_exists ("mb_encode_mimeheader"); +$f_imap_open = function_exists ("imap_open"); $file_config = file_exists (realpath ("./config.inc.php")); @@ -263,6 +264,27 @@ $error =+ 1; } + +// +// Imap functions +// +if ( $f_imap_open == 1) +{ + print "<li>Depends on: IMAP functions - OK</li>\n"; +} +else +{ + print "<li><b>Warning: Depends on: IMAP functions - NOT FOUND</b><br />\n"; + print "To install IMAP support, install php$phpversion-imap<br />\n"; + print "Without IMAP support, you won't be able to create subfolders when creating mailboxes.</li>\n"; +# $error =+ 1; +} + + + + + + print "</ul>"; if ($error != 0) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |