open_basedir restriction in effect. File(/) is not within the allowed path(s):
Modify the open_basedir settings in your hosting account and set them to none. Find the open_basedir setting given under 'PHP Settings' area of your Plesk/cPanel. Set it to 'none' from the dropdown given there.
I have shown them in the Plesk panel picture.
open_basedir restriction in effect File is not within the allowed path
Check your configuration.php
file. Ensure that the log and tmp entries look like
public $log_path = '/home/futbol/data/www/futbol.kg/logs';
public $tmp_path = '/home/futbol/data/www/futbol.kg/tmp';
If these entries are correct, and you still get that message, disable all non-core system plugins, as it then must be one of them causing the problem.
PHP error : open_basedir restriction in effect
First, 777 permissions are bad, even on localhost where there is limited external access. Changing File Permissions « WordPress Codex for the correct and secure permissions scheme.
Second, open_basedir restriction in effect
is a PHP configuration error. You need to make changes in httpd.conf
. You need to find the location of httpd.conf
for your OS and Apache.
See http://php.net/manual/en/ini.core.php#ini.open-basedir :
In httpd.conf, open_basedir can be turned off (e.g. for some virtual
hosts) the same way as any other configuration directive with
"php_admin_value open_basedir none"
Plesk website - PHP open_basedir restriction in effect. File is not within the allowed path
Ok I got it, it's in the PHP settings of each website, there is an option called open_basedir which is set to none on the website on which the imagick code works
file_put_contents(): open_basedir restriction in effect. File(/tmp/XXX) is not within the allowed path(s): (/XXX) Ubuntu16.04
THE ANSWER
I found an answer accidentally... And only because I have spended more than 10 hours to solve that, I'm writing that solution...
The variable that we need to change on php.ini
IS NOT open_basedir
BUT: sys_temp_dir = "/home/admin/XXX"
and we also can leave open_basedir
as comment...
SURPRISE!!! :D
PHP directory error - open_basedir restriction in effect
I've also tried a couple of tweaks to the php.ini file and in particular the 'open_basedir' line, but no luck with that either
Then try again - you did it wrong the first time. Maybe there's another setting elsewhere (e.g. in the webserver config).
Failing that, find out what the open_basedir is and make sure that your upload_tmp_dir in php.ini and the $target_path in your code are both inside it.
C.
open_basedir, File() is not within the allowed path
It seems you need to add directory you use form tempnam
into open_basedir
or ask your server adminsitrator to turn it off (reference)
Related Topics
How to Change the Session Timeout in PHP
How to Convert an Array to Object in PHP
Parse Query String into an Array
What's Wrong With Using $_Request[]
Force Ssl/Https Using .Htaccess and Mod_Rewrite
Call to a Member Function Bind_Param() on a Non-Object
Mcrypt Is Deprecated, What Is the Alternative
Using Str_Replace So That It Only Acts on the First Match
How to Implement Authorization Using a Telegram API
Use Global Variables in a Class
Extract a Single (Unsigned) Integer from a String
Detecting Request Type in PHP (Get, Post, Put or Delete)