The Joomla! Forum ™



Forum rules


Please submit all new Tips and Tricks to: http://docs.joomla.org/Category:Tips_and_tricks

This forum section will be closed and removed eventually.



Post new topic Reply to topic  [ 3 posts ] 
Author Message
PostPosted: Mon Apr 14, 2008 9:48 am 
User avatar
Joomla! Explorer
Joomla! Explorer

Joined: Tue Sep 06, 2005 9:10 am
Posts: 252
Location: Netherlands
So you designed a perfect site locally. Then uploaden 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 thats 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:
Code:
<?php
echo getcwd();
?>

Go to yoururl.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 707, 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 707 when you want to install stuff, and sets it back to 755 when you are done.

The following files need to be set tot 707 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:

Code:
<?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 yoururl.com/chmod.php?chmod=0707 the directories are set to 707. To restore to 0755 go to yoururl.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.

_________________
Joomla insite


Top
 Profile  
 
PostPosted: Mon Apr 14, 2008 11:20 am 
User avatar
Joomla! Master
Joomla! Master

Joined: Thu Aug 18, 2005 10:41 am
Posts: 15753
Moderator note: moving from 1.5 Installation to Suggested Tips/Tricks

_________________
Regards Robin

http://www.linkedin.com/in/robinmuilwijk - http://twitter.com/i_robin


Top
 Profile  
 
PostPosted: Fri May 02, 2008 10:53 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Sat Apr 19, 2008 8:47 pm
Posts: 33
Location: Riyadh, Saudi Arabia
Thaaaaaaaaaank Mark
I've spend too much time searching for a solution
Changing "path to tmp" works with me
Thanks again

_________________

الأطياف العربية
http://alatiaf.com



Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 



Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group