Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Page cache by Chemo


100asa

Recommended Posts

Well, i've got same problems with this <osCsid> at the links....

 

Maybe i have to tell what else has been installed and could be reason for this

1. Months ago i did some changes to the Session-system. One should remove those ?oscsid=12342345 from alle links so a customers never sees this... don't know the name but found somewhere around here. Well maybe i even tried around with some more of these spider-session-killers....

2. Ultimate SEO by Chemo is also installed and because of this i DO NOT HAVE anything of the code that should be in html_output.php

The whole href_link_function just consist of 3 lines made by exactly this Ultimate SEO Contrib... so what should i replace?

 

I think my store is not usable for customers that dont allow cookies. bad, i know. if i could i would reset this as soon as possible but i don't know how!?

 

but i also just like to use this cache also. it made my shop so much faster. pages came down from already optimized 53 queries to 11 and so on...

 

Would be nice if there would be a solution soon!

 

THANKS

Edited by Sir.K.O.
Link to comment
Share on other sites

  • 5 months later...
  • Replies 91
  • Created
  • Last Reply

Top Posters In This Topic

i suspect this isn't an urgent bug, but i notice this all of the time in my error_log file... i've never experienced any lack of performance on my website EVER, because of page cache. just curious as to what's causing this:

 

[10-Aug-2007 12:40:03] PHP Warning: filemtime() [<a href='function.filemtime'>function.filemtime</a>]: Stat failed for /home/**/public_html/admin/_product_info.php_products_id=Product_ID_HERE_english_USD.cache (errno=2 - No such file or directory) in /home/**/public_html/includes/classes/page_cache.php on line 330

 

 

is this occuring because this is a NEW item (so naturally, the thumbnail won't yet exist)?

Link to comment
Share on other sites

I have all the items by Chemo working but Page Cache keeps caching the same index page it starts with as well as the same products_info page it starts with no matter what item you click on.

 

When you disable it in admin everything goes back to normal. So I deleted the (2) cache files and then clicked on a new but different product page and index type page and same - stuck on these 2 intital pages.

 

So it is caching the first page nicely but will not re-cahe new pages.

 

Can you help me?

 

THANKS

Link to comment
Share on other sites

I installed your page cache contribution and I am also using STS. I get this error when I turn on page cache..

 

 

Fatal error: Call to a member function count_contents() on a non-object in /home/ckcollec/public_html/includes/sts_user_code.php on line 64

 

This is my line 64

 

$productno = $cart->count_contents();

 

Any ideas? I think it is where I have my cart showing in column_right1.php As soon as I turn page cache off, store works fine.

Link to comment
Share on other sites

  • 3 weeks later...

I'm using Chemos Ultimate SEO URLS so my html_output.php file looks different & I get stuck at step 6. The instructions say:

 

STEP 6 - Edit includes/functions/html_output.php

Find this code in tep_href_link():

 

And REPLACE it with this code:

 

global $request_type, $session_started;

 

Find this code in tep_href_link():

 

if (isset($_sid)) {

$link .= $separator . $_sid;

}

 

And REPLACE it with this code:

 

if (!tep_session_is_registered('customer_id') && ENABLE_PAGE_CACHE == 'true' && class_exists('page_cache')) {

$link .= $separator . '<osCsid>';

} elseif (isset($_sid)) {

$link .= $separator . $_sid;

}

 

Howevever my html_output.php file has a tep_href_link(); that looks like this.

 

// Ultimate SEO URLs v2.1
// The HTML href link wrapper function
 function tep_href_link($page = '', $parameters = '', $connection = 'NONSSL', $add_session_id = true, $search_engine_safe = true) {
global $seo_urls;		
	if ( !is_object($seo_urls) ){
		if ( !class_exists('SEO_URL') ){
			include_once(DIR_WS_CLASSES . 'seo.class.php');
		}
		global $languages_id;
		$seo_urls = new SEO_URL($languages_id);
	}
return $seo_urls->href_link($page, $parameters, $connection, $add_session_id);
 }

 

Does anypone have any sugestions?

Link to comment
Share on other sites

  • 4 months later...
Hi Chemo and others

 

unfortunatly i get this error

 

Fatal error: Cannot instantiate non-existent class: infoboxheading in /home/XXXX/public_html/shop/includes/boxes/shopping_cart.php on line 20

i have AutoTheme installed, and im expecting it to conflict with each other.

have anyone got a solution to this ?

 

I'm sorry but i have the same problem but i don't undestand the solution..... can you help me?

:'(

Link to comment
Share on other sites

  • 2 months later...

I am getting the following Warnings using osCommerce RC2a

 

Warning: fopen....................cache/_index.php_english_USD.cache) [function.fopen]: failed to open stream: No such file or directory in xxxxxxxxxxxxxxxxincludes/classes/page_cache.php on line 262

 

Warning: fwrite(): supplied argument is not a valid stream resource in /xxxxxxxxxxxxxxxx/includes/classes/page_cache.php on line 263

 

Warning: fclose(): supplied argument is not a valid stream resource in xxxxxxxxxxxxx/includes/classes/page_cache.php on line 264

 

...not sure what to do...

 

...plus problems with step six as I'm using ultimate URLs

Link to comment
Share on other sites

If i can't get this contribution to work, how would I remove this contribution's SQL statements from my database?

 

INSERT INTO `configuration_group` ( `configuration_group_id` , `configuration_group_title` , `configuration_group_description` , `sort_order` , `visible` ) VALUES ( '26229', 'Page Cache Settings', 'Settings for the page cache contribution', '20', '1' );
INSERT INTO `configuration` ( `configuration_id` , `configuration_title` , `configuration_key` , `configuration_value` , `configuration_description` , `configuration_group_id` , `sort_order` , `last_modified` , `date_added` , `use_function` , `set_function` ) VALUES ( '', 'Enable Page Cache', 'ENABLE_PAGE_CACHE', 'false', 'Enable the page cache features to reduce server load and faster page renders?<br><br>Contribution by: <b>Chemo</b>', '26229', '1', NULL , '0000-00-00 00:00:00', NULL , 'tep_cfg_select_option(array(''true'', ''false''),' );
INSERT INTO `configuration` ( `configuration_id` , `configuration_title` , `configuration_key` , `configuration_value` , `configuration_description` , `configuration_group_id` , `sort_order` , `last_modified` , `date_added` , `use_function` , `set_function` ) VALUES ( '', 'Cache Lifetime', 'PAGE_CACHE_LIFETIME', '5', 'How long to cache the pages (in minutes) ?<br><br>Contribution by: <b>Chemo</b>', '26229', '2', NULL , '0000-00-00 00:00:00', NULL , NULL );
INSERT INTO `configuration` ( `configuration_id` , `configuration_title` , `configuration_key` , `configuration_value` , `configuration_description` , `configuration_group_id` , `sort_order` , `last_modified` , `date_added` , `use_function` , `set_function` ) VALUES ( '', 'Turn on Debug Mode?', 'PAGE_CACHE_DEBUG_MODE', 'false', 'Turn on the global debug output (located at the footer) ? This affects ALL browsers and is NOT for live shops!  YOu can turn on debug mode JUST for your browser by adding "?debug=1" to your URL.<br><br>Contribution by: <b>Chemo</b>', '26229', '3' , NULL , '0000-00-00 00:00:00', NULL , 'tep_cfg_select_option(array(''true'', ''false''),' );
INSERT INTO `configuration` ( `configuration_id` , `configuration_title` , `configuration_key` , `configuration_value` , `configuration_description` , `configuration_group_id` , `sort_order` , `last_modified` , `date_added` , `use_function` , `set_function` ) VALUES ( '', 'Disable URL Parameters?', 'PAGE_CACHE_DISABLE_PARAMETERS', 'false', 'In some cases (such as search engine safe URL''s) or large number of affiliate referrals will cause excessive page writing.<br><br>Contribution by: <b>Chemo</b>', '26229', '4', NULL , '0000-00-00 00:00:00', NULL , 'tep_cfg_select_option(array(''true'', ''false''),' );
INSERT INTO `configuration` ( `configuration_id` , `configuration_title` , `configuration_key` , `configuration_value` , `configuration_description` , `configuration_group_id` , `sort_order` , `last_modified` , `date_added` , `use_function` , `set_function` ) VALUES ( '', 'Delete Cache Files?', 'PAGE_CACHE_DELETE_FILES', 'false', 'If set to true the next catalog page request will delete all the cache files and then reset this value to false again.<br><br>Contribution by: <b>Chemo</b>', '26229', '5', NULL , '0000-00-00 00:00:00', NULL , 'tep_cfg_select_option(array(''true'', ''false''),' );
INSERT INTO `configuration` ( `configuration_id` , `configuration_title` , `configuration_key` , `configuration_value` , `configuration_description` , `configuration_group_id` , `sort_order` , `last_modified` , `date_added` , `use_function` , `set_function` ) VALUES ( '', 'Config Cache Update File?', 'PAGE_CACHE_UPDATE_CONFIG_FILES', 'none', 'If you have a configuration cache contribution enter the FULL path to the update file.<br><br>Contribution by: <b>Chemo</b>', '26229', '6', NULL , '0000-00-00 00:00:00', NULL , NULL );

Edited by adam777
Link to comment
Share on other sites

I just worked it out.

 

Goto phpMyAdmin -> select data base -> select item from left of page -> browse -> look for comments that mention "PAGE CACHE" -> press delete

 

Please correct me if I'm wrong as I am new to databases & programming

 

Thanks

 

Adam

Link to comment
Share on other sites

  • 2 weeks later...

I've got a weird problem with this contribution, when I enable it, every page shows the first page that was cached!

So for example if I go to admin and delete the cache files then go to the shop and refresh the contact page every page that you try to view comes up as the contact page! (For example the front page)

I've gone through the code many, many times, and I can't find anything wrong!

 

Has anyone seen this with this contribution before?

 

I'm running Version MS2 if that makes any difference.

 

Cheers, Mat

Link to comment
Share on other sites

<span style='color:red'>Orders getting posted under wrong customer. </span>

 

I have a site that is supporting about 16.6 million hits & 2.4 million page views per month, so at times the server was getting a little taxed. Anyhow, we installed Page_Cache 1.3 in dec of 2004. Everything was working great. On Jan 15 of 2005, we upgraded to 1.4, and everything seemed OK, but we have found 3 orders got placed under the wrong customer. The shipping address & billing address are the correct customer, but the customer is a different customer. We have not made *ANY* other changes to the system since the upgrade other than adding an additional processor & another gig of ram.

<span style='color:blue'>Has anybody else noticed the problem?

Anybody know of any thing to try?</span>

 

We are really under the gun, because the site takes several 100 orders per day, so we cannot let this go on.

Thanks!

 

 

I'm having the same problem. Osc 2.1 Correct Billing & Shipping...wrong customer name, address, & email

 

PLEASE HELP!

Link to comment
Share on other sites

  • 6 months later...
Hello,

 

Has anyone had the problem of a trailing ?<osCsid> in his URLs, when enabling page cache i mean. cache directory is empty too...

Did enyone else get a <%CART_CACHE%> instead of the normal shopping_cart box ?

My URLs look like: http://www.example.com/catalog/accesorii-f...ml?%3CosCsid%3E :((

 

if (!tep_session_is_registered('customer_id') && ENABLE_PAGE_CACHE ==

'true' && class_exists('page_cache') ) {

echo "<%CART_CACHE%>";

} else {

require(DIR_WS_BOXES . 'shopping_cart.php');

}

 

unfortunately really echoes that in the page...

 

Anyone ? :(

 

 

 

Guys,

 

I've got exactly the same problem with <osCsid> in my URLs, when enabling page cache in admin. In addition cache directory is empty too..

Also I've got an issue with <%CART_CACHE%> i.e. this message is visible in Firefox instead of the normal shopping_cart box ?

Can anyone help me to sort out above described issues?

 

 

Do I need to install this contribution: http://www.oscommerce.com/community/contributions,1862 before installation of "Page cache by Chemo"?????

Is it required?

 

Cheers

Edited by Jan Zonjee
Link to comment
Share on other sites

  • 1 month later...

Hi all !

There is an problem with PageCache of Chemo - a great contribution i ever see ! There is: when active page cache, the counter of banners does not work at the pages had been cached !

 

How to solve it !?

Paint for VietNamese :

Link to comment
Share on other sites

  • 1 month later...
  • 1 year later...

I'm using Chemos Ultimate SEO URLS so my html_output.php file looks different & I get stuck at step 6. The instructions say:

 

STEP 6 - Edit includes/functions/html_output.php

Find this code in tep_href_link():

 

And REPLACE it with this code:

 

global $request_type, $session_started;

 

Find this code in tep_href_link():

 

if (isset($_sid)) {

$link .= $separator . $_sid;

}

 

And REPLACE it with this code:

 

if (!tep_session_is_registered('customer_id') && ENABLE_PAGE_CACHE == 'true' && class_exists('page_cache')) {

$link .= $separator . '<osCsid>';

} elseif (isset($_sid)) {

$link .= $separator . $_sid;

}

 

Howevever my html_output.php file has a tep_href_link(); that looks like this.

 

// Ultimate SEO URLs v2.1
// The HTML href link wrapper function
 function tep_href_link($page = '', $parameters = '', $connection = 'NONSSL', $add_session_id = true, $search_engine_safe = true) {
global $seo_urls;		
	if ( !is_object($seo_urls) ){
		if ( !class_exists('SEO_URL') ){
			include_once(DIR_WS_CLASSES . 'seo.class.php');
		}
		global $languages_id;
		$seo_urls = new SEO_URL($languages_id);
	}
return $seo_urls->href_link($page, $parameters, $connection, $add_session_id);
 }

 

Does anypone have any sugestions?

I have the same doubt! Can some one give the directions to make this change?

thanks a lot

Link to comment
Share on other sites

I find this treat say that the two contributions are complementary, so, I suppose, don't need to change the html_output.php file. I jump this step, simply. If it's not correct, please write me.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...