[wp-hackers] set_transient returns false on live server but true on local host.

Haluk Karamete halukkaramete at gmail.com
Tue Jan 7 23:36:24 UTC 2014


Otto, it wasn't the total cache... It was a char set issue. The data I
happened to choose to store was having a char that the set_transient did
not want to deal with...  it's my bad luck that my test data has a such a
junk in it.

I realized it later on that when I did an htmlspecialchar($on_that_value),
the  htmlspecialchars outtputted nada, zilch!
And that explains why the set_transient was returning false.

When I stored a different data, I saw that there was nothing wrong at all.
Transients continued to work with total cache and without.

Do you guys do htmlspecialchars or anything of that sort within the
set_transient process?
could the following remedy the issue?

htmlspecialchars($problematic_val, ENT_COMPAT|ENT_SUBSTITUTE, "UTF-8")




On Sun, Jan 5, 2014 at 1:53 PM, Otto <otto at ottodestruct.com> wrote:

> I use W3TC myself, and it works fine for me, but you do have to
> configure it properly. Check the config there and make sure everything
> is set right. Or, turn it off if you cannot find the config settings.
>
> Caching isn't an end-user thing, it needs to be configured by an admin
> who knows what he's doing.
>
> -Otto
>
>
> On Sun, Jan 5, 2014 at 11:41 AM, Haluk Karamete <halukkaramete at gmail.com>
> wrote:
> > Otto, after your reminder about the external cachers, I found out that
> the
> > production server has total cache installed.
> >
> > I tried the solution mentioned here
> >
> http://wordpress.stackexchange.com/questions/108287/trouble-with-transient-api-when-w3tc-is-activated
> >
> > but no luck.
> >
> > still the beautiful transient system that WordPress has for us is by
> passed
> > here...  I build a plug in tapping into the core transient API's left and
> > right... and it works like a charm on my localhost test environment...
> > but these external cache systems put a bullet hole into the basics...
> >
> > Any recommendations?
> >
> >
> >
> >
> > On Sun, Jan 5, 2014 at 7:52 AM, Otto <otto at ottodestruct.com> wrote:
> >
> >> If we assume that neither server has an external object cache set up,
> >> then a return of false here most likely means that the insert or
> >> update of the options table failed. In which case, check that the
> >> options table doesn't need a REPAIR run on it.
> >>
> >> -Otto
> >>
> >>
> >> On Sun, Jan 5, 2014 at 9:35 AM, Haluk Karamete <halukkaramete at gmail.com
> >
> >> wrote:
> >> > What would be the reason for the set_transient API to return FALSE on
> a
> >> > live server but TRUE on local host - that's obviously for the same
> code.
> >> >
> >> > The only diff is live server is IIS and the local is Apache.
> >> >
> >> > And how would I get to the bottom of a set_transient-returns-FALSE
> >> > situation?
> >> >
> >> > I understand that the set_transient does not return an error object in
> >> the
> >> > case of something not going right.
> >> > _______________________________________________
> >> > wp-hackers mailing list
> >> > wp-hackers at lists.automattic.com
> >> > http://lists.automattic.com/mailman/listinfo/wp-hackers
> >> _______________________________________________
> >> wp-hackers mailing list
> >> wp-hackers at lists.automattic.com
> >> http://lists.automattic.com/mailman/listinfo/wp-hackers
> >>
> > _______________________________________________
> > wp-hackers mailing list
> > wp-hackers at lists.automattic.com
> > http://lists.automattic.com/mailman/listinfo/wp-hackers
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers
>


More information about the wp-hackers mailing list