• Resolved sinorgpl

    (@sinorgpl)


    Hello,

    I recently enabled Cloudfront CDN via W3 Total Cache (great plugin btw!), and I now see an error on all my WooCommerce products with variatons available in Polish language version (translation via WPML). This is the error:

    Warning: is_readable(): open_basedir restriction in effect. File(/home/sin/.aws/config) is not within the allowed path(s): (/usr/home/sin/domains/www.protestkit.eu/public_html:/tmp:/usr/share:/usr/local/share:/dev) in /usr/home/sin/domains/www.protestkit.eu/public_html/wp-content/plugins/w3-total-cache/lib/Aws/Aws/ClientSideMonitoring/ConfigurationProvider.php on line 232

    On a perhaps related note, I notice on gtmetrix.com that not all my files are loaded from the CDN, and my server is super slow so I would like to fix that. Can you see https://gtmetrix.com/reports/www.protestkit.eu/HWRQbyWh/ and check if all those 27 resources listed by gtmetrix shouldn’t be served by w3 total cache CDN support?

    thank you in advance for any help,
    looking forwad to hearing from you

    • This topic was modified 3 years, 10 months ago by sinorgpl.

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

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

    (@vmarko)

    Hello @sinorgpl

    Thank you for your inquiry and I am happy to assist you with this.
    The problem is that c AWS cannot read CSM config from $filename. CSM config provider that creates CSM config using an ini file stored in your current home directory
    @param string|null $filename If provided uses a custom filename rather than looking in the home directory.
    Can you please share the settings in Perfgormance>CDN?
    Thanks!

    Thread Starter sinorgpl

    (@sinorgpl)

    Thank you for your swift response πŸ™‚

    Here are the requested settings: https://mega.nz/file/gZ51DaiQ#8GAsCH3AQv-PDi8ColqVqS2eEZNefSY_3w0zlJM97yw

    Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @sinorgpl

    Thank you for the information and the provided settings.
    I see that you added the following to the Custom files list:

    {plugins_dir}/*
    {wp-content_dir}/*

    This may be causing the issue so you need to be more specific as this is a custom file list. This means that you need to add the path of the files you wish to upload for example:
    {wp-content_dir}/themes/themify-shoppe/themify/js/*
    I hope this helps!
    Thanks!

    Thread Starter sinorgpl

    (@sinorgpl)

    Thank you for your reply. Unfortunately the issue persists. I cleared all cache in w3 panel, so I think the updates should be already in effect. Please see the settings now: https://mega.nz/file/oVoRRKaT#z1OMFlKjDQ6kilSPqioOy1CluNO_1SYsZ_mfsRBEnKE

    Thank you for your assistance

    Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @sinorgpl

    Thanks for the info.
    Can you please share what is this used for:
    {plugins_dir}/wp-minify/min*
    Thanks!

    Thread Starter sinorgpl

    (@sinorgpl)

    I don’t really know because it was there by default, it doesn’t refer to any plugin i have active or installed.

    Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @sinorgpl

    Thank you for the information.
    This is not there by default and also the regex is not correct. Can you please also remove that line an all other lines except the default ones:

    favicon.ico
    {wp_content_dir}/gallery/*
    {wp_content_dir}/uploads/avatars/*
    {plugins_dir}/wordpress-seo/css/xml-sitemap.xsl
    {plugins_dir}/wp-minify/min*
    {plugins_dir}/*.js
    {plugins_dir}/*.css
    {plugins_dir}/*.gif
    {plugins_dir}/*.jpg
    {plugins_dir}/*.png

    Thanks!

    Thread Starter sinorgpl

    (@sinorgpl)

    Thank you for your response. I replaced those entries with those you now provided, unfortunately the issue persists, I cleared cache two times to make sure. Please see the settings now https://mega.nz/file/1J5k3BqT#snkBg5834AVRFXe95WoTXDEs6FKPgymus4qj0b_Er-c

    btw the “{plugins_dir}/wp-minify/min*” entry that you asked about is one of the default ones you just now sent.

    See what I had entered:

    favicon.ico
    {wp_content_dir}/gallery/*
    {wp_content_dir}/uploads/avatars/*
    {plugins_dir}/wordpress-seo/css/xml-sitemap.xsl
    {plugins_dir}/wp-minify/min*
    {plugins_dir}/*.js
    {plugins_dir}/*.css
    {plugins_dir}/*.gif
    {plugins_dir}/*.jpg
    {plugins_dir}/*.png
    

    and what you asked me to paste instead:

    favicon.ico
    {wp_content_dir}/gallery/*
    {wp_content_dir}/uploads/avatars/*
    {plugins_dir}/wordpress-seo/css/xml-sitemap.xsl
    {plugins_dir}/wp-minify/min*
    {plugins_dir}/*.js
    {plugins_dir}/*.css
    {plugins_dir}/*.gif
    {plugins_dir}/*.jpg
    {plugins_dir}/*.png

    It looks the same to me.

    thank you for your continuus support

    • This reply was modified 3 years, 10 months ago by sinorgpl.
    • This reply was modified 3 years, 10 months ago by sinorgpl.
    Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @sinorgpl

    Thank you for the information.
    Sorry about the confusion this one is on me πŸ™‚
    I was trying to replicate the issue without success.
    However, after investigating more, the issue you are experiencing is not directly related to W3 Total Cache.
    The open_basedir is a server configuration, a security measure to disallow file access. The PHP script is trying to access the folder for which access is not allowed. This restriction is defined by the PHP open_basedir variable for each domain separately. By default, open_basedir allows access to the tmp and domain’s document root directories.
    There are a couple of things that you can try.
    First, you should check your files and folders permission ad make sure that the permission of the file is set to 755 and files to 644.
    You should also try deactivating the open_basedir. Edit the php.ini file, or .user.ini that is located within the main directory of your site and add this line:
    open_basedir = none
    Make sure to reach out to your hosting provider for more assistance with this if you are unsure how to handle this as they will be able to assist you more with these specifics.
    Thanks!

    Thread Starter sinorgpl

    (@sinorgpl)

    Thank you, that is starting to make sense πŸ™‚

    I have checked and I do not have /.aws/ catalogue on my server where the error is looking for it. Is this causing the problem, or is open_basedir restriction causing the lack of /.aws/? I want to clear this up before I ask my hosting provider for support, thank you for understanding.

    Please see my server directory contents (ls-la) here: https://mega.nz/file/hVxEHYqY#ETk-NFQBQp9eowYZ1zT0Q2ED3D0-8UjQHZPjsz2oNmo

    Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @sinorgpl

    The problem is due to the open_basedir restriction.
    So you should check that on the server.
    Thanks!

    Thread Starter sinorgpl

    (@sinorgpl)

    Awesome! My hosting provider said “i dont know why a plugin would want that”, but I did add the exception to open_basedir and the issue is resolved. Thank you for your time and patience!

    Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @sinorgpl

    You are most welcome.
    It’s not the plugin itself but the AWS SDK.
    Glad to know the issue is resolved!
    Thanks!

Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘Warning: is_readable(): open_basedir restriction in effect.’ is closed to new replies.