Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #90317
    abitofmind
    Guest

    WordPress → W3 Total Cache (Pro version!) → General Settings → Statistics

    Cache usage statistics: Enabled
    Slot time: 60 secs
    Slots collected: 60
    Webserver: Apache. That’s indeed my webserver.
    Access Log Filename: Pressing TEST results in “Failed to open file” regardless what path I try.

    1) My WordPress root directory is at: ~/html/apps/domain-x/ or as an absolute path /data/web/customer-ID/html/apps/domain-x/ .

    2) ~/log/access.log is the real Apache access.log for my customer account (mixing all domains together, but I anyhow use only one production and one staging subdomain on that webhost for now). In SSH I can read access.log with cat or less.

    3) According to my webhost PHP can only access until ~/html/ and not higher.

    4) php_openbase is OFF to not further complicate things.

    5) Regardless whether using an absolute path /data/web/customer-ID/ or a relative path, either relative to my home directory (starting with the ~ tilde) or relative to the WordPress root at ~/html/apps/domain-x/ (starting the path without a slash and without a tilde, so simply e.g. wp-config.php) nothing of the following worked:

    ~/log/access.log
    /data/web/customer-ID/log/access.log

    6) Hence I created two symlinks:
    ln -s ~/log/access.log ~/html/all-my-domains-access.log
    ln -s ~/log/access.log ~/html/apps/domain-x/all-my-domains-access-in-wp-root.log

    Still nothing of the following worked:

    ~/html/all-my-domains-access.log
    /data/web/customer-ID/html/all-my-domains-access.log
    ~/html/apps/domain-x/all-my-domains-access-in-wp-root.log
    /data/web/customer-ID/html/apps/domain-x/all-my-domains-access-in-wp-root.log

    7) I checked ~/log/php_error.log and found no time related log messages to when I click that TEST button. This test button failure leaves no trace in the logs. So I have no clue why it fails.

    Help appreciated!

    #90417

    Hello,

    Thank you for reaching out and I am happy to assist you with this.
    Can you please share if you are using any security plugin or any plugin that may alter the naming of the folder structure?
    This may prevent W3 Total Cache from getting the correct path.
    Thanks!

    #90419
    abitofmind
    Guest

    First thanks for your answer. In the meantime I got some learnings:

    1) Tried whether a static file would work

    $ cp ~/log/access.log ~ /html/apps/domain-x/access-log-static-copy.log

    2) Then tried to fill “Access Log Filename” with different path notations:

    ❌ Relative to WP-Root-Dir:
    access-log-static-copy.log

    ❌ Relative to HOME-Dir:
    ~/html/apps/domain-x/access-log-static-copy.log

    ✅ Absolute path:
    /data/web/customer-id/html/apps/domain-x/access-log-static-copy.log

    It reported “Success”.

    Then I tried the absolute path of the symlink:
    /data/web/customer-id/html/apps/domain-x/access-log-all-domains.log
    which points to:
    /data/web/customer-id/log/access.log
    which again failed.

    So it seems that W3TC (or PHP) cannot follow the symlink which is above ~/html/

    3) Is there anything we can do about it?

    4) Could that Test button put warning message into php_error.log for each failed file access attempt for debugging exactly how/why access fails?

    #90531

    Hello,

    Thank you for your feedback and for providing the details on this.
    Let me check and make some tests on this and I’ll get back to you with more details.
    Thanks!

    #91285
    abitofmind
    Guest

    Any success in trying to get access to access.log in a typical Shared Hosting setup like mine?

Viewing 5 posts - 1 through 5 (of 5 total)
  • The topic ‘Statistics → Access Log Filename → Any path notation & symlink fails’ is closed to new replies.