Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

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

meet PHP requirements . Thanks Jean-Marie.
  • Loading branch information...
commit 1cc30b2ce060316ff3adb98745f7e7339ee0afa9 1 parent a11f260
@infograf768 infograf768 authored dextercowley committed
View
12 administrator/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
12 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'))
{
View
1  installation/CHANGELOG
@@ -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
View
6 installation/index.php
@@ -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);
Please sign in to comment.
Something went wrong with that request. Please try again.