Fast V3.0.6 Shop --> FastCGI, APC Cache and some tweaks

Hi, I got a cheap VM3 VPS server ($39.95/month) from Future Hosting about 1 week ago. After initial install, was very unhappy about very slow speed of cart. Some times page loads were above 20 seconds! Did some optimization, and now it is between 1 to 2 seconds. The people at Future Hosting were GREAT, and helped heaps. I had them reconfigure my PHP server for FastCGI (fcgi), and enable APC Caching (128M shared memory). All seems to work great, even though I have seen some conflicting reports of APC not always working.

I am using V3.0.6 Ultimate. The site is not done yet, but current version is

I did following:

  1. Got VM3 VPS hosting plan from Future Hosting at $39.95/month

  2. Asked them to install FastCGI and APC cache

  3. Optimized .htaccess file as suggested by this post , but without SmartOptimizer (I use APC). See below for contents of my .htaccess file.

  4. Set memory in config.local.php to 256M, following line in file:

@ini_set('memory_limit', '256M');

5) Did following “Tweaks” in config.local.php file:

$config['tweaks'] = array (
'js_compression' => true, // enables compession to reduce size of javascript files
'check_templates' => false, // disables templates checking to improve template engine speed
'inline_compilation' => true, // compiles nested templates in one file
'anti_csrf' => false, // protect forms from CSRF attacks
'disable_block_cache' => true, // used to disable block cache
'join_css' => true, // is used to unite css files into one file
'allow_php_in_templates' => false, // Allow to use {php} tags in templates
'disable_localizations' => true, // Disable Localizations functionality
'disable_google_base' => true, //Disable obsolete google base functionality

6) Set cache_backend in config.local.php to sqlite, following line in file:

$config['cache_backend'] = 'sqlite';

7) To get CS Cart to work on the Future Hosting VPS plan, I had to do following in “PHP Configuration Editor” in WHM:[list]

[]removed “ini_set, phpinfo” from “disabled functions”

]Turned “output_buffering” on


After Future Hosting configured my server for FastCGI, I had to configure PHP Handler. In WHM, go to “Service Configuration”, “Configure PHP and suEXEC” and set PHP handler to FCGI

9) I am in the process of getting SSL for multiple CS Cart ultimate shops. Is very easy after I figured out how to do it. Basically install CS-Cart Ultimate on one CPanel account (main account). Create an CPanel account for all other CS-Cart Ultimate shops. Request dedicated IP for each CPanel shop. Create a virtual host configuration file for each CPanel account (except main one) with “[size=3]DocumentRoot[/size]” set to point to main CPanel [size=3]public_html [/size]folder. Next, install SSL for each CPanel account.

========== .htaccess file ==========


DirectoryIndex index.html index.php

RewriteEngine on

RewriteBase /

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . index.php?sef_rewrite=1 [L,QSA]

ExpiresActive On

ExpiresDefault “access plus 10 years”

Header append Vary User-Agent

Header set Vary: Accept-Encoding

Header append Cache-Control “public”

Header unset ETag

FileETag None

Header append Cache-Control “max-age=31449600 public”

Header unset ETag

FileETag None

Turn on Expires and set default to 0

ExpiresActive On

ExpiresDefault “access plus 10 years”

ExpiresByType text/css A315360000

ExpiresDefault “access plus 10 years”

ExpiresByType text/javascript A315360000

ExpiresByType application/javascript A315360000

ExpiresByType application/x-javascript A315360000

ExpiresByType text/x-js A315360000

ExpiresByType text/ecmascript A315360000

ExpiresByType application/ecmascript A315360000

ExpiresByType text/vbscript A315360000

ExpiresByType text/fluffscript A315360000

ExpiresDefault “access plus 11 months”

ExpiresDefault “access plus 10 years”

ExpiresByType application/x-font-opentype A315360000

ExpiresByType application/x-font-truetype A315360000

ExpiresByType application/x-font-ttf A315360000

ExpiresByType application/x-font A315360000

ExpiresByType font/opentype A315360000

ExpiresByType font/otf A315360000

ExpiresByType application/vnd.oasis.opendocument.formula-template A315360000

ExpiresByType image/svg+xml A315360000

ExpiresByType application/ A315360000

ExpiresByType font/woff A315360000

ExpiresDefault “access plus 10 years”

ExpiresByType video/x-flv A315360000

ExpiresByType video/x-ms-wmv A315360000

ExpiresByType video/x-ms-asf A315360000

ExpiresByType video/x-ms-asx A315360000

ExpiresByType video/x-ms-wma A315360000

ExpiresByType video/x-ms-wax A315360000

ExpiresByType video/x-ms-wmx A315360000

ExpiresByType video/x-ms-wm A315360000

ExpiresDefault “access plus 10 years”

ExpiresByType application/x-shockwave-flash A315360000

ExpiresByType application/pdf A315360000

ExpiresActive On

ExpiresDefault “access plus 1 year”

Header append Cache-Control “public”

Header unset Last-Modified

SetOutputFilter DEFLATE


Why would you disable your block_cache ?

[quote]Why would you disable your block_cache ?[/quote]

Good question? I mainly wanted to give information and get comments about using CS Cart with FastCGI and APC. Regarding disable_block_cache, I copied recommendations from other posts, specifically this one:

[url=“Speed Up and Optimise CS-Cart Version 3 - General Questions - CS-Cart Community Forums”]Speed Up and Optimise CS-Cart Version 3 - General Questions - CS-Cart Community Forums

They all seem to have block cache disabled. Not sure why. Will try with it turned on, and see if all still works.