• Seriously weird one this and I would appreciate some help.

    I have WP 2.7 running successfully with Stray Random Quotes 1.6.2 activated on a Zeus Server.

    I tried an auto upgrade which appeared to work, but the new menu only linked to pages which could not be found. Reactivating 1.6.2 put everything back to normal, so I’m guessing the db wasn’t updated either.

    Installed 1.7.6 again via ftp and got the same problem on activation. Upon closer inspection, the menu links failed to work because the links included the full server path.
    eg: https://www.mydomain.com/content/package/m/y/mydomain.com/web/cms/wordpress/wp-admin/plugins.php?page=/content/package/mydomain.com... and etc.

    I copied the full installation and db down onto my local Apache (MAMP) server where it promptly updated the db and all admin screens loaded fine.

    As far as the menu is concerned, it looks as though WP cannot parse the value for __FILE__ being returned to it? No idea what’s going on with the db.

    FWIW, echoing the __FILE__ constant returns:
    /content/package/m/y/mydomain.com/web/test.php
    while echoing the SCRIPT_FILENAME constant returns
    /content/package/m/y/www.mydomain.com/web/test.php
    – note the’ www’.

    NB: I use a non-standard WP install as catered for since WP 2.6-
    /wp-config.php
    /index.php
    /wordpress
    /wp-content
    I’ve modified Stray Random Quotes to use WP_CONTENT defines and it runs quite happily locally.

    Any idea what’s going on or how to fix it?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter jamesbisset

    (@jamesbisset)

    The database doesn’t update because register_activation_hook() also calls on __FILE__.

    Obvious really.

    I’ve managed to get it working by replacing __FILE__ with $path_to_file where:

    $path_to_file = WP_CONTENT_DIR . '/plugins/stray-quotes/stray_quotes.php';

    It works, but it doesn’t explain why WordPress can parse one and not the other, when the value returned would appear to be the same in both cases.

    Thread Starter jamesbisset

    (@jamesbisset)

    Rushing to judgement. Tsk!

    The value returned by __FILE__ is:
    /content/package/m/y/mydomain.com/web/wp-content etc

    while the value returned by WP_CONTENT_DIR is:
    /content/package/m/y/www.mydomain.com/web/wp-content etc

    ie __FILE__ supplies a different value to DOCUMENT_ROOT.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Stray Random Quotes 1.7.6 broken on Zeus server’ is closed to new replies.