File tree Expand file tree Collapse file tree 3 files changed +16
-0
lines changed
Expand file tree Collapse file tree 3 files changed +16
-0
lines changed Original file line number Diff line number Diff line change 150150$ retval =shell_exec ("which which " );
151151if (empty ($ retval )) die ("ISPConfig requieres which \n" );
152152
153+ $ inst ->check_prerequisites ();
154+
153155swriteln ($ inst ->lng (' Following will be a few questions for primary configuration so be careful. ' ));
154156swriteln ($ inst ->lng (' Default values are in [brackets] and can be accepted with <ENTER>. ' ));
155157swriteln ($ inst ->lng (' Tap in "quit" (without the quotes) to stop the installer. ' ."\n\n" ));
Original file line number Diff line number Diff line change @@ -198,6 +198,18 @@ public function find_installed_apps() {
198198
199199 if (($ conf ['apache ' ]['installed ' ] && is_file ($ conf ['apache ' ]["vhost_conf_enabled_dir " ]."/000-ispconfig.vhost " )) || ($ conf ['nginx ' ]['installed ' ] && is_file ($ conf ['nginx ' ]["vhost_conf_enabled_dir " ]."/000-ispconfig.vhost " ))) $ this ->ispconfig_interface_installed = true ;
200200 }
201+
202+ //** Check prerequisites
203+ public function check_prerequisites () {
204+ $ msg = '' ;
205+
206+ if (version_compare (phpversion (), '5.4 ' , '< ' )) $ msg .= "PHP Version 5.4 or newer is required. \n" ;
207+ if (!function_exists ('curl_init ' )) $ msg .= "PHP Curl Module is missing. \n" ;
208+ if (!function_exists ('mysqli_connect ' )) $ msg .= "PHP MySQLi Module is nmissing. \n" ;
209+ if (!function_exists ('mb_detect_encoding ' )) $ msg .= "PHP Multibyte Module (MB) is nmissing. \n" ;
210+
211+ if ($ msg != '' ) die ($ msg );
212+ }
201213
202214 public function force_configure_app ($ service , $ enable_force =true ) {
203215 $ force = false ;
Original file line number Diff line number Diff line change 188188if (!$ inst ->get_php_version ()) die ('ISPConfig requieres PHP ' .$ inst ->min_php ."\n" );
189189$ inst ->is_update = true ;
190190
191+ $ inst ->check_prerequisites ();
192+
191193echo "This application will update ISPConfig 3 on your server. \n\n" ;
192194
193195//* Make a backup before we start the update
You can’t perform that action at this time.
0 commit comments