Jump to content
Sign in to follow this  
basilfawlty

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 ;)

Share this post


Link to post
Share on other sites

I really meant to thank you for your contribution , it bothered me for a long time and I couldn't find the source of it.

Sorry for awkward quoting.

 

Miclosh

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
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.

Share this post


Link to post
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.

Share this post


Link to post
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

Share this post


Link to post
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?

Share this post


Link to post
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!

Share this post


Link to post
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....

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites
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:

Share this post


Link to post
Share on other sites
Create a folder (e.g. cache) to store the cache file and give it 777 permissions.

 

I don't understand why it needs to be 777.

 

Surely everyone except Owner is only going to read it?

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
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

Share this post


Link to post
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

Share this post


Link to post
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?

Share this post


Link to post
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.

Share this post


Link to post
Share on other sites

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;

Share this post


Link to post
Share on other sites

Hello.

 

Is it possible to encode the images thumbnails to base64_encode to speed up they rendering?

 

So that the browsers will decode them ?

 

Thanks

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×