Jump to content

  • You cannot start a new topic
  • You cannot reply to this topic

Smartoptimizer Rate Topic   - - - - -

 
  • nathand
  • Senior Member
  • Members
  • Join Date: 21-Apr 10
  • 277 posts

Posted 21 May 2010 - 07:28 PM #1

I just installed Smartoptimizer and cant seem to get it working.


The server is Apache with mod_rewrite enabled.

before my site would lose all the CSS and JAVA files after 10 minutes of running..

Then I changed the HTACCESS file so the Smartoptimizer code was the first code on the file.

That seems to make the site normal, but now my admin section has no CSS or Java..


Please advice..

DirectoryIndex index.html index.php


<IfModule mod_expires.c>
<FilesMatch "\.(gif|jpg|jpeg|png|swf|css|js|html?|xml|txt)$">
ExpiresActive On
ExpiresDefault "access plus 10 years"
</FilesMatch>
</IfModule>
<IfModule mod_rewrite.c>
RewriteEngine On

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*\.(js|css))$ smartoptimizer/?$1

<IfModule mod_expires.c>
RewriteCond %{REQUEST_FILENAME} -f
RewriteRule ^(.*\.(js|css|html?|xml|txt))$ smartoptimizer/?$1
</IfModule>

<IfModule !mod_expires.c>
RewriteCond %{REQUEST_FILENAME} -f
RewriteRule ^(.*\.(gif|jpg|jpeg|png|swf|css|js|html?|xml|txt))$ smartoptimizer/?$1
</IfModule>
</IfModule>
<FilesMatch "\.(gif|jpg|jpeg|png|swf|css|js|html?|xml|txt)$">
FileETag none
</FilesMatch>




<IfModule mod_rewrite.c>
RewriteEngine on
# Some hostings require RewriteBase to be uncommented
# Example:
# Your store url is http://www.derbysmack.com/
# So "RewriteBase" should be:
# RewriteBase /
RewriteBase /
RewriteRule ^sitemap\.xml$ ./index.php?dispatch=xmlsitemap.view [L]
RewriteCond %{REQUEST_FILENAME} !\.(png|gif|ico|swf|jpe?g|js|css)$
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . index.php?sef_rewrite=1 [L,QSA]

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


 
  • Lee Li Pop
  • Senior Member
  • Members
  • Join Date: 07-Mar 08
  • 941 posts

Posted 22 May 2010 - 03:37 AM #2

Hello Nathand,

Try to clean your SO cache:

/smartoptimizer/cache


Lee Li Pop
.
If All Else Fails, Read The Instruction Manual! Knowledge Base 2.x + CS-Cart Instruction Manual

Hosted at Pair.com since 2000. Zero hacking attempts during first 11 years... And counting!

 
  • cheebs
  • Senior Member
  • Members
  • Join Date: 18-Dec 07
  • 142 posts

Posted 09 June 2010 - 09:50 PM #3

I'm having the same issue with smartoptimizer. It's perfect for the frontend, but it messes up css and javascript in the admin area.

Maybe we can disable css and js caching for the backend in the .htaccess file?

Anyone have any luck with this?

 
  • TexasGuy
  • Senior Member
  • Members
  • Join Date: 18-Mar 10
  • 546 posts

Posted 09 June 2010 - 11:47 PM #4

I installed it once, it really screwed my frontend, css and js was a mess. I was not sure if the program tried to re-write or move the CSS and JS around... :(


I had no time to mess with it later on.
PM me today for design/coding projects :P

 
  • cheebs
  • Senior Member
  • Members
  • Join Date: 18-Dec 07
  • 142 posts

Posted 10 June 2010 - 05:38 PM #5

Everything works fine for me until I try and add gzip lines in .htaccess along with smartoptimizer...

php_flag zlib.output_compression On
php_value zlib.output_compression_level 5

That's when it messes up my css and js. I'm also using zeke's sql lite caching system.

 
  • TexasGuy
  • Senior Member
  • Members
  • Join Date: 18-Mar 10
  • 546 posts

Posted 10 June 2010 - 09:37 PM #6

Is it possible it tries to apply zlib compression on top of zlib compression that is done by apache or php?
PM me today for design/coding projects :P

 
  • cheebs
  • Senior Member
  • Members
  • Join Date: 18-Dec 07
  • 142 posts

Posted 10 June 2010 - 09:58 PM #7

Well, in the smartoptimizer config file, there is this line:

//use this to set gzip compression On or Off
$settings['gzip'] = true;

But whenever I check to see if my site is sending out compressed content, it looks like it's not, at least without adding the php flags in my .htaccess (which seems to conflict)

 

Posted 25 June 2011 - 07:08 PM #8

on the robot it shows:

<b>Fatal error</b>: Unknown: Cannot use both zlib.output_compression and output_handler together!! in <b>Unknown</b> on line <b>0</b><br />

at the bottom. we just copied the htaccess file from smartopt. to default htaccess, bbut there is also another htaccess under smartopt. folder.
if we delete he htaccess under smartopt. folder then site shows without correct css.

if we put it it looks fine but it gives robot error.

any idea?
CS 4.3.9

 
  • Flow
  • Super Duper and Amazingly Sexy Senior
  • Members
  • Join Date: 13-Oct 10
  • 2351 posts

Posted 26 June 2011 - 09:19 AM #9

on the robot it shows:

<b>Fatal error</b>: Unknown: Cannot use both zlib.output_compression and output_handler together!! in <b>Unknown</b> on line <b>0</b><br />

at the bottom. we just copied the htaccess file from smartopt. to default htaccess, bbut there is also another htaccess under smartopt. folder.
if we delete he htaccess under smartopt. folder then site shows without correct css.

if we put it it looks fine but it gives robot error.

any idea?


Most configs should delete the .htaccess in the SO folder.

Please see http://forum.cs-cart...__1#entry113732 for a - I hope - easy guide on how to install SO properly.

When life hands you lemons, bring on the Tequila baby!


 

Posted 26 June 2011 - 02:53 PM #10

when we delete it, css brakes...strange.
CS 4.3.9

 
  • StellarBytes
  • Senior Member
  • Members
  • Join Date: 08-Aug 11
  • 1807 posts

Posted 29 January 2013 - 11:01 PM #11

Digging up an old thread, but nobody posted a solution. Just in case anybody comes across this issue again, as I just found out, here's how to fix it. Note, you do not need to apply these changes unless you receive the error:
Fatal error: Unknown: Cannot use both zlib.output_compression and output_handler together!! in Unknown on line 0
Open /smartoptimizer/.htaccess

Replace with:

php_flag zlib.output_compression Off
php_flag output_buffering Off

Hire StellarBytes for CS-Cart Design & Development Services