Sam,
I love this component! I have to keep our Joomla! sites up to date and this saves me a lot of time and really helps automate the process. We are suggesting it to everyone on our site:
http://www.cmsmarket.com/resources/dev-corner/101-how-to-update-joomla
Great work!!
I was getting the infinite loop error:
* JFolder::create: Infinite loop detected
* Unable to create destination
and this is how I fixed it:
.../administrator/components/com_jupdateman/libraries/joomla/filesystem/archive/tar.php// Make sure the destination folder exists
if (!is_dir(dirname($path)) && !JFolder::create(dirname($path)))
The issue is that for a file in the root directory, JFolder::create will be called and it checks to make sure the parent of the folder (which will be outside my root) exists without first making sure the folder exists:
.../libraries/joomla/filesystem/folder.phpfunction create($path = '', $mode = 0755)
{
// Initialize variables
jimport('joomla.client.helper');
$ftpOptions = JClientHelper::getCredentials('ftp');
static $nested = 0;
// Check to make sure the path valid and clean
$path = JPath::clean($path);
// Check if parent dir exists
$parent = dirname($path);
if (!JFolder::exists($parent)) {
Since my site has "open_basedir restriction" enabled, this causes warnings as it walks up to the root and then you get the infinite loop:
Warning: is_dir() [function.is-dir]: open_basedir restriction in effect. File(/var/www/vhosts/
MYDOMAIN.com) is not within the allowed path(s): (/var/www/vhosts/
MYDOMAIN.com/httpdocs:/tmp) in /var/www/vhosts/
MYDOMAIN.com/httpdocs/libraries/joomla/filesystem/folder.php on line 392
Warning: is_dir() [function.is-dir]: open_basedir restriction in effect. File(/var/www/vhosts) is not within the allowed path(s): (/var/www/vhosts/
MYDOMAIN.com/httpdocs:/tmp) in /var/www/vhosts/
MYDOMAIN.com/httpdocs/libraries/joomla/filesystem/folder.php on line 392
Warning: is_dir() [function.is-dir]: open_basedir restriction in effect. File(/var/www) is not within the allowed path(s): (/var/www/vhosts/
MYDOMAIN.com/httpdocs:/tmp) in /var/www/vhosts/
MYDOMAIN.com/httpdocs/libraries/joomla/filesystem/folder.php on line 392
Warning: is_dir() [function.is-dir]: open_basedir restriction in effect. File(/var) is not within the allowed path(s): (/var/www/vhosts/
MYDOMAIN.com/httpdocs:/tmp) in /var/www/vhosts/
MYDOMAIN.com/httpdocs/libraries/joomla/filesystem/folder.php on line 392
Warning: is_dir() [function.is-dir]: open_basedir restriction in effect. File(/) is not within the allowed path(s): (/var/www/vhosts/
MYDOMAIN.com/httpdocs:/tmp) in /var/www/vhosts/
MYDOMAIN.com/httpdocs/libraries/joomla/filesystem/folder.php on line 392
Warning: is_dir() [function.is-dir]: open_basedir restriction in effect. File(/) is not within the allowed path(s): (/var/www/vhosts/
MYDOMAIN.com/httpdocs:/tmp) in /var/www/vhosts/
MYDOMAIN.com/httpdocs/libraries/joomla/filesystem/folder.php on line 392
I would love for this to be fixed in core, but I think that will take longer. Plus I wanted to tell you how much I love your component
Thanks again!