open_basedir problem
-
not sure what happened, if my hosting changed something, but suddenly I get this warning on my website:
Warning: is_readable(): open_basedir restriction in effect. File(/includes/fbwpml.php) is not within the allowed path(s): (/www/doc/www.XXXX.cz:/disk2/doc/www.XXXX.cz:/usr/share/php:/www/tmp:/tmp) in /www/doc/www.XXXX.cz/www/wp-content/plugins/facebook-for-woocommerce/includes/Integrations/Integrations.php on line 61
What should I do? I suppressed Warnings for the mean time, but this should not happen, right?
-
I have almost same problem here:
Warning: is_readable(): open_basedir restriction in effect. File(/includes/fbwpml.php) is not within the allowed path(s): (/www/doc/www.mimispanek.cz:/disk2/doc/www.mimispanek.cz:/usr/share/php:/www/tmp:/tmp) in /www/doc/www.mimispanek.cz/www/wp-content/plugins/facebook-for-woocommerce/includes/Integrations/Integrations.php on line 61
Warning: session_start(): Cannot start session when headers already sent in /www/doc/www.mimispanek.cz/www/wp-content/plugins/fwswoocommerce/4w-code.php on line 33
Warning: Cannot modify header information – headers already sent by (output started at /www/doc/www.mimispanek.cz/www/wp-content/plugins/facebook-for-woocommerce/includes/Integrations/Integrations.php:61) in /www/doc/www.mimispanek.cz/www/wp-includes/functions.php on line 6362
Warning: Cannot modify header information – headers already sent by (output started at /www/doc/www.mimispanek.cz/www/wp-content/plugins/facebook-for-woocommerce/includes/Integrations/Integrations.php:61) in /www/doc/www.mimispanek.cz/www/wp-admin/includes/misc.php on line 1310
Warning: Cannot modify header information – headers already sent by (output started at /www/doc/www.mimispanek.cz/www/wp-content/plugins/facebook-for-woocommerce/includes/Integrations/Integrations.php:61) in /www/doc/www.mimispanek.cz/www/wp-admin/admin-header.php on line 9`
@lubosabo is it active24 hosting? it might me specific to hosting
however I don’t think that the absolute adresses in the plugin code are correct…
Yes is Active 24.
And I agree is a problem of plugin codeYou can access the code here throwing the error here:
https://github.com/woocommerce/facebook-for-woocommerce/blob/master/includes/Integrations/Integrations.phpIt appears to be related to permissions associated with the path requested so I suggest that the first place to ask would be your hosts to see if they can check that path.
I’m getting the same error :'(
Hi @bernike. Can you check with your host if there are permissions issues that could result in the error above? Thanks!
@mouli @apmwebdev well shouldn’t be the path relative, not absolute? meaning ‘/includes/fbwpml.php’ is certainly not allowed, if you have user files located at ‘/www/doc/www.website.com’ shouldn’t you use something like __DIR__ in the code?
open_basedir is a restriction to prevent a hosting package user from accessing any paths on the server that are not authorised, such as the paths to other domains on shared web servers, or to access the hosting software.
The open_basedir function defines the locations or paths from which PHP is allowed to access files using functions like fopen() and gzopen(). If a file is outside of the paths defined by open_basedir, PHP will refuse to open it.
To resolve this we’d initially advise opening a discussion with your web host.
Hello @apmwebdev
Thanks so much for your speedy response 🙂
I’ve checked in with my web host and they are saying that the error is caused because “the coding is attempting to access a server path to which it does not have access to”.
They say that the problem lies here:
./wp-content/plugins/facebook-for-woocommerce/includes/fbwpml.phpLook forward to hearing back from you.
Hi again,
I’ve checked in with my web host and they are saying that the error is caused because “the coding is attempting to access a server path to which it does not have access to”.
They say that the problem lies here:
/wp-content/plugins/facebook-for-woocommerce/includes/fbwpml.phpYes, this is part of it but I would describe it a bit differently. So that file
fbwpml.phpis part of the Facebook for WooCommerce extension. It is an optional file that takes care of things for when WPML is also active on your installation.The problem is not the file itself (but it is the trigger of the warning message). The problem is created because “Facebook for WooCommerce” is not allowed to access it’s own subfile
fbwpml.phpon the web server.The web server usually has access to the file system via the group. I would try and chmod the
/includes/fbwpml.phpto 775.Kind regards,
My host has come back with another response:
I am afraid that the information shared with you below is not fully correct and the suggestion shared with you is also not accurate or feasible. The problem with the folder path that is incorrectly specified (/includes/fbwpml.php) is that it is trying to write to a file () within a folder (), directly located within the root partition of a server. No domain hosted on our environment has access to folders or files within the root partitions of our servers. The suggestion they have made is therefore not a viable solution. The folder path needs to be specified correctly so that it finds and writes to the file located within your domains website directory, and not the servers root directory.
Please help? I’m not a developer so this is all over my head…
Thanking you in advance.
-
This reply was modified 4 years, 10 months ago by
Steven Stern (sterndata).
Hey again!
We need to look at your site’s configuration. Please contact us at WooCommerce.com > My Account > Support. You may need to create an account before you can access that page.
Please include a link to this forum thread, your site’s SSR, and a screenshot of one of the affected product’s configurations.
We will be able to help you further there.
Cheers!
this is madness.
short and simple (and for the second time): the server hosting doesnt allow to access path ‘/includes/fbwpml.php’
you are demanding them to allow access in subfolder of the server root. this is not going to happen. the path in the code cannot start with a slash, as that is the server root..
you can check our server config here: http://uvirt110.active24.cz:84/info.php
Hi there @mrtvykenny
Thanks for sharing the server config.
I’m not sure what suddenly triggered the original error message you are seeing but there is a known bug which is causing this error message for some users.
You can track this here:
https://github.com/woocommerce/facebook-for-woocommerce/issues/1642The above link does also include a suggested workaround.
The developers are aware of the issue and while we won’t be able to give you an exact timeframe for when a fix will be released, the good news is they are actively working on it and you will be able to track updates from the above link.
Thanks!
Hi there @mrtvykenny
We haven’t heard back from you in a while, so I’m going to mark this as resolved – we’ll be here if and/or when you are ready to continue.
-
This reply was modified 4 years, 10 months ago by
The topic ‘open_basedir problem’ is closed to new replies.