Tagged: W3 Total Cache
-
AuthorPosts
-
June 1, 2023 at 12:04 pm #90317abitofmindGuest
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 withcat
orless
.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.log6) 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.logStill 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.log7) 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!
June 1, 2023 at 1:04 pm #90417Marko VasiljevicKeymasterHello,
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!June 2, 2023 at 12:52 pm #90419abitofmindGuestFirst 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.logIt 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?
June 2, 2023 at 12:53 pm #90531Marko VasiljevicKeymasterHello,
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!June 12, 2023 at 10:09 am #91285abitofmindGuestAny success in trying to get access to access.log in a typical Shared Hosting setup like mine?
-
AuthorPosts
- The topic ‘Statistics → Access Log Filename → Any path notation & symlink fails’ is closed to new replies.