# HG changeset patch
# User Dan
# Date 1236030370 18000
# Node ID b98798f6572dd4c3e384cbfb289631dc6f431aa6
# Parent ccedb36dd929a1a1c85d4c234eef57b4f9faeb95
Redesigned installer sysreqs page to cover more features, be more comprehensive, and look better
diff -r ccedb36dd929 -r b98798f6572d includes/functions.php
--- a/includes/functions.php Mon Mar 02 16:45:28 2009 -0500
+++ b/includes/functions.php Mon Mar 02 16:46:10 2009 -0500
@@ -5002,4 +5002,35 @@
return false;
}
+/**
+ * Implementation of the "which" command in native PHP.
+ * @param string command
+ * @return string path to executable, or false on failure
+ */
+
+function which($executable)
+{
+ $path = ( isset($_ENV['PATH']) ) ? $_ENV['PATH'] : ( isset($_SERVER['PATH']) ? $_SERVER['PATH'] : false );
+ if ( !$path )
+ // couldn't get OS's PATH
+ return false;
+
+ $win32 = ( PHP_OS == 'WINNT' || PHP_OS == 'WIN32' );
+ $extensions = $win32 ? array('.exe', '.com', '.bat') : array('');
+ $separator = $win32 ? ';' : ':';
+ $paths = explode($separator, $path);
+ foreach ( $paths as $dir )
+ {
+ foreach ( $extensions as $ext )
+ {
+ $fullpath = "$dir/{$executable}{$ext}";
+ if ( file_exists($fullpath) && is_executable($fullpath) )
+ {
+ return $fullpath;
+ }
+ }
+ }
+ return false;
+}
+
?>
diff -r ccedb36dd929 -r b98798f6572d install/images/box_error.png
Binary file install/images/box_error.png has changed
diff -r ccedb36dd929 -r b98798f6572d install/images/box_warning.png
Binary file install/images/box_warning.png has changed
diff -r ccedb36dd929 -r b98798f6572d install/images/css/installer.css
--- a/install/images/css/installer.css Mon Mar 02 16:45:28 2009 -0500
+++ b/install/images/css/installer.css Mon Mar 02 16:46:10 2009 -0500
@@ -229,3 +229,76 @@
background-color: #FFFFFF;
border: 1px solid #D6D6E9;
}
+
+/* SysReqs: table */
+
+table.sysreqs {
+ width: 100%;
+}
+
+table.sysreqs td {
+ border-right: 1px solid #ededed;
+ width: 70%;
+ padding: 8px;
+}
+
+table.sysreqs th {
+ border-right-width: 0;
+ width: 100%;
+ border-bottom: 1px solid #acacac;
+ text-align: left;
+ padding: 7px 0 0 0;
+}
+
+table.sysreqs td.good, table.sysreqs td.bad, table.sysreqs td.warn {
+ font-weight: bold;
+ border-right-width: 0;
+ width: 30%;
+}
+
+table.sysreqs td.good small, table.sysreqs td.bad small, table.sysreqs td.warn small {
+ font-weight: normal;
+}
+
+table.sysreqs td.good {
+ color: #00aa00;
+}
+
+table.sysreqs td.bad {
+ color: #aa0000;
+}
+
+table.sysreqs td.warn {
+ color: #aaaa00;
+}
+
+div.sysreqs_error, div.sysreqs_warning {
+ background-image: url(../box_error.png);
+ background-repeat: repeat-x;
+ background-position: top center;
+ background-color: #ffd1d1;
+ border: 1px solid #6e0000;
+ padding: 7px;
+ margin-bottom: 7px;
+}
+
+div.sysreqs_warning {
+ background-image: url(../box_warning.png);
+ background-color: #fffed1;
+ border-color: #6e6e00;
+}
+
+div.sysreqs_error h3, div.sysreqs_warning h3 {
+ font-size: 9pt;
+ border-bottom: 1px solid #8f3131;
+ margin-top: 0;
+ margin-bottom: 6px;
+}
+
+div.sysreqs_warning h3 {
+ border-bottom-color: #8f8f31;
+}
+
+div.sysreqs_error p, div.sysreqs_warning p {
+ margin: 0;
+}
diff -r ccedb36dd929 -r b98798f6572d install/includes/stages/confirm.php
--- a/install/includes/stages/confirm.php Mon Mar 02 16:45:28 2009 -0500
+++ b/install/includes/stages/confirm.php Mon Mar 02 16:46:10 2009 -0500
@@ -26,6 +26,15 @@
get('confirm_info_aes_title'); ?>
get('confirm_info_aes_body', array('aes_bits' => AES_BITS)); ?>
+ ';
+ echo '' . $lang->get('confirm_msg_installing_unstable_title') . '
';
+ echo '' . $lang->get('confirm_msg_installing_unstable_body') . '
';
+ echo '';
+ }
+ ?>
-
';
- run_test('return false;', $lang->get('sysreqs_summary_fail_title'), $lang->get('sysreqs_summary_fail_body'));
- echo '
';
- }
-}
-
+endif;
?>
diff -r ccedb36dd929 -r b98798f6572d language/english/install.json
--- a/language/english/install.json Mon Mar 02 16:45:28 2009 -0500
+++ b/language/english/install.json Mon Mar 02 16:46:10 2009 -0500
@@ -66,38 +66,66 @@
modetitle_long: 'Server requirements',
heading: 'Checking your server',
blurb: 'Enano has several requirements that must be met before it can be installed. If all is good then note any warnings and click Continue below.',
- req_php: 'PHP Version >=4.3.0',
- req_php5: 'PHP 5.2.0 or later',
- req_postgres: 'PostgreSQL extension for PHP',
- req_mysql: 'MySQL extension for PHP',
- req_uploads: 'File upload support',
- req_apache: 'Apache HTTP Server',
- req_config: 'Configuration file writable',
- req_magick: 'ImageMagick support',
- req_cachewriteable: 'Cache directory writable',
- req_fileswriteable: 'File uploads directory writable',
- req_nodbdrivers: 'No database drivers are available.',
+
+ req_supported: 'Supported',
+ req_notfound: 'Not found',
+ req_found: 'Found',
+ req_enabled: 'Enabled',
+ req_disabled: 'Disabled',
+ req_writable: 'Writable',
+ req_unwritable: 'Unwritable',
+
+ heading_serverenv: 'Server environment',
+ heading_dbms: 'Database servers',
+ heading_files: 'Writable files',
+ heading_images: 'Image manipulation',
+ heading_crypto: 'Cryptographic features',
- req_desc_php: 'It seems that the version of PHP that your server is running is too old to support Enano properly. If this is your server, please upgrade to the most recent version of PHP, remembering to use the --with-mysql configure option if you compile it yourself. If this is not your server, please contact your webhost and ask them if it would be possible to upgrade PHP. If this is not possible, you will need to switch to a different webhost in order to use Enano.',
- req_desc_php5: 'Your server does not have support for PHP 5.2.0. While you may continue installing Enano, please be warned that as of December 31, 2007, all support for Enano on PHP 4 servers is discontinued. If you have at least PHP 5.0.0, support will still be available, but there are many security problems in PHP versions under 5.2.0 that Enano cannot effectively prevent.',
- req_desc_postgres: 'It seems that your PHP installation does not have the PostgreSQL extension enabled. Because of this, you won\'t be able to use the PostgreSQL database driver. This is OK in the majority of cases. If you want to use PostgreSQL support, you\'ll need to either compile the PHP extension for Postgres or install the extension with your distribution\'s package manager. Windows administrators will need enable php_pgsql.dll in their php.ini.',
- req_desc_mysql: 'It seems that your PHP installation does not have the MySQL extension enabled. If this is your own server, you may need to just enable the "libmysql.so" extension in php.ini. If you do not have the MySQL extension installed, you will need to either use your distribution\'s package manager to install it, or you will have to compile PHP from source. If you compile PHP from source, please remember to use the "--with-mysql" configure option, and you will have to have the MySQL development files installed (they usually are). If this is not your server, please contact your hosting company and ask them to install the PHP MySQL extension.',
- req_desc_uploads: 'It seems that your server does not support uploading files. Enano *requires* this functionality in order to work properly. Please ask your server administrator to set the "file_uploads" option in php.ini to "On".',
- req_desc_apache: 'Apparently your server is running a web server other than Apache. Enano will work nontheless, but there are some known bugs with non-Apache servers, and the "fancy" URLs will not work properly. The "Standard URLs" option will be set on the website configuration page, only change it if you are absolutely certain that your server is running Apache.',
- req_desc_config: 'It looks like the configuration file, config.new.php, is not writable. Enano needs to be able to write to this file in order to install.
If you are installing Enano on a SourceForge web site:
SourceForge mounts the web partitions read-only now, so you will need to use the project shell service to symlink config.php to a file in the /tmp/persistent directory.',
- req_desc_magick: 'Enano uses ImageMagick to scale images into thumbnails. Because ImageMagick was not found on your server, Enano will use the width= and height= attributes on the <img> tag to scale images. This can cause somewhat of a performance increase, but bandwidth usage will be higher, especially if you use high-resolution images on your site.
If you are sure that you have ImageMagick, you can set the location of the "convert" program using the administration panel after installation is complete.',
- req_desc_cachewriteable: 'Apparently the cache/ directory is not writable. Enano will still work, but you will not be able to cache thumbnails, meaning the server will need to re-render them each time they are requested. In some cases, this can cause a significant slowdown.',
- req_desc_fileswriteable: 'It seems that the directory where uploaded files are stored (%enano_root%/files) cannot be written by the server. Enano will still function, but file uploads will not function, and will be disabled by default.',
- req_desc_nodbdrivers: 'You need to have at least one database driver working to install Enano. See the warnings on MySQL and PostgreSQL above for more information on installing these database drivers.',
+ req_apache: 'Apache web server',
+ req_php: 'PHP version',
+ req_mysql: 'MySQL database support',
+ req_postgresql: 'PostgreSQL database support',
+ req_safemode: 'Safe Mode',
+ req_uploads: 'PHP file upload support',
+ req_config_writable: 'Configuration file: config.new.php',
+ req_htaccess_writable: 'Apache rewrite rules: .htaccess.new',
+ req_files_writable: 'File storage directory: files/',
+ req_cache_writable: 'Cache directory: cache/',
+ req_gd2: 'GD2 library',
+ req_imagemagick: 'ImageMagick',
+ req_gmp: 'GMP arbitrary-precision math',
+ req_bigint: 'Big_Int arbitrary-precision math',
+ req_bcmath: 'BCMath arbitrary-precision math',
+
+ req_hint_htaccess_writable: 'Only needs to be writable if you plan to use Rewritten URLs.',
+ req_hint_gd2: 'Used for generating visual confirmation and resizing uploaded images',
+ req_hint_imagemagick: 'Faster alternative for resizing uploaded images',
+ req_hint_gmp: 'Fastest backend for Diffie-Hellman cryptographic math',
+ req_hint_bigint: 'Relatively fast backend for Diffie-Hellman cryptographic math',
+ req_hint_bcmath: 'Allows Diffie-Hellman cryptographic math but slower',
+
+ req_help_apache: 'Apache is the best server for Enano because it provides features that Enano can use, primarily support for Rewritten URLs.',
+ req_help_php: 'Enano requires PHP version 5.0.0 or later, and runs best under PHP 5.2.0 or later. (You are running PHP %php_version%).',
+ req_help_safemode: 'Safe Mode interferes with Enano\'s ability to operate properly. Thus, installing Enano with Safe Mode enabled is currently not supported.',
+ req_help_uploads: 'PHP file upload support is a prerequisite for uploading files via Enano\'s web interface.',
+ req_help_writable: 'Certain files need to be writable for installation and certain features to work properly. Use your FTP client\'s "CHMOD" feature to set numeric permissions on the items listed above: 666 for files, and 777 for directories. It\'s safest to CHMOD config.php to 444 once installation is complete.',
+ req_help_gd2: 'Without GD, Enano has to use a visual confirmation engine that generates weaker images that are easier to break.',
+ req_help_imagemagick: 'Without ImageMagick, Enano will use GD (if it is available) to scale images down. This is slightly slower.',
+ req_help_gmp: 'GMP is the fastest backend for Enano\'s cryptographic math. If you don\'t have GMP or Big_Int, logging in might be slower.',
+ req_help_bigint: 'Big_Int is a faster backend for Enano\'s cryptographic math. If you don\'t have GMP or Big_Int, logging in might be slower.',
+ req_help_bcmath: 'BCMath is a fallback backend for Enano\'s cryptographic math. If you don\'t have GMP, BCMath or Big_Int, Enano will have to use an insecure method to transmit your login information.',
+
+ err_no_dbms_title: 'No database backends are available.',
+ err_no_dbms_body: 'Enano requires at least one database backend to install. Please consult with your hosting provider to obtain help with this situation. If you are running a VPS or dedicated server, install the php-mysql or php-pgsql (on Red Hat®-based distributions) or php5-mysql or php5-pgsql (on Debian-based distributions) packages. For Windows servers, ensure that the php_mysql or php_pgsql extension is enabled in php.ini.',
summary_success_title: 'Your server meets all the requirements for running Enano.',
summary_success_body: 'Click the button below to continue the installation.',
- summary_warn_title: 'Some of the features of Enano have been turned off to accommodate your server.',
- summary_warn_body: 'Enano has detected that some of the features or configuration settings on your server are not optimal for the best behavior and/or performance for Enano. As a result, Enano has disabled these features as a precaution to prevent errors and potential security issues.',
+ summary_warn_title: 'Warnings encountered during server check',
+ summary_warn_body: 'Since some server features that Enano uses aren\'t available, Enano has turned its support for these features off. The warnings below provide information on how you can fix this.',
- summary_fail_title: 'Your server does not meet the requirements for Enano to run.',
- summary_fail_body: 'As a precaution, Enano will not install until the above requirements have been met. Contact your server administrator or hosting company and convince them to upgrade. Good luck.',
+ summary_fail_title: 'Installation requirements not met',
+ summary_fail_body: 'As a precaution, Enano will not install until the above requirements have been met. Contact your server administrator or hosting company for support. If you still need help, please use the Enano support forums.',
objective_scalebacks: 'Review the list above to ensure that you are satisfied with any of Enano\'s workarounds for your server. If you need a particular feature and that feature is listed as disabled above, you should take the opportunity now to correct the problem.'
},
@@ -268,6 +296,9 @@
info_aes_title: 'A note on AES encryption:',
info_aes_body: 'Enano is currently configured to use %aes_bits%-bit AES encryption. While the default value of 192 bits is perfectly acceptable for most sites, those in need of extreme security will want to change this value to 256 bits (the maximum available strength). If you need to change the cipher strength, please edit the file includes/constants.php and then restart this installation. Do not click Continue below until you redo the installation process up until this point, or you will experience severe problems with logging into your site.',
+ msg_installing_unstable_title: 'Unstable release',
+ msg_installing_unstable_body: 'You are installing an unstable release of Enano. Except for bug reports, no support of any kind is provided for this release. If this is a Release Candidate (RC), limited support is available via the Enano forums.',
+
btn_install_enano: 'Install Enano!',
},
install: {