Search

I’m getting an error that appears to be related to CacheLite. When attempting to update a section record, I get the following:

Symphony Fatal Database Error

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ”/pages/publications.php/?subcat_id=6&st=br”’ at line 1

An error occurred while attempting to execute the following query

DELETE FROM sym_cachelite_references WHERE page='/pages/publications.php/?subcat_id=6&st=br''

There appears to be a spurious single quote mark at the end of the string. Any thoughts on how to correct this?

CacheLite updated to version 1.0.11 on 9th of January 2011

I’ve removed any references to frontend and the other now-deprecated methods in favour of the new accessors. This should hopefully fix the conflicts people have had with other extensions on the System Preferences page.

CacheLite updated to version 1.0.12 on 9th of January 2011

  • Encode URLs

There appears to be a spurious single quote mark at the end of the string. Any thoughts on how to correct this?

I’ve just pushed a new version that should correct this problem. URLs are now properly encoded everywhere, so stray ' quotes shouldn’t be a problem. That said, I’m not sure where the URL you’re generating is coming from /pages/publications.php/?subcat_id=6&st=br' doesn’t look like a Symphony URL to me—are you doing something slightly odd?

Thanks for the update. I’ll check to see if it addresses the problem this evening. As for the URL, I don’t think I’m doing anything odd. I found that string a little weird myself, but it didn’t immediately appear to be the problem, so I passed over it in ignorant but discreet silence. :)

Hi Guys, has anyone used CacheLite with nonce values for added security?

nonce values

What are those? What extra security is required?

Sounds like this, although this is too much for my tiny little mind to comprehend! Sounds like big architecture stuff…

Wordpress use nonces for their intention verification purposes link text. Pretty nifty idea especially when handling Ajax requests on ones’ page. Since a nonce is dynamic content, it would be hard to implement Cachelite as such. Having said that, it seems the CacheLite library which the Cachelite extension uses, supports nonce values. link text

Was just wondering whether anyone used Cachelite with nonce values.

@Makenosound - Max, this is a wonderful extension!!! I don’t know why it’s taken me this long to try it out. But, thank you so much for pulling this one together. Awesome!

@bzerangue: No probs! It’s great to hear that it’s working well for someone.

@Max

I’m getting an error when using ?flush on a specific site.

?flush=site works fine, so I guess it’s something URL/hash-related.

Maybe it’s accidently hashing in the ?flush-parameter, because it trys to delete a cached files that doesn’t exist.

Update: Wasn’t the ?flush-parameter, but had to do with inconsistent use of urlencode and therefore different hash-values/filenames.

I’m getting an error when using ?flush on a specific site.

Hmm, that’s not ideal. Can you add it to the issue tracker? I’m under the pump at the moment, so I don’t think I’ll get a chance to look at it for a few weeks.

Added the issue to the issue tracker.

Maybe I get some time next week to dive into your code and provide more information on this.

I think I fixed a few bugs.

Had to do with your latest urlencode-changes and missing parameters when calling the class.cachelite.php’s remove-function.

I’m not on GitHub yet, but I hope you can somehow run my code through git and review my fixes. Otherwise I’ll explain in more detail what I’ve done.

File attached…

Attachments:
extension.driver.php

@jensscherbl: Nice work. I’m happy to take a look, but the file you’ve attached doesn’t appear to be any different from the extension.driver.php in the latest version.

You’re right, sorry. Hope I attached the right one this time ;-)

Didn’t have to change a lot, but here’s what I’ve done:

Line 225: $this->_cacheLite->remove($flush, 'default', true);

Line 274: $this->_cacheLite->remove(urlencode($url), 'default', true);

Line 405: $this->_cacheLite->remove($url, 'default', true);

Attachments:
extension.driver.php

CacheLite updated to version 1.1.0 on 23rd of February 2011

  • Fix bug in ?flush
  • Made sure $_GET parameters are parsed consistently (i.e., regardless of order)

@jensscherbl: Thanks for checking into the problem, and picking up my incorrect user of the remove(); function from the CacheLite library. I’m now ensuring it checks that a cache file exists before it attempts to remove it.

I’ve taken a different approach with the URL encoding and reworked the way CacheLite figures out the URLs for hashing: I’m now using the $_GET array and sorting it by key so it doesn’t matter what order additional URL parameters appear in. Basically this means:

/articles/cachelite-is-great/?foo=true&bar=false

Will be seen as identical to:

/articles/cachelite-is-great/?bar=false&foo=true

As far as CacheLite is concerned.

Seems to work fine now, thanks.

Create an account or sign in to comment.

Symphony • Open Source XSLT CMS

Server Requirements

  • PHP 5.3-5.6 or 7.0-7.3
  • PHP's LibXML module, with the XSLT extension enabled (--with-xsl)
  • MySQL 5.5 or above
  • An Apache or Litespeed webserver
  • Apache's mod_rewrite module or equivalent

Compatible Hosts

Sign in

Login details