Joomla error instalation of component issue

If you install some component on your site and get this errors:

JFolder::create: Infinite loop detected.
Warning: Failed to move file!


Archive does not exist
Unable to find install package


Then 97% error in your configuration file.
Please go to admin area and

check in “System” -> “System Information” section Directory Permissions and scrool to end page.

If you have :
(Log directory) Unwritable
(Temp directory) Unwritable

Then: If you don’t know your real file location on your server you can create simple php file (like “tmp_dir.php”) in site folder:

echo ' Log directory : '.getcwd().'/logs'."<br/>";
echo ' Temp directory : '.getcwd().'/tmp';

After saving you need go to admin area.
Open “System”->”Global Configuration” section “Server” and “System” and change Path to Temp Folder and Path to Log Folder as on this page http://{your_site}/tmp_dir.php