简体   繁体   中英

Chrome extension cause PHP server to send HTTP 500 error?

I've got a reaaaaaly weird problem. I've got a PHP server based on THINKPHP with SESSION on.

The server send a HTTP 500 back cause "a class not found".

But this error came just after a "session_start();" (I'm really sure the code goes well just before this line and after this line), when make it a comment, all is well.

It's only happen when I use Chrome with several extensions. IE goes well.

I stopped all the extensions, then Chrome goes well. But after I restarted all the extensions, the problem did NOT came again. So I'm so sorry to say that I've no idea which extension make it happen.

So do you ever meet this problem? How does it happen? (I know what I've said is really unlogical. If you want more detail, don't hesitated to ask me)

"Class not found" upon starting a session happens because you have put an object in the session. When PHP tries to restore the object, it expects the class to be already loaded. You either have to do this manually before starting the session or implement an autoload function that can load it on demand.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM