Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Faster Page Loads


Recommended Posts

Thank you so much !

 

Yeah i know i forgot to write which file the line should be replaced, in the description at the contribution download page. But didn't wanted to add another "file" just to tell that!

 

/Philip ;)

Link to comment
Share on other sites

  • Replies 154
  • Created
  • Last Reply

Top Posters In This Topic

  • 1 month later...

Hi

 

i have installed this contribution and all is working as far as i can see.

 

apart from i dont get any shipping options at the checkout.

 

has any one had this problem, i so how was it solved.

 

Thanks If any one can help.

Link to comment
Share on other sites

  • 2 months later...

I've tried this mod but it's provided no improvement in speed & the admin side is messed up. There's no config_cache.php file being created plus I get the following warnings

 

Warning: session_start(): open(SESSION_WRITE_DIRECTORY/sess_0807ee5733730bdf81a3c6a1305401af, O_RDWR) failed: No such file or directory (2) in /home/delightf/public_html/catalog/admin/includes/functions/sessions.php on line 67

 

Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /home/delightf/public_html/catalog/admin/includes/functions/sessions.php:67) in /home/delightf/public_html/catalog/admin/includes/functions/sessions.php on line 67

 

These are at the top & just below I get a red band with

 

Error: There is currently no default currency set. Please set one at: Administration Tool->Localization->Currencies

ERROR_NO_DEFAULT_LANGUAGE_DEFINED

Error: Cache directory does not exist. Please set this Configuration->Cache.

then below the admin screen I get

 

Warning: Unknown(): open(SESSION_WRITE_DIRECTORY/sess_0807ee5733730bdf81a3c6a1305401af, O_RDWR) failed: No such file or directory (2) in Unknown on line 0

 

Warning: Unknown(): Failed to write session data (files). Please verify that the current setting of session.save_path is correct (SESSION_WRITE_DIRECTORY) in Unknown on line 0

 

I've tried reading & re-reading the instructions & as far as I can tell I've got it installed correctly & the right file path is set in the configuration_cache_read.php files (currently "/home/delightf/public_html/cache/config_cache/config_cache.php)

 

These errors disapear when I remove the config cache mod. I've seen similar messages posted in the past & it all seems to be about setting the right file path for config_cache.php, but I've tried everthing know. BTW is it RIGHT that a cache file should be given the "php" extension? Shouldn't it be different from actual PHP files?

 

Any help would be greatl appreciated.

 

Thanks.

 

Mike

Link to comment
Share on other sites

Hi Mike,

I hope your already solved your problem

I've installed this contribution as you suggested and I'm get an error when I do the update in my Admin - config - My store.

Warning: fopen(/home/okqppyt/public_html/config_cache/) [function.fopen]: failed to open stream: Permission denied in /home/okqppyt/public_html/catalog/admin/includes/configuration_cache.php on line 38

 

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

 

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

 

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

 

In catalog/admin/includes/configuration_cache.php I have:

on line 38: $fp = fopen($config_cache_file , 'w');

on line 39: $fout = fwrite($fp , $config_cache_output);

on line 40: fclose($fp);

 

In catalog/admin/includes/functions/general.php on line 22 I have:

header('Location: ' . $url);

 

I don't know what to do so, any help would be appreciated.

 

Thanks.

Link to comment
Share on other sites

Hi Mike,

I hope your already solved your problem

I've installed this contribution as you suggested and I'm get an error when I do the update in my Admin - config - My store.

In catalog/admin/includes/configuration_cache.php I have:

on line 38: $fp = fopen($config_cache_file , 'w');

on line 39: $fout = fwrite($fp , $config_cache_output);

on line 40: fclose($fp);

 

In catalog/admin/includes/functions/general.php on line 22 I have:

header('Location: ' . $url);

 

I don't know what to do so, any help would be appreciated.

 

Thanks.

 

This is due to one of several things. First the setup of te contribution isn't right. The two "configuration_cache_read.php" files have a path that needs to be set up EXACTLY the same, ie., home/mysite/cache/config_cach.php.

 

Next you need the right user privelidges on the folder wit the cache file to be written to, I ue 777 or 755. I've found that one one server I had to make sure twice hat it was set to allow access to the software.

 

Finally there's so many webserver setups its easy to get the path wrong. My cache file sits in a folder that is right along side public_html, so my pat to the cache file is as shown above, home/mysite/cache/config_cache.php.

 

I got the same errors as you showed, this was because I had entered the path incorrectly & once rectified it was fine & certainly speeds te site up a useful amount.

Link to comment
Share on other sites

Hey Mike,

Thanks for your answer.

I believe My problem is the wrong path, I tried in different ways and nothing works.

My config_cache is at the same level as public_html; public_ftp and other files, so, the path I included in the two "configuration_cache_read.php" files is: /home/okqppyt/public_html/config_cache/

I tried different ways and always I have an error.

The site is very slow«Current Parse Time: 2.005 s with 71 queries» and I really need to make it faster but I don't know what to do and I'm planning to give up

 

Great if you could help me

Link to comment
Share on other sites

Hey,

I just instaled the contribution, the cache file is created and I think everything is working correctly but my queries count and page parse times is the same .

 

Any idea what I'm missing?

Link to comment
Share on other sites

That would place a file named temp.txt in the /config_cache folder, at the root of your server.

 

The best thing to do is find out your home directory (ask your host if you are unsure).

 

Then use an ftp client without specifying a remote directory and you should be in your home directory Create a folder (e.g. cache) to store the cache file and gove it 777 permissions.

 

So if your home directory is /usr/home/fred, you would enter /usr/home/fred/cache/config_cache.php as the $config_cache_file in both of the configuration_cache_read.php files.

 

Does that help?

 

 

Perhaps I don't understand this... I have not experienced any form of speed increase... I've created a file folder (not in home directory but that doesn't matter I was going to change it afte rI saw it work) called /config/ but let me ask - does the file config_cache.php get created or do I have to? I'm not quite sure what to do here so any help would be great!

Link to comment
Share on other sites

Perhaps I don't understand this... I have not experienced any form of speed increase...

That is not that strange, because from the description of the contribution I understand it just caches one single query: the one that gets the configuration variables of your shop. Your shop could have hundreds of queries....

Link to comment
Share on other sites

  • 4 weeks later...

Re. the Faster Page Loads Contribution

 

I just updated my Mac notebook to PHP 5 and did the PHP 5 updates (basically doing the fix to turn Register Globals off, fixing <? rather than <?php and doing the HTTP_ fixes). After doing this, my Admin side worked, but the catalog side didn't.

 

I finally tracked the problem down to this contrib. With the contrib installed, I got a blank page in Firefox and a bad server response" (NSURLErrorDomain: -1011) in Safari (IE 5 still worked - go figure). I removed this contrib from catalog/includes/application_top.php and all is well again (I didn't adjust the admin side since it was still working).

 

I think that it did save a little time doing page loads, so it would be nice to get it going again. But, I don't have a clue about the global variable stuff and why configuration cache would work on the admin side and not on the catalog side.

 

So, for all of you moving to PHP 5 (it seems to be inevitable) watch out for this one.

 

Tony

Link to comment
Share on other sites

  • 1 month later...
my Admin side worked, but the catalog side didn't.

 

I have the same problem... :(

 

The two $config_cache_file have the same configuration but Admin worked and catalog didn't.... solution???

 

Please.... :huh: and sorry for my english :blush:

Link to comment
Share on other sites

I have the same problem... :(

 

The two $config_cache_file have the same configuration but Admin worked and catalog didn't.... solution???

Try the Optimize categories box and the Optimize tep_get_tax_rate() method contributions and you will cut down a lot more on your page load time.

Link to comment
Share on other sites

  • 5 months later...
  • 2 months later...
  • 2 weeks later...
While fooling around i found that the modules.php could insert a row in the configurations table

with an empty configuration_key, resulting in the cache function inserted;

 

define('', '');

 

Thus the cached config file got currupted and issuing an error both in catalog and admin.

 

To handle this and to secure other contribs don't imply this error, please replace following line in admin/includes/configuration_cache.php;

 

$configuration_query = tep_db_query('select configuration_key as cfgKey, configuration_value as cfgValue from ' . TABLE_CONFIGURATION);

 

 

With;

 

$configuration_query = tep_db_query("select configuration_key as cfgKey, configuration_value as cfgValue from " . TABLE_CONFIGURATION . " where configuration_key != ''");

 

The file to download is just a dummy textfile, containing this text. No more no less.

 

I downloaded this contribution and installed it on osCommerce 2.2 RC2a I could not apply your patch as I could now matter what part of your search code I tried to find to locate the code in module.php I could not find it.

 

So as for 2.2 RC2a everything seems to be working fine. I went from 22.14 second page load to 12.36 second page load.

 

Now my next mission is shrinking down images and working on infobox calls for images to trans_pixels to cut down on HTML calls.

 

Leon

Link to comment
Share on other sites

I downloaded this contribution and installed it on osCommerce 2.2 RC2a I could not apply your patch as I could now matter what part of your search code I tried to find to locate the code in module.php I could not find it.

 

So as for 2.2 RC2a everything seems to be working fine. I went from 22.14 second page load to 12.36 second page load.

 

Now my next mission is shrinking down images and working on infobox calls for images to trans_pixels to cut down on HTML calls.

 

Leon

 

Found it... Looking in the wrong place.

 

Do I need to clear the where the cache info was being stored or will this just prevent it from being foo barred in the future?

 

Leon

Link to comment
Share on other sites

The one problem I have found with this contribution which searching this thread for which I have not found a solution for is for instance when you update your payment sort order for say your 4 payments options it does not update the main screen view.

 

You have to go back to configuration click edit then update and then go back to modules to payments then you can see the changes.

 

Did I miss something in this thread that talked about this?

 

Leon

Link to comment
Share on other sites

  • 4 months later...

I installed this and it created the cache file and seems to be working, except I don't see any speed up? I run a program that checks if my site is up and running, during which it also reports the speed. But it looks about the same. Anybody have any ideas why?

Link to comment
Share on other sites

I installed this and it created the cache file and seems to be working, except I don't see any speed up? I run a program that checks if my site is up and running, during which it also reports the speed. But it looks about the same. Anybody have any ideas why?

Because it only speeds up one single query (which is not really a slow query anyway) whereas you might have hundreds of queries for each page load. See Optimize categories box and Optimize tep_get_tax_rate() method, See A Store Speed Optimization in Progress, Step by step from a vanilla install! for more information.

Link to comment
Share on other sites

  • 10 months later...

session errors in functions, cache errors in functions, errors with headers already sent

//////////////////////////////////////////////////////////////////////////////////////////////////////////////

followed instructions exactly and got many errors, also noticed others were getting same errors

//////////////////////////////////////////////////////////////////////////////////////////////////////////////

don't know if this is it but the values in the configuration_group and configuration tables were not created

the only sql attached was to uninstall these values

delete from configuration_group where configuration_group_title = 'Configuration Cache';
delete from configuration where configuration_key like 'CONFIG_CACHE_%';
optimize table configuration;

Link to comment
Share on other sites

  • 1 year later...
  • 2 months later...

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