Private GIT

Skip to content
Snippets Groups Projects
Commit a67dd7d0 authored by Miha Petkovsek's avatar Miha Petkovsek
Browse files

Dropped 32bit system support and forced requirement of php5.4+

parent c2da528b
No related branches found
No related tags found
No related merge requests found
...@@ -73,14 +73,6 @@ $config['resolve_verbose'] = true; // verbose response - print ...@@ -73,14 +73,6 @@ $config['resolve_verbose'] = true; // verbose response - print
******************************/ ******************************/
$debugging = false; $debugging = false;
/**
* Allow older PHP version
*
* allow version < 5.4 with limited functionality
******************************/
$allow_older_version = false;
/* /*
* API Crypt security provider. "mcrypt" or "openssl" * API Crypt security provider. "mcrypt" or "openssl"
* *
......
...@@ -46,45 +46,52 @@ if ((@include_once 'PEAR.php') != true) { ...@@ -46,45 +46,52 @@ if ((@include_once 'PEAR.php') != true) {
} }
# if any extension is missing print error and die! # if any extension is missing print error and die!
if (sizeof($missingExt) != 1 || (phpversion() < "5.4" && $allow_older_version!==true)) { if (sizeof($missingExt) != 1 || (phpversion() < "5.4") || PHP_INT_SIZE==4) {
/* remove dummy 0 line */ /* remove dummy 0 line */
unset($missingExt[0]); unset($missingExt[0]);
/* headers */ /* headers */
$error = "<html>"; $error = [];
$error .= "<head>"; $error[] = "<html>";
$error .= "<base href='$url".BASE."' />"; $error[] = "<head>";
$error .= '<link rel="stylesheet" type="text/css" href="css/bootstrap/bootstrap.min.css">'; $error[] = "<base href='$url".BASE."' />";
$error .= '<link rel="stylesheet" type="text/css" href="css//bootstrap/bootstrap-custom.css">'; $error[] = '<link rel="stylesheet" type="text/css" href="css/bootstrap/bootstrap.min.css">';
$error .= "</head>"; $error[] = '<link rel="stylesheet" type="text/css" href="css//bootstrap/bootstrap-custom.css">';
$error .= "<body style='margin:0px;'>"; $error[] = "</head>";
$error .= '<div class="row header-install" id="header"><div class="col-xs-12">'; $error[] = "<body style='margin:0px;'>";
$error .= '<div class="hero-unit" style="padding:20px;margin-bottom:10px;">'; $error[] = '<div class="row header-install" id="header"><div class="col-xs-12">';
$error .= '<a href="'.create_link(null,null,null,null,null,true).'">phpipam requirements error</a>'; $error[] = '<div class="hero-unit" style="padding:20px;margin-bottom:10px;">';
$error .= '</div>'; $error[] = '<a href="'.create_link(null,null,null,null,null,true).'">phpipam requirements error</a>';
$error .= '</div></div>'; $error[] = '</div>';
$error[] = '</div></div>';
/* Extensions error */ /* Extensions error */
if(sizeof($missingExt)>0) { if(sizeof($missingExt)>0) {
$error .= "<div class='alert alert-danger' style='margin:auto;margin-top:20px;width:500px;'><strong>"._('The following required PHP extensions are missing').":</strong><br><hr>"; $error[] = "<div class='alert alert-danger' style='margin:auto;margin-top:20px;width:500px;'><strong>"._('The following required PHP extensions are missing').":</strong><br><hr>";
$error .= '<ul>' . "\n"; $error[] = '<ul>' . "\n";
foreach ($missingExt as $missing) { foreach ($missingExt as $missing) {
$error .= '<li>'. $missing .'</li>' . "\n"; $error[] = '<li>'. $missing .'</li>' . "\n";
} }
$error .= '</ul><hr>' . "\n"; $error[] = '</ul><hr>' . "\n";
$error .= _('Please recompile PHP to include missing extensions and restart Apache.') . "\n"; $error[] = _('Please recompile PHP to include missing extensions and restart Apache.') . "\n";
} }
/* php version error */ /* php version error */
elseif(phpversion() < "5.4") {
$error[] = "<div class='alert alert-danger' style='margin:auto;margin-top:20px;width:500px;'><strong>"._('Unsupported PHP version')."!</strong><br><hr>";
$error[] = _('From release 1.3.2 on at least PHP version 5.4 is required!')."<br>";
$error[] = _("Detected PHP version: ").phpversion(). "<br><br>\n";
$error[] = _("Last development version can be downloaded ")." <a href='https://github.com/phpipam/phpipam/tree/9ca731d475d5830ca421bac12da31d5023f02636' target='_blank'>here</a>.";
}
/* 32-bit systems */
else { else {
$error .= "<div class='alert alert-danger' style='margin:auto;margin-top:20px;width:500px;'><strong>"._('Unsupported PHP version')."!</strong><br><hr>"; $error[] = "<div class='alert alert-danger' style='margin:auto;margin-top:20px;width:500px;'><strong>"._('Not 64-bit system')."!</strong><br><hr>";
$error .= _('From release 1.3.2 on at least PHP version 5.4 is required!')."<br>"._('You can override this by setting $allow_older_version=true in config.php.')."<br>"; $error[] = _('From release 1.4 on 64bit system is required!')."<br>";
$error .= _("Detected PHP version: ").phpversion(). "<br><br>\n"; $error[] = _("Last development version can be downloaded ")." <a href='https://github.com/phpipam/phpipam/tree/9ca731d475d5830ca421bac12da31d5023f02636' target='_blank'>here</a>.";
$error .= _("Last development version can be downloaded ")." <a href='https://github.com/phpipam/phpipam/tree/9ca731d475d5830ca421bac12da31d5023f02636' target='_blank'>here</a>.";
} }
$error .= "</body>"; $error[] = "</body>";
$error .= "</html>"; $error[] = "</html>";
die($error); die(implode("\n", $error));
} }
\ No newline at end of file
...@@ -7,6 +7,8 @@ ...@@ -7,6 +7,8 @@
Enhancements, changes: Enhancements, changes:
---------------------------- ----------------------------
+ Circuits enhancements (Virtual Circuits); + Circuits enhancements (Virtual Circuits);
+ Dropped support for 32bit systems;
+ PHP 5.4 is now required;
+ API: + API:
+ Add Mac Search for Addresses controller (#2005); + Add Mac Search for Addresses controller (#2005);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment