Question: I'm having some troubles with installing extensions with magento connect. When I start installing the extension the outline terminal writes something like this:

> 
> Checking dependencies of packages Installing package community/OrganicInternet\_SimpleConfigurableProducts 0.7.4
> 
> 
> CONNECT ERROR: Failed to open file
>  /var/www/magento/downloader/.cache/community/OrganicInternet\_SimpleConfigurableProducts-0.7.4/app/code/community/OrganicInternet/SimpleConfigurableProducts/Catalog/Model/Product/Type/Configurabl
> 
> 
> 

I checked the path and I found the requested file. As you can see the permissions should be fine ;-)

> 
> drwxrwxrwx 2 www-data www-data 4.0K Nov 3 11:10 Configurabl
> 
> 
> 

I have no idea what to do. I'm using PHP 5.5.4-1 - so that should be fine.

Do you have any idea what to do?

Answer: 
Welcome to the tyranny of the [PHP's error control operator](http://php.net/manual/en/language.operators.errorcontrol.php). Where by tyranny I mean minor annoyance in the grand scheme of things. 

All those console errors are driven by exceptions. If you search the Magento Connect source in `downloader`, you'll find the exception text 

> 
> Failed to open file 
> 
> 
> 

is only used in three places

```
$ ack 'Failed to open file'
lib/Mage/Archive/Helper/File/Bz.php
47:            throw new Mage_Exception('Failed to open file ' . $this->_filePath);

lib/Mage/Archive/Helper/File/Gz.php
44:            throw new Mage_Exception('Failed to open file ' . $this->_filePath);

lib/Mage/Archive/Helper/File.php
190:            throw new Mage_Exception('Failed to open file ' . $this->_filePath);

```

If you look at each of those places, you'll see a similar pattern

```
protected function _open($mode)
{
    $this->_fileHandler = @bzopen($this->_filePath, $mode);

    if (false === $this->_fileHandler) {
        throw new Mage_Exception('Failed to open file ' . $this->_filePath);
    }
}

protected function _open($mode)
{
    $this->_fileHandler = @fopen($this->_filePath, $mode);

    if (false === $this->_fileHandler) {
        throw new Mage_Exception('Failed to open file ' . $this->_filePath);
    }
}

protected function _open($mode)
{
    $this->_fileHandler = @gzopen($this->_filePath, $mode);

    if (false === $this->_fileHandler) {
        throw new Mage_Exception('Failed to open file ' . $this->_filePath);
    }
}

```

The developers who built Magento Connect used the `@` operator to suppress the real PHP errors that emit from `gzopen`, `fopen`, and `bzopen`. 

If I was in your situation, I'd temporarily edit these files to remove the `@` operator from these function calls, and then check my error logs/browser output to see why PHP didn't want to open these files.
The actual issue here is that Magento Connect has an issue when using php 5.5 - its to do with path length, Only started once I updated to 5.5 this week. - if this is your issue (check your php version) you have 2 options : You can install the extension manually or downgrade your php version.

I don't have enough cred points to vote up an answer but I thought it best let people know that ravi patel's TRIM solution fixed my issue.