• Resolved seotaro

    (@seotaro)


    Hello,

    I’ve set up CloudFront with an origin pull configuration connected to W3 Total Cache.

    I manually configured the distribution, subdomain, and IAM, and I can confirm that static files are being served correctly through CloudFront.

    However, the problem is that authentication in W3 Total Cache doesn’t work, so I’m unable to use the invalidation feature. When I click the “test” button, it shows “Test failed,” and the Chrome console displays the following error:

    POST https://vietnamguide.co.kr/wp-admin/admin.php?page=w3tc_dashboard 500 (Internal Server Error) load-scripts.php?c=1…p-hooks&ver=6.7.1:2

    In the WordPress debug log, the only error recorded is related to compatibility with PHP 8.3, as shown below

    [10-Dec-2024 13:26:45 UTC] PHP Notice:  Function _load_textdomain_just_in_time was called <strong>incorrectly</strong>. Translation loading for the <code>w3-total-cache</code> domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the <code>init</code> action or later. Please see <a href="https://developer.ww.wp.xz.cn/advanced-administration/debug/debug-wordpress/">Debugging in WordPress</a> for more information. (This message was added in version 6.7.0.) in /var/www/vg/wp-includes/functions.php on line 6114

    What I find confusing is that about six months ago, there were no issues with authentication. After disabling the CDN for a while and trying to use it again, this problem has started occurring.

    Could you please let me know how to resolve this issue? Thank you!

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @seotaro

    Thank you for reaching out and I am happy to help!

    Can you please share if the environment is in the development mode by any chance?

    I do see that he CDN is enabled and the fiels are being served from Amazon Web Services: CloudFront: cdn.vietnamguide.co.kr

    x-cache: Hit from Cloudfront

    Can you confirm this?
    Most likely display_errors is Off, so the error shouldn’t pollute the ajax response.
    The error 500 doesn’t seem to be logged.  Maybe it’s logged in another log file (Apache main error log) so please check this also.

    Thanks!

    Thread Starter seotaro

    (@seotaro)

    Hello, @vmarko thank you for your response.

    My website is not in development mode; it is in live mode.

    I checked the nginx error log, and I found the following entry:

    2024/12/12 05:16:42 [error] 90466#90466: *103117 FastCGI sent in stderr: "PHP message: PHP Fatal error: Uncaught Error: Call to undefined function GuzzleHttp\default_user_agent() in /var/www/vg/wp-content/plugins/w3-total-cache/vendor/aws/aws-sdk-php/src/Handler/GuzzleV6/GuzzleHandler.php:40
    Stack trace:
    #0 /var/www/vg/wp-content/plugins/w3-total-cache/vendor/aws/aws-sdk-php/src/WrappedHttpHandler.php(88): Aws\Handler\GuzzleV6\GuzzleHandler->__invoke()
    #1 /var/www/vg/wp-content/plugins/w3-total-cache/vendor/aws/aws-sdk-php/src/ClientSideMonitoring/AbstractMonitoringMiddleware.php(126): Aws\WrappedHttpHandler->__invoke()
    #2 /var/www/vg/wp-content/plugins/w3-total-cache/vendor/aws/aws-sdk-php/src/Middleware.php(154): Aws\ClientSideMonitoring\AbstractMonitoringMiddleware->__invoke()
    #3 /var/www/vg/wp-content/plugins/w3-total-cache/vendor/guzzlehttp/promises/src/FulfilledPromise.php(48): Aws\Middleware::Aws\{closure}()
    #4 /var/www/vg/wp-content/plugins/w3-total-cache/vendor/guzzlehttp/promises/src/TaskQueue.php(52): GuzzleHttp\Promise\FulfilledPromise::GuzzleHttp\Promise\{" while reading response header from upstream, client: 125.134.150.12, server: vietnamguide.co.kr, request: "POST /wp-admin/admin.php?page=w3tc_dashboard HTTP/2.0", upstream: "fastcgi://unix:/run/php/php8.3-fpm.sock:", host: "vietnamguide.co.kr", referrer: "https://vietnamguide.co.kr/wp-admin/admin.php?page=w3tc_cdn"

    Thank you!

    Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @seotaro

    Thank you for your feedback.
    Are you using any other plugin that uses the AWS SDK ?

    Thanks!

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘CloudFront Authentication Issue’ is closed to new replies.