CodeIgniter Forums
Codeigniter 2.1.4 and php5.6 - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: Codeigniter 2.1.4 and php5.6 (/showthread.php?tid=60436)



Codeigniter 2.1.4 and php5.6 - El Forum - 03-26-2014

[eluser]DougW[/eluser]
I am getting the following error with php 5.6 and CI 2.1.4


A PHP Error was encountered

Severity: Notice

Message: Only variable references should be returned by reference

Filename: core/Common.php

Line Number: 257

I have seen this reported before but this is a new installation. Is it OK just to remove the & from line 257 in Common.php? Is there a better fix besides turning off notices in php?



Codeigniter 2.1.4 and php5.6 - El Forum - 06-14-2014

[eluser]Unknown[/eluser]
My fix but I am not sure its correct Smile

In my case this notice display after apache and php upgrade on debian.
Server version: Apache/2.4.9 (Debian)
PHP version: 5.6.0
CI version: 2.2.0

Filename: core/Common.php
Line Number: 257

BEFORE CHANGE:

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


AFTER CHANGE:

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

=& operator


Codeigniter 2.1.4 and php5.6 - El Forum - 06-20-2014

[eluser]Rutiguer2701[/eluser]
Thank you very much. I haven't tried the solution yet, though, but my intention is to try it out when I could access my server.

I noticed this bug when I upgraded my Debian Jessie: Lighttpd + PHP 5.6.0.beta3. It was so annoying, and after some Internet searching, I gave up and I installed XAMP. I don't feel good with such an installation, but I found it the only way to keep on working.

As I said, I'll try as soon as possible. Thank you very much.


Codeigniter 2.1.4 and php5.6 - El Forum - 06-21-2014

[eluser]Rutiguer2701[/eluser]
Hi all!

I've just tried this solution, and I have to say that the applicaction runs perfectly. I got rid of that annoying error.

I think we can mark the issue as SOLVED.

Thank you very much.


Codeigniter 2.1.4 and php5.6 - El Forum - 10-25-2014

[eluser]Troop[/eluser]
[quote author="milan.petrak" date="1402815561"]My fix but I am not sure its correct Smile

In my case this notice display after apache and php upgrade on debian.
Server version: Apache/2.4.9 (Debian)
PHP version: 5.6.0
CI version: 2.2.0

Filename: core/Common.php
Line Number: 257

BEFORE CHANGE:

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


AFTER CHANGE:

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

[/quote]

THANKS MILAN!! Worked like a charm. I had just recently upgraded to Yosemite OSX and upgraded my MAMP installation which included PhP 5.6.2