Welcome Guest, Not a member yet? Register   Sign In
Message: Assigning the return value of new by reference is deprecated
#1

[eluser]bluerockit[/eluser]
I have searched Google and this forum.
My setup is as follows:
Moved application from a PHP 5.2 setup to a Ubuntu Lucid Lynx 10.4 PHP 5.3 setup.
Current PHP Version: PHP Version 5.3.2-1ubuntu4.2
CodeIgniter 1.7.2
php.ini snippit from phpinfo():

Code:
display_errors Off Off
display_startup_errors Off Off

my main index.php has the following setting at the top:
Code:
error_reporting(E_ALL & ~E_DEPRECATED);

I thought that piece disabled all the deprecated warnings?
Anyway, here are the errors I receive on my pages:
_______________

Code:
A PHP Error was encountered
Severity: 8192

Message: Assigning the return value of new by reference is deprecated

Filename: includes/view-functions.php

Line Number: 1561

A PHP Error was encountered
Severity: 8192

Message: Assigning the return value of new by reference is deprecated

Filename: errors/error_php.php

Line Number: 1643

A PHP Error was encountered
Severity: 8192

Message: Assigning the return value of new by reference is deprecated

Filename: errors/error_php.php

Line Number: 1654

A PHP Error was encountered
Severity: 8192

Message: Assigning the return value of new by reference is deprecated

Filename: errors/error_php.php

Line Number: 1704

A PHP Error was encountered
Severity: 8192

Message: Assigning the return value of new by reference is deprecated

Filename: errors/error_php.php

Line Number: 1891

A PHP Error was encountered
Severity: 8192

Message: Assigning the return value of new by reference is deprecated

Filename: errors/error_php.php

Line Number: 1974

A PHP Error was encountered
Severity: 8192

Message: Assigning the return value of new by reference is deprecated

Filename: errors/error_php.php

Line Number: 1985

A PHP Error was encountered
Severity: 8192

Message: Assigning the return value of new by reference is deprecated

Filename: errors/error_php.php

Line Number: 2041

A PHP Error was encountered
Severity: 8192

Message: Assigning the return value of new by reference is deprecated

Filename: errors/error_php.php

Line Number: 2210

A PHP Error was encountered
Severity: 8192

Message: Assigning the return value of new by reference is deprecated

Filename: errors/error_php.php

Line Number: 2270
_____________________________

Seems the code is running fine other than the displayed deprecated warnings. Where am I going wrong? I just want to disable the deprecated warnings. Any help would be appreciated!
#2

[eluser]cahva[/eluser]
This is wrong(this is the format to use it in php.ini):
Code:
error_reporting(E_ALL & ~E_DEPRECATED);

Manual would suggest something like this:
Code:
error_reporting(E_ALL ^ E_DEPRECATED);

But anyway.. Those files that spit errors can't be CI's system files as CI v.1.7.2 works with PHP 5.3 no problemo.
#3

[eluser]bluerockit[/eluser]
[quote author="cahva" date="1275452242"]This is wrong(this is the format to use it in php.ini):
Code:
error_reporting(E_ALL & ~E_DEPRECATED);

Manual would suggest something like this:
Code:
error_reporting(E_ALL ^ E_DEPRECATED);

But anyway.. Those files that spit errors can't be CI's system files as CI v.1.7.2 works with PHP 5.3 no problemo.[/quote]

That is correct. I have a reference to an external program called MachForm. My program was referencing machform.php file which in turn had a reference to:
Code:
error_reporting(E_ALL ^ E_NOTICE);
in it's config file. I changed the E_NOTICE to E_DEPRECATED in the MachForm config file
Code:
error_reporting(E_ALL ^ E_DEPRECATED);
and all works fine. Thanks for the help!
#4

[eluser]Unknown[/eluser]
I too got rid of that specific error, but then received different ones for the same view-functions.php file even though I set config.php to:

Code:
error_reporting(0);

Any ideas what I am missing?

Any help would be much appreciated! Smile

Thanks




Theme © iAndrew 2016 - Forum software by © MyBB