Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Yosemite / Mamp Pro / CodeIgniter Errors

After i installed Yosemite, i cloned my repo from bitbucket and i setup custom domain with Mamp pro.

I hove this error:

Severity: Notice

Message: Only variable references should be returned by reference

Filename: core/Common.php

Line Number: 257

and another Error :

Severity: Warning

Message: Cannot modify header information - headers already sent by (output started at
/site/system/core/Exceptions.php:185)

Filename: libraries/Session.php

Line Number: 675

i looked around but the fix to rename the envvars file to __envvars doesn't work for me. By the way in the Mamp/Library/bin folder i have to files 1: envvars 2: envvars-std

How can i resolve this errors ?

Thanks

like image 427
Salmen Bejaoui Avatar asked Oct 20 '14 10:10

Salmen Bejaoui


2 Answers

This issue in CodeIgniter 2.X when use it with PHP >=5.6

you can solve it by downgrade your PHP version <= 5.5

or change this line in CodeIgniter as following File: /site/system/core/Common.php Line number 257

change this line from

return $_config[0] =& $config;

to

$_config[0] =& $config;
return $_config[0];
like image 160
Mhisham Avatar answered Oct 01 '22 00:10

Mhisham


codeigniter 2.2 fixes the issue you can update frameowrk folder in order to fi this

Manual Fix

Filename: core/Common.php Line Number: 257

BEFORE CHANGE:

return $_config[0] =& $config; 

AFTER CHANGE:

$_config[0] =& $config;
return $_config[0]; 
like image 25
Gurpinder Singh Avatar answered Oct 01 '22 02:10

Gurpinder Singh