cancel
Showing results for 
Search instead for 
Did you mean: 

magento connect manager error: Class 'Mage' not found in Controller.php on line 835

magento connect manager error: Class 'Mage' not found in Controller.php on line 835

Struggled fo serveral days, but not solved.

 

get error when clicking magento connect manager in backend

              PHP Fatal error: Class 'Mage' not found in "/abc/downloader/Maged/Controller.php on line 835"

The error also ocurred when just access http://domainname/downloader

 

 The same code works for another host with OS Ubuntu.  The error host is CentOS release 6.5

 

It is not a privilege problem. I run chmod -R a+rwx * to change privilege of all folders in testing environment, but error still exis.

 

By tracing /abc/downloader/Maged/Controller.php on line 835

It is invoking Mage::setIsDownloader();

Before that line is

     include_once $this->getMageFilename();

Controller.php works.  I add a line of output of he variable $this->getMageFilename();, it shows "/abc/app/Mage.php"

 

And I write a test php and put it in downloader folder. It works:

 

echo "hi";

include_once('/abc/app/Mage.php');

 

echo Mage::getVersion();

 

 The test php works. When accessed by http://.../downloader/test.php   It can output  

   hi1.7.0.2

 

I also tried to add include_once('/abc/app/Mage.php');  manually in index.php of downloader folder, but fails.

Any hint to further trace the peoblem?

 

Thanks!

1 REPLY 1

Re: magento connect manager error: Class 'Mage' not found in Controller.php on line 835

Did you get any solution for this? I am also facing the same while installing Magento 1 in windows system.