File tree Expand file tree Collapse file tree 3 files changed +15
-0
lines changed
Expand file tree Collapse file tree 3 files changed +15
-0
lines changed Original file line number Diff line number Diff line change 139139//** Installer Interface
140140//****************************************************************************************************
141141$ inst = new installer ();
142+ if (!$ inst ->get_php_version ()) die ('ISPConfig requieres PHP ' .$ inst ->min_php ."\n" );
142143
143144swriteln ($ inst ->lng (' Following will be a few questions for primary configuration so be careful. ' ));
144145swriteln ($ inst ->lng (' Default values are in [brackets] and can be accepted with <ENTER>. ' ));
157158 die ('ISPConfig 3 installation found. Please use update.php instead if install.php to update the installation. ' );
158159}
159160
161+ //** Detect php-version
162+ $ MIN_PHP ='5.6 ' ;
163+ if (version_compare (PHP_VERSION , $ MIN_PHP , '< ' )) {
164+ echo 'ISPConfig requieres PHP ' .$ MIN_PHP .'. Installed version: ' . PHP_VERSION . "\n" ;
165+ }
166+
167+
160168//** Detect the installed applications
161169$ inst ->find_installed_apps ();
162170
Original file line number Diff line number Diff line change @@ -36,6 +36,7 @@ class installer_base {
3636 public $ conf ;
3737 public $ install_ispconfig_interface = true ;
3838 public $ is_update = false ; // true if it is an update, falsi if it is a new install
39+ public $ min_php = '5.3.3 ' ; // minimal php-version for update / install
3940 protected $ mailman_group = 'list ' ;
4041
4142
@@ -130,6 +131,11 @@ function request_language(){
130131 }
131132 */
132133
134+ //** Detect PHP-Version
135+ public function get_php_version () {
136+ if (version_compare (PHP_VERSION , $ this ->min_php , '< ' )) return false ; else return true ;
137+ }
138+
133139 //** Detect installed applications
134140 public function find_installed_apps () {
135141 global $ conf ;
Original file line number Diff line number Diff line change 174174$ conf ['ispconfig_log_priority ' ] = $ conf_old ["log_priority " ];
175175
176176$ inst = new installer ();
177+ if (!$ inst ->get_php_version ()) die ('ISPConfig requieres PHP ' .$ inst ->min_php ."\n" );
177178$ inst ->is_update = true ;
178179
179180//** Detect the installed applications
You can’t perform that action at this time.
0 commit comments