cancel
Showing results for 
Search instead for 
Did you mean: 

Magento Connect Manager 404 ERROR

Magento Connect Manager 404 ERROR

i am not able to open magento connect manager

404 error. I saw in some forum to change the permission but i don't know how to do ?

3 REPLIES 3

Re: Magento Connect Manager 404 ERROR

Hi @Sikky

 

Try to run Magento Cleanup File from the root of your Magento store and the error will be fixed.

Was my answer helpful? You can accept it as a solution.
175+ Professional Extensions for M1 & M2
Need a developer?Just visit Contact Us Now

Re: Magento Connect Manager 404 ERROR

how do you run Magento clean up file from the root. I am not a developer so I didn't understand this. can you please clarify?

 

Thanks

Re: Magento Connect Manager 404 ERROR

Hi,

To run cleanup, create cleanup.php file in your root and add following code in cleanup.php

 <?php

## Function to set file permissions to 0644 and folder permissions to
0755

function AllDirChmod( $dir = "./", $dirModes = 0755, $fileModes = 0644 ){
   $d = new RecursiveDirectoryIterator( $dir );
   foreach( new RecursiveIteratorIterator( $d, 1 ) as $path ){
      if( $path->isDir() ) chmod( $path, $dirModes );
      else if( is_file( $path ) ) chmod( $path, $fileModes );
  }
}

## Function to clean up the contents of specified directory

function cleandir($dir) {

    if ($handle = opendir($dir)) {
        while (false !== ($file = readdir($handle))) {
            if ($file != '.' && $file != '..' &&
is_file($dir.'/'.$file)) {
                if (unlink($dir.'/'.$file)) { }
                else { echo $dir . '/' . $file . ' (file) NOT deleted!<br />'; }
            }
            else if ($file != '.' && $file != '..' &&
is_dir($dir.'/'.$file)) {
                cleandir($dir.'/'.$file);
                if (rmdir($dir.'/'.$file)) { }
                else { echo $dir . '/' . $file . ' (directory) NOT deleted!<br />'; }
            }
        }
        closedir($handle);
    }

}

function isDirEmpty($dir){
     return (($files = @scandir($dir)) && count($files) <= 2); }

echo "----------------------- CLEANUP START ----------------------- --<br/>"; $start = (float) array_sum(explode(' ',microtime())); echo "<br/>*************** SETTING PERMISSIONS ***************<br/>"; echo "Setting all folder permissions to 755<br/>"; echo "Setting all file permissions to 644<br/>"; AllDirChmod( "." ); echo "Setting pear permissions to 550<br/>"; chmod("pear", 550);

echo "<br/>****************** CLEARING CACHE ******************<br/>";

if (file_exists("var/cache")) {
    echo "Clearing var/cache<br/>";
    cleandir("var/cache");
}

if (file_exists("var/session")) {
    echo "Clearing var/session<br/>";
    cleandir("var/session");
}

if (file_exists("var/minifycache")) {
    echo "Clearing var/minifycache<br/>";
    cleandir("var/minifycache");
}

if (file_exists("downloader/pearlib/cache")) {
    echo "Clearing downloader/pearlib/cache<br/>";
    cleandir("downloader/pearlib/cache");
}

if (file_exists("downloader/pearlib/download")) {
    echo "Clearing downloader/pearlib/download<br/>";
    cleandir("downloader/pearlib/download");
}

if (file_exists("downloader/pearlib/pear.ini")) {
    echo "Removing downloader/pearlib/pear.ini<br/>";
    unlink ("downloader/pearlib/pear.ini"); }

echo "<br/>************** CHECKING FOR EXTENSIONS ***********<br/>"; If (!isDirEmpty("app/code/local/")) {
    echo "-= WARNING =- Overrides or extensions exist in the app/code/local folder<br/>"; } If (!isDirEmpty("app/code/community/")) {
    echo "-= WARNING =- Overrides or extensions exist in the app/code/community folder<br/>"; } $end = (float) array_sum(explode(' ',microtime())); echo "<br/>------------------- CLEANUP COMPLETED in:". sprintf("%.4f", ($end-$start))." seconds ------------------<br/>"; ?>


Now make call to that file from your browser using http:// your domain.com/ cleanup.php.

Thanks
Jignesh Aakoliya
http://www.ifourtechnolab.com