Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Faster Page Loads


Recommended Posts

Yes, it is mainly for the catalog side.

 

Be sure that you have the correct path and filename to the cache file in the catalog/includes/configuration_cache_read.php file.

 

It should be the same as in the admin/includes/configuration_cache_read.php file.

"Great spirits have always found violent opposition from mediocre minds. The latter cannot understand it when a man does not thoughtlessly submit to hereditary prejudices but honestly and courageously uses his intelligence." - A. Einstein

Link to comment
Share on other sites

  • 2 weeks later...
  • Replies 154
  • Created
  • Last Reply

Top Posters In This Topic

Nice work Jim !

 

Works very fine but I had to create a folder for the cache flat file. If you do not create a folder, then when updating the flat file after a admin configuration change, you can have an error like unlink..permission denied (but the file is written).

 

@All : Just create a folder with 777 permissions and everything goes fine !

 

Thanks for the contribution.

 

Didier.

Link to comment
Share on other sites

I installed the contribution per instructions, then went into the admin area and pressed update, then got these errors:

 

 

Parse error: parse error in /home/samszone/config_cache/config_cache.php(88) : eval()'d code on line 2

 

Warning: session_start(): Cannot send session cookie - headers already sent by (output started at /home/samszone/config_cache/config_cache.php(88) : eval()'d code:2) in /home/samszone/public_html/admin/includes/functions/sessions.php on line 67

 

Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /home/samszone/config_cache/config_cache.php(88) : eval()'d code:2) in /home/samszone/public_html/admin/includes/functions/sessions.php on line 67

Link to comment
Share on other sites

Is there a blank line in the config_cache.php file though?

 

Not an empty define (e.g. define('MAX_RECORDS', ''); ) but an actual blank line.

 

If so, I will need to modify the contribution to accomodate accordingly.

"Great spirits have always found violent opposition from mediocre minds. The latter cannot understand it when a man does not thoughtlessly submit to hereditary prejudices but honestly and courageously uses his intelligence." - A. Einstein

Link to comment
Share on other sites

Delete the file, disable compression, recreate the file, and try that.

 

Do not post your file to the forums.

"Great spirits have always found violent opposition from mediocre minds. The latter cannot understand it when a man does not thoughtlessly submit to hereditary prejudices but honestly and courageously uses his intelligence." - A. Einstein

Link to comment
Share on other sites

  • 3 weeks later...

Hi, am having a bit of trouble getting this contribution to work. My site loads rather slowly so I am hoping this will fix it!

 

The main problem is that the cache file is not being generated and I think it is because I have not created the folder in the right place and also prob have not put the right path. Can someone please explain exactly where this folder should go..my server is set up with folders such as httpdocs, httpsdocs, subdomains, statistics, private etc. Do I create at that level or some where else - as you can tell I am a little lost. I do know however how to set permissions! I tried adding a folder but it wouldn't let me!

 

My site is highly modified but I am not sure if this is causing the slow loading or not. My site is http://www.oakhillnailspa.com.au/catalog/index.php (not live yet)

 

Any help would be appreciated! Thanks!

Link to comment
Share on other sites

oakhill, create a cache (or whatever name you wish to use) folder at the same level as the httpdocs folder and give it 777 permissions.

 

Then set the appropriate path for the file (e.g. /home/httpd/vhosts/[domain]/cache/db_cache.php)

"Great spirits have always found violent opposition from mediocre minds. The latter cannot understand it when a man does not thoughtlessly submit to hereditary prejudices but honestly and courageously uses his intelligence." - A. Einstein

Link to comment
Share on other sites

  • 2 weeks later...

Short Q:

 

havent got a parent folder of my document root. So I cant "store the file outside of the webspace so that only someone with actual access to the server can access the file".

 

Is there a (safe) way to evade this?

Link to comment
Share on other sites

what is your document root path? no matter who's server you are on, there is no way you are in the 'root' . . . .

 

you can find this by going to your admin in oscommerce, then click on tools then server info, then search (use the edit/find) for document_root

Link to comment
Share on other sites

Hi John

 

Im not a 'nix-shark, but on most of the other webhotels i lodge at, I have access to a catalog one level up from my 'web-root' folder. Fx. like this:

 

/cgi-bin

/www

 

As I read the instructions I should preferably make a catalog at that level, so I would have:

 

/cgi-bin

/www

/cashe

 

Not having this I presume I should make it at

 

/www/cashe instead ?! - but that doesnt seem safe to me?!

Link to comment
Share on other sites

Hm - this is getting kind of cirkular :huh:

 

I know this would be the place to put it. But as mentioned above is the problem that I dont have acces to this level.

 

So I cant step up and out of the 'webarea' and therefore cant "store the file outside of the webspace so that only someone with actual access to the server can access the file" as it says in the readme.

 

So again: not being able to create a secured catalog one step up - Is there a (safe) way to evade this?

Link to comment
Share on other sites

Thanks Jim for the effort. I've been using the original version of the contrib. for a long time now and kind of stumbled onto your update today. Just wanted to mention that turning compression on (level 1) caused a dramatic increase in parse time (0.2 avg w/o compression 0.8 avg. w/ compression) Not sure if this is server-specific or what...

Do you ship UPS?

Give your customers order tracking without leaving your site. Track multi-package shipments. XML, cURL

 

Download the contribution here:

UPS Tracking

Link to comment
Share on other sites

cyberface, create a directory and password protect it with htaccess, and set the file permissions to 777, so that you can write to it.

 

else find your cgi-bin directory and put it there

Link to comment
Share on other sites

  • 3 weeks later...

I am having the same problem that others did.... Here is my problem...

 

* I installed this contrib fo MS2 (v1.31)

* I am on an IIS 6 server with PHP 5

* Tools>Server Info>doc_root "none defined"

* Websites are all installed off the "E:" Drive (4 different website folders)

* Cache Folder is "E:\store_cache"

* Cache File is "config_cache.txt"

* No errors are reported in oscommerce anywhere.

* File does not exist on C, D, or E drive (Have tested all)

* (Admin>)Includes>configuration_cache_read.php contains:

$config_cache_file = 'E:/shop_cache/config_cache.txt';

$config_cache_compress = 'false';

$config_cache_compression_level = 1;

 

Can anyone give me a hand?

Edited by Sysop
Link to comment
Share on other sites

I installed this contribute and there aren't any errors, but how do I know that it's working? Also, if I add other contributions later will I have to add them to the copy I had to make?

Link to comment
Share on other sites

I installed this contribute and there aren't any errors, but how do I know that it's working? Also, if I add other contributions later will I have to add them to the copy I had to make?

Look for the cache file. Change a value in it (something visible) and reload your shop. If you installed the contribution correctly, you should see the change even if you did not change the database values by the administration console.

 

Do not forget to reset the original value.

 

Didier.

Link to comment
Share on other sites

  • 1 month later...

I've installed the config cache for ms2 v1.31 and get an error when i do the update in my Admiin shop config.

Warning: fopen(home/julianp/config/config_cache.php): failed to open stream: No such file or directory in /home/julianp/public_html/admin/includes/configuration_cache.php on line 38

Warning: fwrite(): supplied argument is not a valid stream resource in /home/julianp/public_html/admin/includes/configuration_cache.php on line 39

Warning: fclose(): supplied argument is not a valid stream resource in /home/julianp/public_html/admin/includes/configuration_cache.php on line 40

Warning: Cannot modify header information - headers already sent by (output started at /home/julianp/public_html/admin/includes/configuration_cache.php:38) in /home/julianp/public_html/admin/includes/functions/general.php on line 18

 

I have created a config folder and put a config_cache.php in there, which i "think" is correct following the instructions. The folder and file have 777 permissions. I have edited the two config_cache_read files to suit this folder and file. Can anyone see from the errors what i may have done wrong?

In my Admin, i have set enable cache to true, and tried to edit the cache folder to use, this was /tmp/ it is now the above file. Whatever i do, i get the above error????

Any help appreciated, thanks

 

Julian

A little knowledge is dangerous, I SHOULD KNOW.

If Life Begins At 40, What ends????

Link to comment
Share on other sites

the cache option in Admin has nothing to do with this contribution. The contribution caches configuration database values while the Admin cache option turns on caching for whole pages in you site...

 

what exactly do you have $config_cache_file set to in the two configuration_cache_read.php files?

Do you ship UPS?

Give your customers order tracking without leaving your site. Track multi-package shipments. XML, cURL

 

Download the contribution here:

UPS Tracking

Link to comment
Share on other sites

  • 1 month later...

I tested my load speeds with a few sites prior to installing this contribution and most came up with around 62 seconds. After installing, I get almost the same thing. The cache file is being written to and I can improve the load times somewhat (0.5 sec) by playing with the compression but I'm not seeing the big change I expected after reading this thread. Any ideas as to why? What site/tool is being used to measure the parse time? Maybe that is my problem.

 

Jack

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

I was simply using the Display Page Parse Time in Admin > Logging to give me an idea of how fast the pages were loading...I'm sure there are more accurate tools available though...

Do you ship UPS?

Give your customers order tracking without leaving your site. Track multi-package shipments. XML, cURL

 

Download the contribution here:

UPS Tracking

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...