I have site on MODX Revolution 2.1.5-pl (traditional) and BobRay's package captcha.
If call Captcha (assets/components/captcha/captcha.php) she olways set session var $_SESSION["veriword"] is equal of image on she.
But, modx get $_SESSION from cache in DB (table modx_cache if prefix modx_)...
Thus, the image (assets/components/captcha/captcha.php) is always different, but the value of the cache is stored verivord a while the old and same...
Help please, how disable caching $_SESSION, or olways rewrite one var $_SESSION['veriword'] ?
Thank you!
>>>===<<<
My hosting conflicting with modSessionHandler. On another hosting worked... But i dont know which is why it did not work...
But i disable his (modSessionHandler) on manager -> System -> System Settings -> session_handler_class -> clear value...
And all works.
Yhanks All for help!
[ed. note: Petja last edited this post 14 years, 11 months ago.]
Petja, I'm unable to make this happen on MODX 2.1.5.
Are you using SPForm or FormIt, or your own code to call the captcha utility? Make sure any snippet calls are uncached:
-
☆ A M B ☆
- 24,524 Posts
I would think that every update to the SESSION, such as the change made when using a veriword feature, would clear that table's cache?
The query cache does not return stale data. When tables are modified, any relevant entries in the query cache are flushed.
http://dev.mysql.com/doc/refman/5.1/en/query-cache.html
-
MODX Staff
- 10,725 Posts
The entire cache_db feature in MODX 2.1.x is broken. Just disable cache_db.
I'm sets in my.cnf
set-variable = query_cache_limit=0
set-variable = query_cache_size=0
Now still does not work, caches session...
How disable caching only one variable $_SESSION['veriword'] ?
Even if it will turn off query_cache - server will slow down...
Now
mysql> show variables like 'query_cache_size';
+------------------+-------+
| Variable_name | Value |
+------------------+-------+
| query_cache_size | 0 |
+------------------+-------+
1 row in set (0.00 sec)
mysql>
But veriword again cached...