CodeIgniter 2.X to PHP5.6 compatible error

Source: Internet
Author: User

This post consists of: http://xinpure.com/codeigniter-2-x-to-php5-6-compatible-error/

CI 3.0 is compatible with this issue

A PHP version compatibility error was encountered during code migration

A PHP Error was encounteredSeverity: NoticeMessage: Only variable references should be returned by referenceFilename: core/Common.phpLine Number: 257

The original server PHP version is 5.4, the new server PHP version is 5.6, CodeIgniter version 2.1.3

Solution online More, in this record, make a note.

main reason: This error mainly occurs in CodeIgniter 2.x using PHP 5.6 or more versions

Workaround:

  1. Demote PHP version to 5.5 or less

  2. Modify/system/core/common.php line No. 257 code

Will:

return $_config[0] =& $config;

Change to:

$_config[0] =& $config; return $_config[0];

CodeIgniter 2.X to PHP5.6 compatible error

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.