News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

[2.0.12] cache not work?

Started by inter, September 30, 2016, 04:59:33 AM

Previous topic - Next topic

inter

Yesterday I updated the forum and I now have all the cache does not work. My cache system is file storage.

cache_get_data('modSettings')

return false
Sorry for my English

inter

Sorry for my English

aegersz

I think this is related to the Upgrade's serialization related change and there is already at least one Topic that reports multiple issues when caching is set on.
The configuration of my Linux VPS (SMF 2.0 with 160+ mods & some assorted manual tweaks) can be found here and notes on my mods can be found here (warning: those links will take you to a drug related forum). My (House) music DJ dedication page is here

vbgamer45

it's probably most like do to this

function _safe_unserialize($str)
{
// Input exceeds 4096.
if(strlen($str) > 4096)
return false;


If you take out that if statement it probably will work
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

inter

imho. Before the function "cache_get_data" returns "null" type is now a new type "false" and now the old code may break.
Sorry for my English

aegersz

Quote from: vbgamer45 on September 30, 2016, 11:01:29 AM
it's probably most like do to this

function _safe_unserialize($str)
{
// Input exceeds 4096.
if(strlen($str) > 4096)
return false;


If you take out that if statement it probably will work

i tried that on my SimplePortal Shoutbox cache issue (Subs.php) and it doesn't stop the cache from being processed correctly upon page reload. any idea why this would be ?
The configuration of my Linux VPS (SMF 2.0 with 160+ mods & some assorted manual tweaks) can be found here and notes on my mods can be found here (warning: those links will take you to a drug related forum). My (House) music DJ dedication page is here

inter

I am not right, earlier the "false" boolean type could return too. But earlier at me he never came back.
Sorry for my English

asmith

I revert my 2.0.12 update because of the same cache problem.

Quote from: vbgamer45 on September 30, 2016, 11:01:29 AM
it's probably most like do to this

function _safe_unserialize($str)
{
// Input exceeds 4096.
if(strlen($str) > 4096)
return false;


If you take out that if statement it probably will work

That fixes the problem, but I'm not sure that's the proper way.

There's cache_put_data() function which is still using serialize(), shouldn't it change to start using safe_serialize()?

nend

#8
@asmith
safe_serialize isn't used AFAIK.

As far as the issue, there was a problem with the release and an older revision got released instead of the actual 2.0.12 we had planned. Rest assure we are working on getting the correct revision out soon.

feline

Remove the part:

// Input exceeds 4096.
if(strlen($str) > 4096)
return false;

the php unserialize don't have any limits ...

asmith

@feline,

should I do it manually or the update is fixed now?

vbgamer45

Not fixed yet waiting on a patch release.
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

Adrek

Quote from: nend on October 03, 2016, 03:02:17 PM
@asmith
safe_serialize isn't used AFAIK.

As far as the issue, there was a problem with the release and an older revision got released instead of the actual 2.0.12 we had planned. Rest assure we are working on getting the correct revision out soon.

any news about new patch?
Polskie wsparcie SMF na simplemachines.org

the simplest solution is most likely the right one

Kindred

as noted, it is being worked on
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Antes

Please test the issue again in SMF 2.0.13 if you are having issue open a new topic with [SMF 2.0.13] tag on topic.

Thank you.

Advertisement: