There is an open_basedir exception on line 1221 see:
[22-Jan-2022 15:44:57 Europe/Berlin] PHP Warning: is_file(): open_basedir restriction in effect. File(/metadata.xml) is not within the allowed path(s): (...www:/tmp/) in ....www/administrator/components/com_menus/src/Model/ItemModel.php on line 1221
as reportet in the closed issue #35895 if you create an new MenuItem.
/metadata.xml may not located at the root directory of the filesystem.
Joomla 4.0.6 with Apache | PHP on CentOS 8
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2022-01-22 18:46:33 |
Closed_By | ⇒ | Fedik |
@hsm-berlin Could you test if the changes from pull request (PR) #36791 fix this issue for you and if so, report back in that PR? Thanks in advance.
I just discovered this on the site I'm working on, when attempting to add a new menu item. I rebuilt menus, but error remains.
Joomla 3.10.5
PHP 7.4.27
Error message:
Warning: is_file(): open_basedir restriction in effect. File(/metadata.xml) is not within the allowed path(s): (/var/www/vhosts/mywebsite.org/:/tmp/) in /var/www/vhosts/mywebsite.org/httpdocs/new/administrator/components/com_menus/models/item.php on line 1153
I am now attempting to debug this.
So far I've found that $base is empty in this code...
// Now check for a component manifest file
$path = JPath::clean($base . '/metadata.xml');
//jjj: debug
echo "base: [" . $base . "]
";
if (is_file($path))
{
$formFile = $path;
}
}
I just discovered this on the site I'm working on, when attempting to add a new menu item. I rebuilt menus, but error remains.
Joomla 3.10.5
PHP 7.4.27
Error message:
Warning: is_file(): open_basedir restriction in effect. File(/metadata.xml) is not within the allowed path(s): (/var/www/vhosts/mywebsite.org/:/tmp/) in /var/www/vhosts/mywebsite.org/httpdocs/new/administrator/components/com_menus/models/item.php on line 1153
I am now attempting to debug this.
So far I've found that $base is empty in this code...
// Now check for a component manifest file
$path = JPath::clean($base . '/metadata.xml');
//jjj: debug
echo "base: [" . $base . "]
";
if (is_file($path))
{
$formFile = $path;
}
}
Confirm the issue (see also closed one)
Hoster had a suggested solution, but I can't understand resp. comprehend it.
I don't know the right solution.
This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/36788.