PHP / Apache configuration - sys_temp_dir set to /tmp, upload_tmp_dir set to siteroot/tmp
Joomla configuration - tmp folder set to siteroot/tmp
Install a package via uploading in extension manager
Package should install
Fails with error Unable to find install package.
Log shows:
[Wed Jan 31 17:21:26.540380 2018] [:error] [pid 27404] [client [...]:30474] /tmp, referer: [...]/index.php?option=com_installer&view=install
[Wed Jan 31 17:21:26.540572 2018] [:error] [pid 27404] [client [...]:30474] PHP Warning: realpath(): open_basedir restriction in effect. File(/tmp) is not within the allowed path(s): (/usr/share/pear:/var/www/[...]) in /var/www/[...]/httpdocs/libraries/vendor/joomla/archive/src/Archive.php on line 55, referer: [...]/administrator/index.php?option=com_installer&view=install
[Wed Jan 31 17:21:26.543517 2018] [:error] [pid 27404] [client [...]:30474] PHP Warning: file_exists(): open_basedir restriction in effect. File(/) is not within the allowed path(s): (/usr/share/pear:/var/www/[...]) in /var/www/[...]/httpdocs/libraries/vendor/joomla/filesystem/src/File.php on line 193, referer: [...]/index.php?option=com_installer&view=install
[Wed Jan 31 17:21:26.544592 2018] [:error] [pid 27404] [client [...]:30474] PHP Warning: is_dir(): open_basedir restriction in effect. File(/) is not within the allowed path(s): (/usr/share/pear:/var/www/[...]) in /var/www/[...]/httpdocs/libraries/vendor/joomla/filesystem/src/Folder.php on line 129, referer: [...]/administrator/index.php?option=com_installer&view=install
PHP 5.5.9, Apache2, Ubuntu 16.04
Seems to be related to libraries/vendor/joomla/archive/Archive.php line 55 using sys_get_temp_dir
rather than the site configuration temp folder:
isset($options['tmp_path']) or $options['tmp_path'] = realpath(sys_get_temp_dir());
Work-around is to set sys_temp_dir to /tmp, either in root php configuration or override in apache virtual host configuration file using php_admin_value sys_temp_dir siteroot/tmp
Labels |
Added:
?
|
Category | ⇒ | com_plugins |
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2018-02-08 02:23:23 |
Closed_By | ⇒ | zero-24 |
@waveywhite please have a look into my pull request and test it so we can include it in the main branch: #19608
As there is a Pull request i'm going to close this issue here. Please test #19608