Same issue with my multi-store with this error in the error log:
PHP Fatal error: Class 'PageCache' not found in /store/index.php on line 13
Mike
Nope that wasn't it. I guess that was written because I didn't have the file uploaded until after I adjusted the index file. So, so far no errors, just a blank page for every domain of the multistore.
At this point it would be helpful if someone else using multistore could test this and say what their results are.
Mike
PHP Fatal error: Class 'PageCache' not found in /store/index.php on line 13
Mike
Nope that wasn't it. I guess that was written because I didn't have the file uploaded until after I adjusted the index file. So, so far no errors, just a blank page for every domain of the multistore.
At this point it would be helpful if someone else using multistore could test this and say what their results are.
Mike
cue4cheap not cheap quality
With a clear cache and first load of a page i'm getting the comment on the page source. Is this correct or should only be on the second cached visit?
Oh and a spelling correction - 'url' in the page source comment is misspelled 'uri'
Otherwise after a couple days on this everything has been great with a single store on 1.5.5.1 and multi currencies.
Oh and a spelling correction - 'url' in the page source comment is misspelled 'uri'
Otherwise after a couple days on this everything has been great with a single store on 1.5.5.1 and multi currencies.
Just means someone else visited the page before you did. The "first view" every 4 hours (with the default settings) will create the cached file, then everyone for 4 hours after will get the cached paged (assuming they aren't logged in, nothing in their cart, etc). Or it could mean your browser pulls the data again when you do "view source", I believe some do, and others use the already fetched content.gtoc wrote:With a clear cache and first load of a page i'm getting the comment on the page source. Is this correct or should only be on the second cached visit?
Long story, but a url is a type of uri. Technically, since I have the hostname separated out, it's neither of themOh and a spelling correction - 'url' in the page source comment is misspelled 'uri'
Good to hear, thanks.Otherwise after a couple days on this everything has been great with a single store on 1.5.5.1 and multi currencies.
Did you check your webservers' error log file, or just the opencart error log?Cue4cheap wrote:Nope that wasn't it. I guess that was written because I didn't have the file uploaded until after I adjusted the index file. So, so far no errors, just a blank page for every domain of the multistore.
Also, did you "view source" on the blank page to see what's there? For example, both a truly "empty page" and '<html><head></head><body></body></html>' look like a blank page.
I did just discover an issue. The page cache doesn't support using the 'gzip output compression' option within opencart, so that setting (System->Settings->Edit->Server->Output Compression Level) has to be set to 0. If it's set to anything other than zero, the page cache outputs the compressed data, but without the required HTTP headers for the browser to understand what's being sent, and you get garbage looking characters in the browser.
It does work fine with that setting at 0, and apache's mod_deflate turned on, which is better idea anyway.
That said, I'll note it as a bug.
It does work fine with that setting at 0, and apache's mod_deflate turned on, which is better idea anyway.
That said, I'll note it as a bug.
All error logs empty except for that initial error that I caused by not having things set up right.budgetneon wrote:Did you check your webservers' error log file, or just the opencart error log?Cue4cheap wrote:Nope that wasn't it. I guess that was written because I didn't have the file uploaded until after I adjusted the index file. So, so far no errors, just a blank page for every domain of the multistore.
Also, did you "view source" on the blank page to see what's there? For example, both a truly "empty page" and '<html><head></head><body></body></html>' look like a blank page.
The page is 100% empty. View source shows one empty line.
I tried to turn the compression level to 0 as an attempt from what you wrote but nada change.
Mike
cue4cheap not cheap quality
If it was at something other than 0, that could be it. You would have had to delete the existing cache files as well, assuming it was caching an empty file.I tried to turn the compression level to 0 as an attempt from what you wrote but nada change.
Other possibilities:
- you're running a version of php that's lower than 5.4. I made some changes where it works with 5.3, but not well.
- you're running on windows, and don't have the latest copy of the pagecache.php code. The earlier revisions tried to create files with the ':' character in them in some cases, which windows can't cope with.
- the user that your web server is running as (on debian, it's usually www-data) doesn't have permissions to write to the pagecache directory.
- you're running some extension that changes php output buffering in a significant way.
I'll put this on hold as I put it to 0, deleted the pagecache folder and it does get recreated with files under it. And I can look into the files and see your line of: <!--cache host ... etc. but I still get a blank screen.budgetneon wrote:If it was at something other than 0, that could be it. You would have had to delete the existing cache files as well, assuming it was caching an empty file.I tried to turn the compression level to 0 as an attempt from what you wrote but nada change.
Other possibilities:
- you're running a version of php that's lower than 5.4. I made some changes where it works with 5.3, but not well.
- you're running on windows, and don't have the latest copy of the pagecache.php code. The earlier revisions tried to create files with the ':' character in them in some cases, which windows can't cope with.
- the user that your web server is running as (on debian, it's usually www-data) doesn't have permissions to write to the pagecache directory.
- you're running some extension that changes php output buffering in a significant way.
Thank you for your attempts and contrib.
Mike
cue4cheap not cheap quality
Good news, thanks. I left an open issue on github regarding fast-cgi with PHP 5.3 or lower.Cue4cheap wrote:I was using fast-cgi with php 5.3 and it wasn't working but I am now using it with 5.4 and it looks like your contib is working.....
Mike
Just added two features
1) Buttons that make the changes to index.php for you, so no manual editing unless your webserver user lacks permissions to modify the index.php file.
Note: If you installed a previous version of this pagecache, remove the changes you made to index.php before installing this latest version. If you don't, you won't be able to use the "Enable/Disable" buttons in the admin panel.
2) An admin panel with stats, buttons to clear the whole cache or just expired entries, etc.
Available here: https://github.com/budgetneon/pagecache
Here's a screenshot of the admin panel:
1) Buttons that make the changes to index.php for you, so no manual editing unless your webserver user lacks permissions to modify the index.php file.
Note: If you installed a previous version of this pagecache, remove the changes you made to index.php before installing this latest version. If you don't, you won't be able to use the "Enable/Disable" buttons in the admin panel.
2) An admin panel with stats, buttons to clear the whole cache or just expired entries, etc.
Available here: https://github.com/budgetneon/pagecache
Here's a screenshot of the admin panel:
I've not used litespeed, but I just looked at their docs.gtoc wrote:Worked great on test site but my live servers have litespeed. Any chance this could be made to work with LS?
Does this mean you're using their "PHP LSAPI" to run php? It seems to have lots of different modes, so I would probably need the gory details of exactly how you're set up (which SAPI, configured how, PHP version, etc )to try and see why it's not working out of the box.
Also, if you could try it and note any errors, that would be helpful.
New to all this so I don't know the technical jargon but they said their server level PHP handler is LSPHP.
Your admin says installed with the message -
PHP Version: 5.4.32, Status: supported (PHP 5.4 or greater)
SAPI: litespeed, Status: unsupported (pagecache has not been tested with this SAPI)
Then when browsing site, no cache files are created. No errors also.
Your admin says installed with the message -
PHP Version: 5.4.32, Status: supported (PHP 5.4 or greater)
SAPI: litespeed, Status: unsupported (pagecache has not been tested with this SAPI)
Then when browsing site, no cache files are created. No errors also.
I think it may be one of these two things...gtoc wrote:New to all this so I don't know the technical jargon but they said their server level PHP handler is LSPHP.
Your admin says installed with the message -
PHP Version: 5.4.32, Status: supported (PHP 5.4 or greater)
SAPI: litespeed, Status: unsupported (pagecache has not been tested with this SAPI)
Then when browsing site, no cache files are created. No errors also.
a) headers_list isn't supported in that SAPI. To test, create a test file, like test.php with this in it:
Code: Select all
<?php
header("X-Test: A test");
foreach (headers_list() as $header) {
print "header [$header]<br> \n";
}
?>
==or==
b) We don't have permission to write to the cache directory, or the method we're using to determine the cache directory doesn't work in your setup. To see if you can fix this, find this line within /youropencartdir/system/library/pagecache.com:
Code: Select all
$this->cachefolder=DIR_CACHE. 'pagecache/';
Code: Select all
$this->cachefolder='/var/www/some/long/path/to/a/directory/';
The exclude urls only works if whatever you're trying to exclude is a url. That could be a regular page, or something that loads via ajax. For example, product reviews load via ajax, with a url like this:Cue4cheap wrote:How do you exclude the featured module, that is shown on my home page (the built in module on 1.5.6)?
I tried '#home/featured#' but that didn't do it. Any thoughts?
Thank you,
Mike
Code: Select all
http://yourstore.com/index.php?route=product/product/review&product_id=6748
'#product/product/review#'
'#review&product_id#'
'#duct/review#'
Basically, it's just a pattern that matches part of the url.
I don't think that the featured module loads via ajax. Basically, if you do a "view source", and you can see the html for it, it's not loading via ajax...it's part of the page.
That would mean that there's no way to exclude it...the html of the "Featured Module" is within the page being cached.
New version...1.0.4.
Noteable things that have been changed in the last couple of updates
Noteable things that have been changed in the last couple of updates
- Added support for litespeed's sapi. ( required working around broken http_status_code() in litespeed )
- Support for wrapping the embedded cache info html comment with <!--[if IE]><![endif]-->. This is helpful if you have an html minifier (like Cloudflare's) stripping out the comment.
- Made the call to ob_end_flush() optional, and defaulted to off. It seems to create issues in some environments, and the performance benefit was minimal
- Deal with index.php files that have carriage returns in them better. Was forcing people to do manual installs in some cases.
budgetneon,
Would it be possible to have it just delete the expired cache files? I looked at the admin side and it said it had 1,xxx expired files. Seems like a bit of extra space that just should go away versus staying around if they are expired. (I deleted them without writing down the exact amount of files or the space it was taking).
Thank you,
Mike
Would it be possible to have it just delete the expired cache files? I looked at the admin side and it said it had 1,xxx expired files. Seems like a bit of extra space that just should go away versus staying around if they are expired. (I deleted them without writing down the exact amount of files or the space it was taking).
Thank you,
Mike
cue4cheap not cheap quality
Who is online
Users browsing this forum: No registered users and 54 guests