• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Codeigniter 2.1.4 and php5.6

#1
[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?

#2
[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

#3
[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.

#4
[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.

#5
[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


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


Users browsing this thread:
1 Guest(s)


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2017 MyBB Group.