Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Showing error "Connection string is empty" in magento

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!

like image 252
Prince Kumar Avatar asked Jul 15 '14 06:07

Prince Kumar


3 Answers

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

like image 66
pablofiumara Avatar answered Oct 31 '22 14:10

pablofiumara


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.

like image 24
Cmyker Avatar answered Oct 31 '22 14:10

Cmyker


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.

like image 2
Charlie Nielsen Avatar answered Oct 31 '22 14:10

Charlie Nielsen