Problem with PHP Session Object

2020-04-02 03:15发布

问题:

I am facing some problem with my php session. I have deployed a plugin for file management in my moodle application.

The new plugin home page is behaving unexpectedly and is destroying the actual session of my application and is generating new session_id().

Also when I am trying to view session contents using print_r($_SESSION), it is showing "PHP_Incomplete_Class_Name" in it.

回答1:

Actually PHP_Incomplete_Class_Name has nothing to do with session regeneration.

This behaviour appears when you (or your cms/framework/whatever you have) call session_start() before each serialized object's class definition has been parsed.

So you need to include all classes before you started session.