You are viewing the PKP Support Forum | PKP Home Wiki

session_is_registered et al.

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
The Public Knowledge Project Support Forum is moving to http://forum.pkp.sfu.ca

This forum will be maintained permanently as an archived historical resource, but all new questions should be added to the new forum. Questions will no longer be monitored on this old forum after March 30, 2015.

session_is_registered et al.

Postby osborne » Mon Apr 25, 2011 6:41 pm

Session.inc.php uses the session_is_registered function and related functions, which are deprecated as of PHP5.3.0. Are there plans to replace them?
Posts: 77
Joined: Mon Jun 07, 2004 1:24 pm
Location: Toronto, Canada

Re: session_is_registered et al.

Postby mcrider » Mon May 02, 2011 10:55 am

Hi Martin,

Thanks for spotting--I've filed the bug here: http://pkp.sfu.ca/bugzilla/show_bug.cgi?id=6628

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

Re: session_is_registered et al.

Postby aftavaresjr » Wed Jul 11, 2012 4:59 am

Hello friends, I have a problem with OJS here and I'm not sure solve. If you can help I am immensely grateful.
I was having problems as the variable "session_is_registered" that was interrupted by PHP and could not access the system because of an error with it. I had upgraded from PHP 5.3 to 5.4.
I made the changes suggested here on the forum, comment out the line that contains a call to the function in the file Session.inc.php and it worked, but not everything.
The page view "(page User) Managing Editor -> (settings and tools) configuration" simply does not open anything. It is blank and shows nothing.
I can not see anything in error logs, both apache and php.
Does anyone have a tip or idea of what can be?

thank you
Posts: 2
Joined: Wed Jul 11, 2012 4:37 am

Re: session_is_registered et al.

Postby springday » Thu Jul 26, 2012 1:54 am

I have the same problem as aftavaresjr after upgrading from PHP 5.3 to 5.4. The page BASE_DIR/index.php/fi/manager/setup remains blank. I do not get an error message in the browser and can't find any info in Apache's or PHP's logs.

I've run xdebug to trace the program execution, but being an amateur I can't find the answer to what's going wrong. Anyway, the program run-through is ending with a two calls to "ADODB_mysql->ErrorNo()" from ojs-2.3.7\lib\pkp\classes\db\DAO.inc.php:200 and "mysql_errno(resource(53) of type (mysql link persistent))" from ojs-2.3.7\lib\pkp\lib\adodb\drivers\adodb-mysql.inc.php:515. Dies mysql error-number "resoure(53)" help anything to track down the problem with the deprecated "session_is_registered"-function?
The very last line on the stack trace is "SessionManager->close()" from \ojs-2.3.7\lib\pkp\classes\session\SessionManager.inc.php:0, which returns TRUE.

Best wishes,
Posts: 111
Joined: Wed Jul 25, 2012 2:56 pm
Location: Munich, Germany

Re: session_is_registered et al.

Postby springday » Thu Jul 26, 2012 2:10 am

I'm one step (i.e. one error message) further:

Fatal error: Call-time pass-by-reference has been removed in C:\xampp\htdocs\ojs-2.3.7\pages\manager\SetupHandler.inc.php on line 193

So now I wonder if I'm in the right forum at all - is this error related with the disabling of "session_is_registered" or not? Can I change the code line

Code: Select all
$journal =& $router->getContext(&$request);


Code: Select all
$journal =& $router->getContext($request);

without negative side effects?
Posts: 111
Joined: Wed Jul 25, 2012 2:56 pm
Location: Munich, Germany

Re: session_is_registered et al.

Postby asmecher » Thu Jul 26, 2012 7:58 am

Hi Kai,

Yes, you can remove the ampersand in that case to fix the warning. I'll file and commit this for the next release. (See http://pkp.sfu.ca/bugzilla/show_bug.cgi?id=7717 for the same change in patch form.)

Alec Smecher
Public Knowledge Project Team
Posts: 10015
Joined: Wed Aug 10, 2005 12:56 pm

Return to OJS Technical Support

Who is online

Users browsing this forum: No registered users and 1 guest