WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] [Plugin: WP Super Cache] Super Cache and custom SVN installs of WP (8 posts)

  1. mellow_bunny
    Member
    Posted 5 years ago #

    I have been a happy user of WP-Super-Cache for a long time and I really appreciate the work that has gone into developing it. I have a query which is a little unusual and applies to a particular type of install.

    I like to manage software with SVN when I can so I looked around for some solutions on the best way to use WordPress via SVN. I came across this guide by Sam Bauers. http://unlettered.files.wordpress.com/2008/08/wp-plus-subversion.pdf He used it at a presentation he gave at WordCamp San Francisco.

    In brief my install looks like this from the website's root:

    Nov  3 16:32 .
    Oct 23 17:41 ..
    Oct 12 17:38 favicon.ico
    Oct 12 17:38 favicon.jpg
    Oct 13 22:53 .htaccess
    Oct 12 17:48 .svn/
    Oct 15 18:07 .tmp/
    Oct 12 17:53 wordpress/
    Oct 23 04:03 wordpress-content/
    Oct 13 22:48 wp-config.php

    Inside the "wordpress" folder is an SVN copy of the latest stable version in the 2.6.x branch. Inside the wordpress-content folder is all the directories that you would normally find. I have however symlinked the default theme and also the akismet plugin to make sure it is up to date with the SVN.

    In my wp-config.php file I have set the following:

    define('WP_CONTENT_DIR', dirname(ABSPATH) . '/wordpress-content');
    define('WP_CONTENT_URL', 'http://www.mellowspace.com/wordpress-content');

    In my settings of WordPress I have set the appropriate WordPress Address and Blog Address. It all works fine and I followed the guide completely.

    After following the guide I successfully managed to install and activate my plugins. That was until I got to Super Cache. WordPress can see the plugin successfully and has no errors display. However when I attempt to "activate" the cache, the settings menu for WP-Super-Cache loads a page of white below the normal backend header. Thereafter any page I attempt to load is blank either frontend or backend. http://img300.imageshack.us/my.php?image=wordpresssupercacheerroxu9.jpg

    When I check the wordpress-content directory I can see the following:

    Nov  3 16:42 .
    Nov  3 16:32 ..
    Nov  3 16:42 advanced-cache.php -> (hidden)/mellowspace.com/wordpress-content/plugins/wp-super-cache/wp-cache-phase1.php
    Oct 23 04:00 plugins/
    Oct 12 18:15 themes/
    Oct 23 04:00 upgrade/
    Oct 13 18:43 uploads/
    Nov  3 16:42 wp-cache-config.php

    I assume this issue is due to perhaps the wp-content directory being hardcoded in the plugin? I am really not sure and any help pointing me in the right direction would be appreciated.

    WP-Super-Cache version: 0.8.4

  2. Donncha O Caoimh
    Member
    Posted 5 years ago #

    Can you check your error logs? The plugin uses the WP_CONTENT_DIR constant but maybe there's an issue with symlinking and permissions.

  3. mellow_bunny
    Member
    Posted 5 years ago #

    [Tue Nov 04 14:14:09 2008] [error] [client 67.x.x.x] Could not write to logfile:, referer: http://www.mellowspace.com/wordpress/wp-admin/options-general.php
    [Tue Nov 04 14:14:09 2008] [error] [client 67.x.x.x] Printing message to stderr:, referer: http://www.mellowspace.com/wordpress/wp-admin/options-general.php
    [Tue Nov 04 14:14:09 2008] [error] [client 67.x.x.x] [Tue Nov 04 14:14:09 2008] [info] Executing "(hidden)/mellowspace.com/wordpress/wp-admin/options-general.php" as UID 515, GID 501, referer: http://www.mellowspace.com/wordpress/wp-admin/options-general.php
    [Tue Nov 04 14:14:09 2008] [error] [client 67.x.x.x] , referer: http://www.mellowspace.com/wordpress/wp-admin/options-general.php
    [Tue Nov 04 14:14:09 2008] [error] [client 67.x.x.x] PHP Notice:  Undefined property:  stdClass::$response in (hidden)/mellowspace.com/wordpress/wp-admin/menu.php on line 30, referer: http://www.mellowspace.com/wordpress/wp-admin/options-general.php
    [Tue Nov 04 14:14:09 2008] [error] [client 67.x.x.x] PHP Notice:  Undefined index:  _wpnonce in (hidden)/mellowspace.com/wordpress-content/plugins/wp-super-cache/wp-cache.php on line 124, referer: http://www.mellowspace.com/wordpress/wp-admin/options-general.php
    [Tue Nov 04 14:14:09 2008] [error] [client 67.x.x.x] PHP Parse error:  syntax error, unexpected '/' in (hidden)/mellowspace.com/wordpress-content/wp-cache-config.php on line 8, referer: http://www.mellowspace.com/wordpress/wp-admin/options-general.php

    These are the errors that appear when I attempt to enable the cache.

  4. mellow_bunny
    Member
    Posted 5 years ago #

    After looking into the code I found that the following was causing the error.

    define( 'WPCACHEHOME', ABSPATH . (hidden)/mellowspace.com/wordpress-content/plugins/wp-super-cache/" ); //Added by WP-Cache Manager

    As you can see above there is a stray " after the wp-super-cache directory. I wasn't sure if that was causing the error itself but I changed to the below code and now Super Cache is working perfectly.

    define( 'WPCACHEHOME', WP_CONTENT_DIR . '/plugins/wp-super-cache/' ); //Added by WP-Cache Manager

    I'm not sure if this was a quirk of my install or what but it's resolved :)!

  5. Donncha O Caoimh
    Member
    Posted 5 years ago #

    It's your install. There's an str_replace on ABSPATH that sometimes fails, and it includes the extra ". I've since changed the code to use WP_CONTENT_DIR which will hopefully avoid this problem in the future!

  6. Kenn Wilson
    Member
    Posted 5 years ago #

    It's not just your installation -- I just experienced the exact same problem installing WP Super Cache on a WP site set up similarly to yours (wp-content moved to the root directory, etc). Fixing the broken quoting solved my problem too. Thanks for posting your solution!

  7. ngordon
    Member
    Posted 5 years ago #

    Newbie begging for help here.

    I am getting the same error as above:

    When I attempt to "activate" the cache, the settings menu for WP-Super-Cache loads a page of white below the normal backend header.

    What I don't know is what error log to look in to see where the problem exists.

    Thanks in advance.

  8. Donncha O Caoimh
    Member
    Posted 5 years ago #

    kchrist and ngordon - check your wp-cache-config.php and make sure the WPCACHEHOME define line is ok. If it isn't, I'd appreciate if you would attempt to fix the section of code in wp-cache.php that generates it please!

Topic Closed

This topic has been closed to new replies.

About this Topic