8

When i am installing an extension in my magento admin,it shows Connection string is empty. I don't know why this problem occurs. I cleared the cache also then also the problem is same. If anyone knows how to do this,please help me out. Thanks!

8
  • Here is the first result of googling your doubt.. Check this creare.co.uk/magento-connect-error-connection-string-is-empty Jul 15, 2014 at 9:51
  • where i will get this. please tell me the path where i will get the box to change Jul 15, 2014 at 10:16
  • One more thing beofre making the above modifications. First modify the permissions to 777 to total magento application. Then after installing the extension rollback the permissions to 755 Jul 15, 2014 at 10:21
  • can you please tell me how to modify permissions to 777 to total magento application.please elaborate Jul 15, 2014 at 10:23
  • linux SSH server/cloud server Jul 15, 2014 at 10:25

6 Answers 6

12

To solve this problem, follow the steps below (I suppose you are using Ubuntu):

1) sudo chmod -R 777 /var/www/html/magentoInstallationFolder/

2) Install Magento Extension

3) Restore correct permissions for directories and files respectively

sudo find /var/www/html/magentoInstallationFolder/ -type d -exec chmod 775 {} \;
sudo find /var/www/html/magentoInstallationFolder/ -type f -exec chmod 664 {} \;

Read more about why 777 permissions are bad and you need to restore good permission code (775) after you install the extension: https://askubuntu.com/a/30635

2
  • 1
    In fact, just changing app/ and /downloader could work too. Greetings Jan 4, 2016 at 19:43
  • no it don't i tried to change permissions only for app and downloader folder but it did not worked! Oct 17, 2016 at 4:32
3

Magento tries to put the maintenance flag in the root directory. Here is the code that does it:

<?php
//downloader/Maged/Controller.php::startInstall()
if ($this->_getMaintenanceFlag()) {
...
//downloader/Maged/Controller.php::isWritable()
$this->_writable = is_writable($this->getMageDir() . DIRECTORY_SEPARATOR)

If you can't change magento root directory permissions just uncheck "Put store on the maintenance mode while installing/upgrading/backup creation" flag.

1
  • That was the right solution for me; settng crazy 777 file permission should never be. Feb 13, 2017 at 10:17
2

There's a couple of suggestions to change the permissions to this:

sudo chmod 777 -R /var/www/html

Which is a really really bad idea. Have a search for 'Magento permissions' and follow the guide instead. Unless you're seeking to get your site hacked wihin a few minutes.

0

Have to change right recursively (chown -R) to www-data:www-data on a directory containing magento (example : /var/www/magento) Sorry for bad engish

0

chown -R www-data:www-data /var/www/your_magento_folder That did the tick for me, don't change the owner of the www folder

1
  • 1
    Please add a lot more details to your answer Jan 26, 2015 at 23:55
-3

Type the following command in your terminal.

sudo chmod 777 -R /var/www/html/<magento folder name>. Press Enter.

Then it will ask for password if exists for your username.

Once it is done, login and logout the admin and try to install extension which you want

Edited:

Try this for your files:

sudo chmod 777 -R /var/www/html

and follow the above steps.

2
  • inside var/www/html,all files are there. There is no any magento folder name Jul 15, 2014 at 10:34
  • what is the url for your magento admin? Jul 15, 2014 at 10:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.