Permalink
Browse files

[#29116] Parse error on initializing installation if server does not

meet PHP requirements . Thanks Jean-Marie.
  • Loading branch information...
1 parent a11f260 commit 1cc30b2ce060316ff3adb98745f7e7339ee0afa9 @infograf768 infograf768 committed with dextercowley Sep 22, 2012
Showing with 25 additions and 6 deletions.
  1. +10 −2 administrator/index.php
  2. +10 −2 index.php
  3. +1 −0 installation/CHANGELOG
  4. +4 −2 installation/index.php
@@ -6,8 +6,16 @@
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
-// Set flag that this is a parent file
-const _JEXEC = 1;
+if (version_compare(PHP_VERSION, '5.3.1', '<'))
+{
+ die('Your host needs to use PHP 5.3.1 or higher to run this version of Joomla!');
+}
+
+/**
+ * Constant that is checked in included files to prevent direct access.
+ * define() is used in the installation folder rather than "const" to not error for PHP 5.2 and lower
+ */
+define('_JEXEC', 1);
if (file_exists(__DIR__ . '/defines.php')) {
include_once __DIR__ . '/defines.php';
View
@@ -6,8 +6,16 @@
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
-// Set flag that this is a parent file.
-const _JEXEC = 1;
+if (version_compare(PHP_VERSION, '5.3.1', '<'))
+{
+ die('Your host needs to use PHP 5.3.1 or higher to run this version of Joomla!');
+}
+
+/**
+ * Constant that is checked in included files to prevent direct access.
+ * define() is used in the installation folder rather than "const" to not error for PHP 5.2 and lower
+ */
+define('_JEXEC', 1);
if (file_exists(__DIR__ . '/defines.php'))
{
@@ -28,6 +28,7 @@ $ -> Language fix or change
22-Sep-2012 Mark Dexter
# [#28764] user notes category is not properly nested in the assets table. Thanks Elin.
+ # [#29116] Parse error on initializing installation if server does not meet PHP requirements . Thanks Jean-Marie.
22-Sep-2012 Jean-Marie Simonet
+$ Adding installation languages: ar-AA, az-AZ, ckb-IQ, fi-FI
@@ -13,13 +13,15 @@
/**
* Constant that is checked in included files to prevent direct access.
+ * define() is used in the installation folder rather than "const" to not error for PHP 5.2 and lower
*/
-const _JEXEC = 1;
+define('_JEXEC', 1);
/**
* Constant that defines the base path of the installed Joomla site.
+ * define() is used in the installation folder rather than "const" to not error for PHP 5.2 and lower
*/
-const JPATH_BASE = __DIR__;
+define('JPATH_BASE', dirname(__FILE__));
// Set path constants.
$parts = explode(DIRECTORY_SEPARATOR, JPATH_BASE);

0 comments on commit 1cc30b2

Please sign in to comment.