OJS OCS OMP OHS

You are viewing the PKP Support Forum | PKP Home Wiki



Deprecated

Are you responsible for making OJS work -- installing, upgrading, migrating or troubleshooting? Do you think you've found a bug? Post in this forum.

Moderators: jmacgreg, btbell, michael, bdgregg, barbarah, asmecher

Forum rules
What to do if you have a technical problem with OJS:

1. Search the forum. You can do this from the Advanced Search Page or from our Google Custom Search, which will search the entire PKP site. If you are encountering an error, we especially recommend searching the forum for said error.

2. Check the FAQ to see if your question or error has already been resolved.

3. Post a question, but please, only after trying the above two solutions. If it's a workflow or usability question you should probably post to the OJS Editorial Support and Discussion subforum; if you have a development question, try the OJS Development subforum.

Deprecated

Postby joaquincf » Tue Sep 15, 2009 6:39 am

Hello.

I've updated my XAMPP version, so that the php version has been updated too. My problem is that now, when I try to see my OJS journal my web browser displays it:


Deprecated: Assigning the return value of new by reference is deprecated in C:\xampp\htdocs\OJS\classes\core\Core.inc.php on line 52

Deprecated: Assigning the return value of new by reference is deprecated in C:\xampp\htdocs\OJS\classes\core\Core.inc.php on line 56

Deprecated: Assigning the return value of new by reference is deprecated in C:\xampp\htdocs\OJS\classes\core\Handler.inc.php on line 122

Deprecated: Assigning the return value of new by reference is deprecated in C:\xampp\htdocs\OJS\classes\core\Handler.inc.php on line 123

Deprecated: Assigning the return value of new by reference is deprecated in C:\xampp\htdocs\OJS\classes\core\ArrayItemIterator.inc.php on line 181


Do you know how to solve it?

Thanks in advance.
joaquincf
 
Posts: 49
Joined: Thu Feb 26, 2009 8:39 am

Re: Deprecated

Postby bar338 » Tue Sep 15, 2009 7:55 am

I don't know if its the right thing to do, but i managed to fix this problem when i had it. I just went through to each line where the error occurred ( alot of lines) and deleted the & sign. It fixed the problem and didn't cause any more errors.
bar338
 
Posts: 90
Joined: Tue Jun 09, 2009 11:54 am

Re: Deprecated

Postby mcrider » Tue Sep 15, 2009 9:07 am

Hi folks,

Alternatively, you can turn off E_STRICT error reporting in your php.ini file (which is typically something you should do with a production server anyway). The reason we haven't fixed this in our software is to ensure PHP4 backwards-compatibility.

Cheers,
Matt
mcrider
 
Posts: 952
Joined: Mon May 05, 2008 10:29 am
Location: Vancouver, BC

Re: Deprecated

Postby joaquincf » Wed Sep 16, 2009 2:05 am

I would like to fix the problem without modifying the code (not deleting &), so that I'm trying to turn off E_STRICT error reporting in my php.ini but it seems not working.

I modify php.ini file placed at C:\xampp\php\php.ini

The original error reporting line was:
error_reporting = E_ALL & ~E_NOTICE & ~E_DEPRECATED

and the new line is:
error_reporting = E_ALL & ~E_NOTICE & ~E_DEPRECATED & ~E_STRICT

I think that it turns off E_STRICT error reporting but same errors are displayed.

Is the new line what I must write?

Thanks in advance.
joaquincf
 
Posts: 49
Joined: Thu Feb 26, 2009 8:39 am

Re: Deprecated

Postby mcrider » Wed Sep 16, 2009 10:01 am

Hi Joaquin,

Have you restarted XAMPP? There might be some specific way to do this with XAMPP, try checking the guide for it. Turning off strict notices should definitely suppress these messages.

Cheers,
Matt
mcrider
 
Posts: 952
Joined: Mon May 05, 2008 10:29 am
Location: Vancouver, BC

Re: Deprecated

Postby joaquincf » Wed Sep 16, 2009 3:35 pm

Yes I've restarted XAMPP by executing c:\xampp\xampp_restart.exe. Even I've restarted the server but this error messages are shown yet.

Could be a problem if I modify the code and I delete & of the referenced lines?

Thanks in advance.
joaquincf
 
Posts: 49
Joined: Thu Feb 26, 2009 8:39 am

Re: Deprecated

Postby mcrider » Wed Sep 16, 2009 4:03 pm

Hi Joaquin,

Hm.. You can try adding ini_set('error_reporting', 'E_ALL & ~E_NOTICE | E_STRICT'); to the top of your index.php file; This should ensure that warnings are not displayed despite what your php.ini file is saying.

Cheers,
Matt
mcrider
 
Posts: 952
Joined: Mon May 05, 2008 10:29 am
Location: Vancouver, BC

Re: Deprecated

Postby joaquincf » Thu Sep 17, 2009 1:02 am

I've added ini_set('error_reporting', 'E_ALL & ~E_NOTICE | E_STRICT'); at the top of my index.php file but same errors are shown.

Do you have more ideas?

Thanks in advance.
joaquincf
 
Posts: 49
Joined: Thu Feb 26, 2009 8:39 am

Re: Deprecated

Postby bubbleBoy » Tue Oct 19, 2010 10:43 am

i added that line to the top of my index.php file and it didnt get rid of those erros/warnings?
How did you solve it?
bubbleBoy
 
Posts: 46
Joined: Fri Apr 09, 2010 7:34 pm

Re: Deprecated

Postby behz4d » Sun Jun 16, 2013 2:10 am

For those who are still suffering from this "Deprecated" error, all you need to do to get rid of errors is:
in 'includes/driver.inc.php', line 29: error_reporting(E_ALL);
change the above line with:
error_reporting(E_ALL ^ E_DEPRECATED ^ E_WARNING);

That's just a way to run away from errors and not showing them...
behz4d
 
Posts: 15
Joined: Sat Sep 26, 2009 12:34 pm


Return to OJS Technical Support

Who is online

Users browsing this forum: Google [Bot] and 21 guests