简体   繁体   中英

CodeIgniter 3.1.0 to 3.1.2 upgrade miserable fail

I have an application that has CodeIgniter version 3.1.0 and I am trying to "upgrade" to 3.1.2 (latest version)

I have no custom files in the System folder. I had renamed the system folder (for security reasons) and that change is in my index.php As soon as I switch on the old system folder, application works just fine.

The error that I get is:

PHP Parse error:  syntax error, unexpected T_CONST in C:\\prj\\www\\nbo\\systemXXYYZZ\\core\\CodeIgniter.php on line 58

Line 58 of the CodeIgniter.php is:

LINE 37:defined('BASEPATH') OR exit('No direct script access allowed');
/* COMMENTS IN BETWEEN */         
LINE 58: const CI_VERSION = '3.1.2';

My php version is 5.2.4, apache version is 2.2.6

const won't work on php version 5.2.x.

The latest version of codeigniter is supported only on php 5.3.7+ , so I highly advice you to upgrade your PHP version.

You could downgrade your project to codeigniter 3.0.5, which is the last version that supports php 5.2.x, but it's not recommended.

CodeIgniter 3.1.x recommends PHP 5.6+ and requires at the very least PHP 5.3.7.

Removal of PHP 5.2 support (which nobody should need today) is prominently mentioned in the upgrade instructions .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM