Advertisement:

Author Topic: [2.0.12] cache not work?  (Read 4681 times)

Offline inter

  • Jr. Member
  • **
  • Posts: 276
  • Gender: Male
    • interlab on GitHub
[2.0.12] cache not work?
« on: September 30, 2016, 04:59:33 AM »
Yesterday I updated the forum and I now have all the cache does not work. My cache system is file storage.

Code: [Select]
cache_get_data('modSettings')
return false
Sorry for my English

Offline inter

  • Jr. Member
  • **
  • Posts: 276
  • Gender: Male
    • interlab on GitHub
Re: [2.0.12] cache not work?
« Reply #1 on: September 30, 2016, 06:33:41 AM »
PHP Version: 5.6
Sorry for my English

Offline aegersz

  • Sophist Member
  • *****
  • Posts: 1,117
  • Gender: Male
  • "mods" junkie
    • dopetalk
Re: [2.0.12] cache not work?
« Reply #2 on: September 30, 2016, 10:58:47 AM »
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.
SMF 2.0: 135+ mods installed (the full list can be seen at http://forum.drugs-and-users.org/index.php/topic,3301)

Offline vbgamer45

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 19,342
    • smfhacks on Facebook
    • VBGAMER45 on GitHub
    • @createaforum on Twitter
    • SMF For Free
Re: [2.0.12] cache not work?
« Reply #3 on: September 30, 2016, 11:01:29 AM »
it's probably most like do to this
Code: [Select]
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

Offline inter

  • Jr. Member
  • **
  • Posts: 276
  • Gender: Male
    • interlab on GitHub
Re: [2.0.12] cache not work?
« Reply #4 on: September 30, 2016, 11:37:17 AM »
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

Offline aegersz

  • Sophist Member
  • *****
  • Posts: 1,117
  • Gender: Male
  • "mods" junkie
    • dopetalk
Re: [2.0.12] cache not work?
« Reply #5 on: September 30, 2016, 07:03:33 PM »
it's probably most like do to this
Code: [Select]
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 ?
SMF 2.0: 135+ mods installed (the full list can be seen at http://forum.drugs-and-users.org/index.php/topic,3301)

Offline inter

  • Jr. Member
  • **
  • Posts: 276
  • Gender: Male
    • interlab on GitHub
Re: [2.0.12] cache not work?
« Reply #6 on: October 03, 2016, 01:49:16 AM »
I am not right, earlier the "false" boolean type could return too. But earlier at me he never came back.
Sorry for my English

Offline asmith

  • Jr. Member
  • **
  • Posts: 370
  • Gender: Male
Re: [2.0.12] cache not work?
« Reply #7 on: October 03, 2016, 07:50:41 AM »
I revert my 2.0.12 update because of the same cache problem.

it's probably most like do to this
Code: [Select]
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()?

Offline nend

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 1,755
  • 2 deep n2 the code
    • sicommnend on GitHub
    • SIComm.us
Re: [2.0.12] cache not work?
« Reply #8 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.
« Last Edit: October 03, 2016, 07:26:21 PM by nend »

Offline feline

  • SMF Hero
  • ******
  • Posts: 1,618
  • Gender: Female
    • Product developer site
Re: [2.0.12] cache not work?
« Reply #9 on: October 04, 2016, 11:09:48 AM »
Remove the part:
Code: [Select]
// Input exceeds 4096.
if(strlen($str) > 4096)
return false;
the php unserialize don't have any limits ...
PortaMx has released the official release of PortaMx-Forum 1.2 with a built in SEF engine, a integrated Portal and full support for the EU Cookie Law.
Follow us on our Community


Offline asmith

  • Jr. Member
  • **
  • Posts: 370
  • Gender: Male
Re: [2.0.12] cache not work?
« Reply #10 on: October 11, 2016, 01:34:48 PM »
@feline,

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

Offline vbgamer45

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 19,342
    • smfhacks on Facebook
    • VBGAMER45 on GitHub
    • @createaforum on Twitter
    • SMF For Free
Re: [2.0.12] cache not work?
« Reply #11 on: October 11, 2016, 01:57:50 PM »
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

Offline phantomm

  • Sophist Member
  • *****
  • Posts: 1,063
  • Gender: Male
    • pages/smfpl/171860759503032 on Facebook
    • Polish ElkArte community
Re: [2.0.12] cache not work?
« Reply #12 on: October 22, 2016, 03:15:42 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

My mods

Offline Kindred

  • The Mean One
  • Support Specialist
  • SMF Legend
  • *
  • Posts: 55,098
  • Gender: Male
    • Kindred-999 on GitHub
Re: [2.0.12] cache not work?
« Reply #13 on: October 22, 2016, 08:51:16 PM »
as noted, it is being worked on
Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

Offline Antes

  • Evil Black Cat
  • SMF Friend
  • SMF Hero
  • *
  • Posts: 8,646
  • Gender: Male
  • Black cat rulz!
    • Antes on GitHub
    • merta on LinkedIn
    • @antesistan on Twitter
    • Lunarfall
Re: [2.0.12] cache not work?
« Reply #14 on: January 06, 2017, 09:36:48 PM »
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.
Active Project(s): [ SimpleDesk ] # [ Lunarfall ] # [ CoreStore ]

Past Project(s): [ ezPortal ]