0

I'm trying to migrate an codeigniter system for my localhost, but i'm receiving this message:

A PHP Error was encountered

Severity: Notice

Message: Only variable references should be returned by reference

Filename: core/Common.php

Line Number: 257

Fatal error: Class 'CI_Controller' not found in C:\xampp\htdocs\sistema-emisa\system\core\CodeIgniter.php on line 233

I've download the following pages from the host:

application ~ public_html ~ system


I changed the enters of the BD for the corrects on my localhost but still didnt work. I have to do some setting or download something else?

The server have this estructure:

enter image description here

haRdy
  • 146
  • 5
  • Check [here](https://stackoverflow.com/questions/28348879/only-variable-references-should-be-returned-by-reference-codeigniter). – Tpojka Jun 16 '17 at 16:42
  • @Tpojka it worked for me, but i'm still with the error message: Fatal error: Class 'CI_Controller' not found in C:\xampp\htdocs\sistema-emisa\system\core\CodeIgniter.php on line 233 – haRdy Jun 16 '17 at 17:03
  • Check `.htaccess` and `APPPATH.'config/config.php'` to see if any value from online server still there and need to be changed to localhost values. – Tpojka Jun 16 '17 at 17:21

1 Answers1

0

One quick fix needs to be done.

Go to your system/core/Common.php file. And search for return $_config[0] =& $config;

and replace this content with either of the following two snippets:

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

OR

return isset($_config[0][$item]) ? $_config[0][$item] : NULL;

Both of the above given pieces of codes will work.

Himanshu Upadhyay
  • 6,220
  • 1
  • 13
  • 32