WordPress.org

Ready to get started?Download WordPress

Forums

W3 Total Cache
Plugin triggers a fatal error (37 posts)

  1. robertstaddon
    Member
    Posted 3 years ago #

    I have a brand new installation of Worpdress MU 2.9.2
    A fresh install of W3 Total Cache 0.9.0
    I'm hosted on MediaTemple Grid Service.

    I click "Activate" and get the following message:

    Plugin could not be activated because it triggered a fatal error.
    /[path]/domains/[mydomain].com/html/wp-content/db.php  could not be created, please run the following command:
    chmod 777 /[path]/domains/[mydomain].com/html/wp-content
    then re-active plugin.

    But I have already run a CHMOD on the wp-content directory to 777!

    Virtually the same thing is occuring on a separate installation of WordPress MU 2.9.2. On this one I upgraded your plugin instead of it being a fresh install. It says:

    Plugin could not be activated because it triggered a fatal error.
    /[path]/domains/[mydomain].com/html/wp-content/w3tc-[mydomain].com/min/index.php  could not be created, please run following command:
    chmod 777 /[path]/domains/[mydomain].com/html/wp-content/w3tc-[mydomain].com/min

    But once again, I have already fun a CHMOD on this directory to 777.

  2. Sjeng
    Member
    Posted 3 years ago #

    Same problem here:
    Plugin could not be activated because it triggered a fatal error.
    The previous version worked fine (at least I think so... Not really sure if my page really does load faster with it active tbh).

  3. Frederick Townes
    Member
    Plugin Author

    Posted 3 years ago #

    Grid service uses NFS, unfortunately there is some delay in the effect of some changes to files. You can manually copy the files in wp-content/plugins/w3-total-cache/wp-content/ to your wp-content directory. I have a demo site at mediatemple http://mt.w3-edge.com/ that every release is checked against and I've seen anomalies before and attributed them to the network file system. I wish no files had to be written for caching to work, but that is not up to me.

  4. Sjeng
    Member
    Posted 3 years ago #

    Well, I set all the folders it needed to 777, including wp-config.php, and now it seems to be working. Had some trial and error, but now it's fine.
    Can I change those files back to 755 (or whatever is safer?)
    I just don't feel very happy with all those 777 files/folders on my server.

  5. Frederick Townes
    Member
    Plugin Author

    Posted 3 years ago #

    You shouldn't have had to do that, if you wait or issue the command a couple times eventually the NFS will acknowledge the change. Anyway, yes you need to restore the normal permissions after all of the new files exist.

  6. Sjeng
    Member
    Posted 3 years ago #

    So you're saying that normally, if the W3 cache plugin shows me a fatal error, I just need to keep trying to activate it until it works?

  7. Frederick Townes
    Member
    Plugin Author

    Posted 3 years ago #

    No, not normally but sometimes (even if you followed the directions). It depends on a number of factors because writing files to the disk can sometimes be a shared resource, which means that behaviors are unpredictable. Shared hosting has these anomalies and when software writes files in those cases sometimes things don't work on the first try even though they clearly work elsewhere. Someone with a less busy shared server or dedicated server wouldn't have the issue for example.

  8. robertstaddon
    Member
    Posted 3 years ago #

    Hmmm. I'm still getting the fatal error.

    I completely uninstalled the 0.9.0 plugin and deleted all associated config files. Then I did a clean automatic install of the 0.9.1 plugin. I had to manually copy over the files in wp-content/plugins/w3-total-cache/wp-content/ to my wp-content directory.

    When I tried to activate, I got this error

    Plugin could not be activated because it triggered a fatal error.
    /[path]/domains/[mydomain].com/html/wp-content/w3tc-[mydomain].com/pgcache  could not be created, please run following command:
    chmod 777 /[path]/domains/[mydomain].com/html/wp-content/w3tc-[mydomain].com/pgcache

    The wp-content is still set to 777 and has been for a full day now. I even set the wp-config.php to 777 based on @Sjengs's suggestion. Are there other files/folders I need to set to 777?

    Weirdly enough, the files I had manually copied over to the wp-content directory (advanced-cache.php, db.php, and object-cache.php) mysteriously disappeared. Activating this plugin eats files?

    I manually re-copied the files to wp-content and then tried activating the plugin again. Once again it "ate" those files and I got the following error message:

    Plugin could not be activated because it triggered a fatal error.
    /[path]/domains/[mydomain].com/html/wp-content/w3tc-[mydomain].com could not be created, please run following command:
    chmod 777 /[path]/domains/[mydomain].com/html/wp-content/w3tc-[mydomain].com

    I'm a bit bewildered. Would you like an FTP login to my site?

  9. Sjeng
    Member
    Posted 3 years ago #

    Either /wp-content/ needs to be made 777 (which I don't think should be necessary), or the /w3tc-[mydomain].com/ folder cannot be created because I think it should be just /w3tc/. I'm kinda surprised why the plugin wants to create a folder called /w3tc-[mydomain].com/
    In my case it's just wp-content/w3tc/
    Don't know what's going on there... Did you manually rename the folder?

  10. robertstaddon
    Member
    Posted 3 years ago #

    @Sjeng, I have made the /wp-content/ folder 777, so I would think that any plugin should have the permission to create subdirectories without a problem.

    I do have a /wp-content/w3tc/ folder. However, I'm running WordPress MU 2.9.2. The plugin should be creating /wp-content/w3tc-[mydomain].com folders for every separate domain that the plugin gets activated on. These store the cache files for that particular domain.

    Unfortunately, it appears that on MediaTemple GS running MU 2.9.2 a bug in the latest releases of 0.9.0 and 0.9.1 have lost the ability to create these folders when the plugin is activated on a new domain, generating fatal input errors.

  11. robertstaddon
    Member
    Posted 3 years ago #

    I just tried an experiment that failed miserably.

    1. I made sure that the latest versions of advanced-cache.php, db.php, and object-cache.php were properly placed in the /wp-content/ folder.
    2. I manually created a /wp-content/w3tc-[mydomain].com/ directory with sub-directories named dbcache, log, min, objectcache, pgcache, and tmp.

    With this all set up, I tried to activate the plugin. It generated the fatal error again, but this time it looked like this:

    Plugin could not be activated because it triggered a fatal error.
    /[path]/domains/[mydomain].com/html/wp-content/db.php  could not be created, please run following command:
    chmod 777 /[path]/domains/[mydomain].com/html/wp-content

    But the db.php didn't need to be created! I had already copied it into the wp-content folder a day earlier!

    I accessed the site with FTP and found that the plugin activation attempt had deleted the advanced-cache.php, db.php, and object-cache.php files in /wp-content/ and the entire directory structure that I had created above. They were gone! Activating this plugin causes it to eat its own files.

    There appears to be a serious bug in the activation code.

  12. Frederick Townes
    Member
    Plugin Author

    Posted 3 years ago #

    I checked again and for whatever reason, the wp-content directory in plugins/w3-total-cache/ was missing. For whatever reason the distribution was incomplete. Re-downloading the plugin from WP Admin resolved the issue.

  13. robertstaddon
    Member
    Posted 3 years ago #

    Problem solved!

    While troubleshooting the "500 Internal Error" from the last release, I had mistakenly gotten the idea that I needed to manually put the /wp-content/plugins/w3-total-cache/wp-content/ files into the /wp-content/ directory.

    So now it makes sense. The plugin was trying to automatically copy the files into the /wp-content/ directory and failed because they weren't there to copy. But it assumed that the reason it couldn't copy was because /wp-content/ wasn't 777, even though it really was.

    Works perfectly now! Thank you, Frederick. You have a great plugin and you provide great support. I think every blog out there ought to be using it.

  14. Frederick Townes
    Member
    Plugin Author

    Posted 3 years ago #

    Thanks for the clarification!

  15. Mr. Shiv
    Member
    Posted 3 years ago #

    I've wasted half a day trying to activate this plug-in. Yes, /wp-content/ is 777, and so is /wp-content/uploads/.

    Are there any instructions for manually activating the plug-in?

    Thanks

  16. Frederick Townes
    Member
    Plugin Author

    Posted 3 years ago #

    @Mr. Shiv, can you try to update the WP uploads path in your options setting to some other value, save the setting then restore the default and save the settings again. Then proceed to activate the plugin?

  17. michaeltarallo
    Member
    Posted 3 years ago #

    I am having the same issue when activating the plug-in - Internal Server Error - the wp_content directory is present:

    /public_html/wordpress/wp-content/plugins/w3-total-cache/wp-content

    When setting the 777 is just on one folder or is it recursive?

    I noticed that my Internal Error is caused but the entries added to the .htaccess file:

    # BEGIN W3TC Browser Cache
    <IfModule mod_deflate.c>
    <IfModule mod_setenvif.c>
    BrowserMatch ^Mozilla/4 gzip-only-text/html
    BrowserMatch ^Mozilla/4\.0[678] no-gzip
    BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
    BrowserMatch \bMSI[E] !no-gzip !gzip-only-text/html
    </IfModule>
    <IfModule mod_headers.c>
    Header append Vary User-Agent env=!dont-vary
    </IfModule>
    AddOutputFilterByType DEFLATE text/css application/x-javascript text/html text/richtext image/svg+xml text/plain text/xsd text/xsl text/xml image/x-icon
    </IfModule>
    <FilesMatch "\.(?i:css|js)$">
    FileETag None
    <IfModule mod_headers.c>
    Header set X-Powered-By "W3 Total Cache/0.9.1.1"
    </IfModule>
    </FilesMatch>
    <FilesMatch "\.(?i:html|htm|rtf|rtx|svg|svgz|txt|xsd|xsl|xml)$">
    FileETag None
    <IfModule mod_headers.c>
    Header set X-Powered-By "W3 Total Cache/0.9.1.1"
    </IfModule>
    </FilesMatch>
    <FilesMatch "\.(?i:asf|asx|wax|wmv|wmx|avi|bmp|class|divx|doc|docx|exe|gif|gz|gzip|ico|jpg|jpeg|jpe|mdb|mid|midi|mov|qt|mp3|m4a|mp4|m4v|mpeg|mpg|mpe|mpp|odb|odc|odf|odg|odp|ods|odt|ogg|pdf|png|pot|pps|ppt|pptx|ra|ram|swf|tar|tif|tiff|wav|wma|wri|xla|xls|xlsx|xlt|xlw|zip)$">
    FileETag None
    <IfModule mod_headers.c>
    Header set X-Powered-By "W3 Total Cache/0.9.1.1"
    </IfModule>
    </FilesMatch>
    # END W3TC Browser Cache

    I removed all the entries and the err

    or stops.

    Any ideas if this is related somehow:

  18. michaeltarallo
    Member
    Posted 3 years ago #

    I updated my host and DNS to GoDaddy - at the moment the site is flying without any cache manager - we'll see how things go. - The shared host I was one was ipowerweb. I would not recommend

  19. Frederick Townes
    Member
    Plugin Author

    Posted 3 years ago #

    It would be helpful to have the error message from your error log.

  20. bhagwad
    Member
    Posted 3 years ago #

    I too am having this problem. I was fiddling around with the settings, uninstalled w3 cache, reinstalled and got the "internal server error."

    After some examination, I found that the "FilesMatch" directive in .htaccess was causing the issue when "Browser Caching" was turned on.

    Turning browser caching off for the moment. It would be nice to know the reason for the error...

  21. Frederick Townes
    Member
    Plugin Author

    Posted 3 years ago #

    Directive incompatibility with Apache 1.3.

  22. bhagwad
    Member
    Posted 3 years ago #

    Hmm - but it was working last night! Now I get the error if I turn on Page Caching as well.

    But you're right. I just checked and I have Apache Apache/1.3.33.

  23. bhagwad
    Member
    Posted 3 years ago #

    According to the documentation though, FilesMach is compatible with Apache 1.3 and above: http://httpd.apache.org/docs/1.3/mod/core.html#filesmatch

  24. reface
    Member
    Posted 3 years ago #

    I'm running WP 2.8.6 on Apache 2.0.63 and today, when I updated w3tc to its latest version, I got a fatal error when the auto-update mode tried reactivating it. Immediately afterwards, the dedicated server become irresponsive and slow (maybe because I'm getting good traffic but the plugin is inactive). However, every time I try to activate the plugin, the server goes berserk.

    Any ideas?

  25. reface
    Member
    Posted 3 years ago #

    After a while, the server has stabilized and I was able to reactivate after some 777 chmodding.

  26. Frederick Townes
    Member
    Plugin Author

    Posted 3 years ago #

    Errors in your error log? Is the uploads path in your miscellaneous options actually correct?

  27. bhagwad
    Member
    Posted 3 years ago #

    In order to access the error logs (not available in shared hosting.), I just upgraded my Godaddy hosting plan to Delux. The change is still "pending."

    I'll look at the error logs and tell you what I see.

    By uploads folder, you mean Settings->Media->"Store uploads in this folder "? It's the default wp-content/uploads. Just to make sure, I changed the name, saved, and changed it back.

    My blog is in a subdirectory with it's own .htacess. I still get "Internal Server Error" when "Browsing Cache" and "Page Cache" modify the root .htaccess file...

    Thanks for all the support Frederick

  28. bhagwad
    Member
    Posted 3 years ago #

    Here is the error I'm getting:

    "Regex could not be compiled"

    Does that mean anything?

  29. Frederick Townes
    Member
    Plugin Author

    Posted 3 years ago #

    It means you're using Apache 1.3 and some recent changes are incompatible with it. You can try the development version which fixes the issue.

  30. bhagwad
    Member
    Posted 3 years ago #

    Thanks Frederick. I migrated to Bluehost and everything is working fine now! They're using Apache 2.x...

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic