How to solve Installation errors Extension Manager

From Joomla! Documentation

Jump to: navigation, search

So you designed a perfect site locally. Then uploaded it and decided it needed some plugins. You enabled FTP in configuration.php and tried to Install your plugin, template or language but you get:

I got the following error:

* JFolder::create: Infinite loop detected
* JFTP::store: Bad response
* Warning! - Failed to move file

This means that there are some server settings which are wrong. You have to go to your global configuration and click on server. The first field is Path to Temp-folder and that's most likely the local path of you local install. You have to give in your live server path.

There are multiple ways to find that path. The easy one is to create a path.php file that has the following code in it:

<?php
  echo getcwd();
?>

Go to example.com/path.php and this will give you the right directory. Put /tmp behind it, place it in Path to Temp-folder and your done.

When you do not use FTP your directory and file permissions need to be set. The problem is that there are a lot of directories and their default setting is 755 which is safe and makes it impossible for users of the same server to place files in you directory. 755 does not make it possible to install or uninstall languages, templates or extensions.

If you change it to 777, you will be able to install and uninstall all your stuff, but… its not that safe.

To make it easy you can make a php file which sets all the directory settings right to 777 when you want to install stuff, and sets it back to 755 when you are done.

The following files need to be set tot 777 to make installation possible:

/administrator/backups/
/administrator/components/
/administrator/language/
/administrator/language/en-GB/
/administrator/language/nl-NL/
/administrator/modules/
/administrator/templates/
/components/
/images/
/images/banners/
/images/stories/
/language/
/language/en-GB/
/language/nl-NL/
/language/pdf_fonts/
/modules/
/plugins/
/plugins/content/
/plugins/editors/
/plugins/editors-xtd/
/plugins/search/
/plugins/system/
/plugins/user/
/plugins/xmlrpc/
/tmp/
/templates/
/cache/

As you can see there are extra languages installed in my default install, so if you use extra languages include them in the list.

You can create a chmod.php file like this:

<?php
if ($_GET['chmod']) { $ftp_chmod = $_GET['chmod']; } else { $ftp_chmod = "0755"; }
echo "chmod=".$ftp_chmod;
 
$ftp_server='your server';
$ftp_user='the user';
$ftp_pass='the password';
$conn_id = ftp_connect("$ftp_server");
ftp_login($conn_id, $ftp_user, $ftp_pass);
 
if (ftp_site($conn_id, 'CHMOD '.$ftp_chmod.' /httpdocs/administrator/backups/')) { echo "<!--succes-->
"; } else { echo "failed"; }
if (ftp_site($conn_id, 'CHMOD '.$ftp_chmod.' /httpdocs/administrator/components/')) { echo "<!--succes-->
"; } else { echo "failed"; }
if (ftp_site($conn_id, 'CHMOD '.$ftp_chmod.' /httpdocs/administrator/language/')) { echo "<!--succes-->
"; } else { echo "failed"; }
if (ftp_site($conn_id, 'CHMOD '.$ftp_chmod.' /httpdocs/administrator/language/en-GB/')) { echo "<!--succes-->
"; } else { echo "failed"; }
if (ftp_site($conn_id, 'CHMOD '.$ftp_chmod.' /httpdocs/administrator/language/nl-NL/')) { echo "<!--succes-->
"; } else { echo "failed"; }
if (ftp_site($conn_id, 'CHMOD '.$ftp_chmod.' /httpdocs/administrator/modules/')) { echo "<!--succes-->
"; } else { echo "failed"; }
if (ftp_site($conn_id, 'CHMOD '.$ftp_chmod.' /httpdocs/administrator/templates/')) { echo "<!--succes-->
"; } else { echo "failed"; }
if (ftp_site($conn_id, 'CHMOD '.$ftp_chmod.' /httpdocs/components/')) { echo "<!--succes-->
"; } else { echo "failed"; }
if (ftp_site($conn_id, 'CHMOD '.$ftp_chmod.' /httpdocs/images/')) { echo "<!--succes-->
"; } else { echo "failed"; }
if (ftp_site($conn_id, 'CHMOD '.$ftp_chmod.' /httpdocs/images/banners/')) { echo "<!--succes-->
"; } else { echo "failed"; }
if (ftp_site($conn_id, 'CHMOD '.$ftp_chmod.' /httpdocs/images/stories/')) { echo "<!--succes-->
"; } else { echo "failed"; }
if (ftp_site($conn_id, 'CHMOD '.$ftp_chmod.' /httpdocs/language/')) { echo "<!--succes-->
"; } else { echo "failed"; }
if (ftp_site($conn_id, 'CHMOD '.$ftp_chmod.' /httpdocs/language/en-GB/')) { echo "<!--succes-->
"; } else { echo "failed"; }
if (ftp_site($conn_id, 'CHMOD '.$ftp_chmod.' /httpdocs/language/nl-NL/')) { echo "<!--succes-->
"; } else { echo "failed"; }
if (ftp_site($conn_id, 'CHMOD '.$ftp_chmod.' /httpdocs/language/pdf_fonts/')) { echo "<!--succes-->
"; } else { echo "failed"; }
if (ftp_site($conn_id, 'CHMOD '.$ftp_chmod.' /httpdocs/modules/')) { echo "<!--succes-->
"; } else { echo "failed"; }
if (ftp_site($conn_id, 'CHMOD '.$ftp_chmod.' /httpdocs/plugins/')) { echo "<!--succes-->
"; } else { echo "failed"; }
if (ftp_site($conn_id, 'CHMOD '.$ftp_chmod.' /httpdocs/plugins/content/')) { echo "<!--succes-->
"; } else { echo "failed"; }
if (ftp_site($conn_id, 'CHMOD '.$ftp_chmod.' /httpdocs/plugins/editors/')) { echo "<!--succes-->
"; } else { echo "failed"; }
if (ftp_site($conn_id, 'CHMOD '.$ftp_chmod.' /httpdocs/plugins/editors-xtd/')) { echo "<!--succes-->
"; } else { echo "failed"; }
if (ftp_site($conn_id, 'CHMOD '.$ftp_chmod.' /httpdocs/plugins/search/')) { echo "<!--succes-->
"; } else { echo "failed"; }
if (ftp_site($conn_id, 'CHMOD '.$ftp_chmod.' /httpdocs/plugins/system/')) { echo "<!--succes-->
"; } else { echo "failed"; }
if (ftp_site($conn_id, 'CHMOD '.$ftp_chmod.' /httpdocs/plugins/user/')) { echo "<!--succes-->
"; } else { echo "failed"; }
if (ftp_site($conn_id, 'CHMOD '.$ftp_chmod.' /httpdocs/plugins/xmlrpc/')) { echo "<!--succes-->
"; } else { echo "failed"; }
if (ftp_site($conn_id, 'CHMOD '.$ftp_chmod.' /httpdocs/tmp/')) { echo "<!--succes-->
"; } else { echo "failed"; }
if (ftp_site($conn_id, 'CHMOD '.$ftp_chmod.' /httpdocs/templates/')) { echo "<!--succes-->
"; } else { echo "failed"; }
if (ftp_site($conn_id, 'CHMOD '.$ftp_chmod.' /httpdocs/cache/')) { echo "<!--succes-->
"; } else { echo "failed"; }
 
ftp_close($conn_id);
?>

When you go to example.com/chmod.php?chmod=0777 the directories are set to 777. To restore to 0755 go to example.com/chmod.php?chmod=0755.

As you can see you still need to use your FTP files, so why not use them as the default setting.

Alternative script that may be easier to modify:

<?php
 
// your ftp credentials
$ftp_server='ftp.yourserver.com';
$ftp_user='yourusername';
$ftp_pass='yourpassword';
 
// where is Joomla installed? (trailing slash required)
$base = '/public_html/web/';
 
// what files or directories need chmod applied? (trailing slash optional)
$dirs = array( 'administrator/backups',
               'administrator/components',
               'administrator/language',
               'administrator/language/en-GB',
               'administrator/modules',
               'administrator/templates',
               'administrator/cache',
               'components',
               'images',
               'images/banners',
               'images/stories',
               'media',
               'language',
               'language/en-GB',
               'language/pdf_fonts',
               'modules',
               'plugins',
               'plugins/content',
               'plugins/editors',
               'plugins/editors-xtd',
               'plugins/search',
               'plugins/system',
               'plugins/user',
               'plugins/xmlrpc',
               'tmp',
               'templates',
               'cache'
             );
 
// default to safe 0755 setting
if ($_GET['chmod']) {
    $ftp_chmod = $_GET['chmod']; 
} else {
    $ftp_chmod = "0755"; 
}
echo "chmod=".$ftp_chmod.'<br/>';
 
// connect via ftp and apply chmod
$conn_id = ftp_connect("$ftp_server");
ftp_login($conn_id, $ftp_user, $ftp_pass);
foreach( $dirs as $dir ){
    if (ftp_site($conn_id, 'CHMOD '.$ftp_chmod.' '.$base.$dir)) { 
        echo "success "; 
    } else { 
        echo "failed "; 
    }
    echo $base.$dir.'<br/>';
} 
ftp_close($conn_id);
 
echo 'DONE';
?>
Personal tools