-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Failed to update your /.htaccess file automatically. #633
Comments
@CotswoldPhoto Thanks for the report! Hmm, the latest release changes the
Are those the "random characters" that you saw? Would you be able to share a copy of your Also, can I ask how you updated to the RC? Did you deactivate + delete the previous version, then add the RC via Plugins → Add New → Upload Plugin? Or did you do something else, like just overwrite the existing plugin folder on the server? |
The WmVuQ2FjaGU was what was on a separate line. It has happened on one site so far. This is the htaccess file as I found it: BEGIN ZenCacheEND ZenCacheWmVuQ2FjaGU order allow,deny deny from allPrevent folder browsingOptions All -Indexes # Enable expirations ExpiresActive On # Default directive ExpiresDefault "access plus 1 month" # My favicon ExpiresByType image/x-icon "access plus 1 year" # Images ExpiresByType image/gif "access plus 1 month" ExpiresByType image/png "access plus 1 month" ExpiresByType image/jpg "access plus 1 month" ExpiresByType image/jpeg "access plus 1 month" # CSS ExpiresByType text/css "access 1 month" # Javascript ExpiresByType application/javascript "access plus 1 year" AddOutputFilterByType DEFLATE text/plain text/html AddOutputFilterByType DEFLATE text/xml application/xml application/xhtml+xml application/xml-dtd AddOutputFilterByType DEFLATE application/rdf+xml application/rss+xml application/atom+xml image/svg+xml AddOutputFilterByType DEFLATE text/css text/javascript application/javascript application/x-javascript AddOutputFilterByType DEFLATE font/otf font/opentype application/font-otf application/x-font-otf AddOutputFilterByType DEFLATE font/ttf font/truetype application/font-ttf application/x-font-ttfBEGIN WordPressRewriteEngine On RewriteBase / RewriteRule ^index.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L]END WordPressBEGIN MainWPEND MainWP |
I shared the .htaccess on github. The first time I overwrote the plugin On Wed, Dec 16, 2015 at 7:56 PM, Raam Dev notifications@github.com wrote:
|
@CotswoldPhoto Thank you. I will try to reproduce this. Two more quick questions: What version of PHP are you running and what web server are you running? |
Centos7.1 with Apache/2.4.16 (Unix) OpenSSL/1.0.1e-fips mod_bwlimited/1.4 PHP/5.6.16, using the cPanel/WHM Easyapache 3 stack. |
@raamdev I was able to reproduce a portion of this. As requested, I ran the following test...
There is a minor problem in this test. Whenever I toggled Static CDN Filters off in v151114 and saved options (with ZC still enabled), I ended up with: https://gist.github.com/jaswsinc/f795b76f42fda25529b7
That problem is resolved by the VS upgrade routine in 151216-RC via this file. However, when I was testing and I....
The VS upgrade did not run. It looks like that happened because of all of my testing though; i.e., the version in my array of options was higher than the version of the software I was actually running. Still trying to verify that. What resulted from this:
I have been unable to reproduce this though:
That almost looks to me like there was some corruption in the file before ZC tried to work on it. Perhaps we can avoid further corrupting a file like this by running the contents of the |
So I propose two small changes:
|
I tested the install on 2 sites: Installed ZenCache RC151216 via FTP on one site where it had never previously been installed. I then enabled HTML compression (all options set to "Yes") and saved the settings. No error messages. Checked I then installed ZenCache RC151216 on a site where ZenCache had previously been installed. I first deactivated and deleted the existing ZenCache installation and then installed the RC using the Add New Plugin panel. I then enabled HTML compression (all options set to "Yes") and saved the settings. No error messages. When I checked the
|
@patdumond writes...
Enabling the HTML Compressor does not write anything to the |
@jaswsinc writes...
I was not able to reproduce what you saw. I used the same scenario you referenced:
("update to the RC" was done by simply overwriting the Before the "update", my
After the update, as soon as I loaded the WordPress Dashboard, the
Also, the "ZenCache detected a new version of itself. Recompiling w/ latest version... wiping the cache... all done :-)" Dashboard message popped up, which told me that The version check that runs in that routine checks out too: $prev_version = $self->options['version'];
if (version_compare($prev_version, VERSION, '>=')) {
return; // Nothing to do; up-to-date.
} The So I'm still not seeing any issue with the upgrade process. @jaswsinc writes...
As I described above, I'm not seeing any issue here.
I agree. That sounds like a great idea. I'll submit a PR for this shortly. |
Next Pro Release Changelog:
|
- Added `closeHtaccessFile()` method for clarity - Added htaccess_marker class property and updated references - Methods now pass around the entire `$htaccess` array to simplify things - Empty comment blocks are no longer added when no rules are applicable - Updated `fromLte151114()` VS Upgrade utility to use new htaccess methods See wpsharks/comet-cache#633
- Used to avoid requiring write access or exclusive lock when unnecessary - Also refactored `readHtaccessFile()` to remove now unused `marker_exists` See wpsharks/comet-cache#633
Next Pro Release Changelog:
|
ZenCache v151220 has been released and includes changes worked on as part of this GitHub Issue. See the release announcement for further details. This issue will now be locked to further updates. If you have something to add related to this GitHub Issue, please open a new GitHub Issue and reference this one (#633). |
ZenCache™ Pro v151216-RC
Testing the HTML Compression options. All HTML Compression Options set to on, but needed to switch set 'No, do not combine JS from into fewer files.' because this conflicts with jquery.nivo slider js file. This gives:
Failed to update your /.htaccess file automatically. Most likely a permissions error. Please make sure it has permissions 644 or higher (perhaps 666). Once you've done this, please try saving the ZenCache options again. But it is at 644!!
The options update OK.
Switching off the footer js scripts causes a 500 error. But the settings still save!!
The first time this happened, it corrupted the .htaccess file adding some random characters after the
# BEGIN ZenCache
# END ZenCache
section. and this 500 the site until I found the line and removed it.
The text was updated successfully, but these errors were encountered: