[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fmsystem-commits] [11467] setup: version compare
From: |
Sigurd Nes |
Subject: |
[Fmsystem-commits] [11467] setup: version compare |
Date: |
Sat, 16 Nov 2013 10:39:54 +0000 |
Revision: 11467
http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=11467
Author: sigurdne
Date: 2013-11-16 10:39:53 +0000 (Sat, 16 Nov 2013)
Log Message:
-----------
setup: version compare
Modified Paths:
--------------
trunk/setup/inc/functions.inc.php
trunk/setup/index.php
trunk/setup/manageheader.php
Modified: trunk/setup/inc/functions.inc.php
===================================================================
--- trunk/setup/inc/functions.inc.php 2013-11-15 15:19:28 UTC (rev 11466)
+++ trunk/setup/inc/functions.inc.php 2013-11-16 10:39:53 UTC (rev 11467)
@@ -32,12 +32,17 @@
require_once('../header.inc.php');
}
- if ( !function_exists('filter_var') || !function_exists('json_encode')
) // filter_var() and json_encode are only available in PHP 5.2+
+ if (version_compare(phpversion(), '5.2.0', '<'))
{
die('<h1>You appear to be using PHP ' . PHP_VERSION . "
phpGroupWare requires 5.2.0 or later <br>\n"
. 'Please contact your System Administrator</h1>');
}
+ if ( !function_exists('json_encode') ) // Some distributions have
removed the standard JSON extension as of PHP 5.5rc2 due to a license conflict
+ {
+ die('<h1>You have to install php5-json</h1>');
+ }
+
/* If we included the header.inc.php, but it is somehow broken, cover
ourselves... */
if ( !defined('PHPGW_SERVER_ROOT') )
{
Modified: trunk/setup/index.php
===================================================================
--- trunk/setup/index.php 2013-11-15 15:19:28 UTC (rev 11466)
+++ trunk/setup/index.php 2013-11-16 10:39:53 UTC (rev 11467)
@@ -147,7 +147,7 @@
$setup_tpl->set_var('subaction', $subaction);
// Old PHP
- if ( version_compare('5.2.0', phpversion()) === 1 )
+ if (version_compare(phpversion(), '5.2.0', '<'))
{
$GLOBALS['phpgw_setup']->html->show_header($GLOBALS['phpgw_info']['setup']['header_msg'],True);
$GLOBALS['phpgw_setup']->html->show_alert_msg('Error',
Modified: trunk/setup/manageheader.php
===================================================================
--- trunk/setup/manageheader.php 2013-11-15 15:19:28 UTC (rev 11466)
+++ trunk/setup/manageheader.php 2013-11-16 10:39:53 UTC (rev 11467)
@@ -272,6 +272,14 @@
}
+ if ( !function_exists('json_encode') ) // Some
distributions have removed the standard JSON extension as of PHP 5.5rc2 due to
a license conflict
+ {
+ $detected .= '<b><p align="center" class="msg">'
+ . "You have to install php5-json\n"
+ .
'</p></b><td></tr></table></body></html>';
+ die($detected);
+ }
+
$get_max_value_length = '';
if(ini_get('suhosin.get.max_value_length'))
{
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Fmsystem-commits] [11467] setup: version compare,
Sigurd Nes <=