Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

Fatal error: Class ‘Mage’ not found + 500 Internal Server Error party
 
dlachasse
Jr. Member
 
Avatar
Total Posts:  8
Joined:  2011-10-04
 

I just upgraded from 1.7.0.0 to 1.7.0.2 via Magento Connect and am receiving all sorts of fun errors. I’ve searched pretty thoroughly and haven’t come up with any answers, but maybe I’m just bad at searching - you tell me.

The problem seems to be file permissions, and unfortunately I can’t even run the magento-cleanup file. I get a 500 Internal Server Error when I try to run it (it’s currently set at 644, I’ve also tried 777 and 666). I’ve cleared the var/cache/ and var/session and tried replacing the .htaccess with a clean version. I ran from the root dir:

find . -type f -exec chmod 644 {} \;
find . -type d -exec chmod 755 {} \;

That didn’t fix it either. My greatest success so far has been to receive an error on the index.php page which reads “Fatal error: Class ‘Mage’ not found in ‘xxxx’ on line 87”. I just checked the Apache log and found “Request exceeded the limit of 10 internal redirects due to probable configuration error. Use ‘LimitInternalRecursion’ to increase the limit if necessary. Use ‘LogLevel debug’ to get a backtrace.” I assume these are connected. But I have no idea how. Anybody else coming across this issue or have ideas for a fix?

 
Magento Community Magento Community
Magento Community
Magento Community
 
rgregorywest
Jr. Member
 
Total Posts:  5
Joined:  2012-06-01
 

The same thing has happened to me on an upgrade from 1.7.0.0 to 1.7.0.2.  Someone help please!

Thanks,

Greg

 
Magento Community Magento Community
Magento Community
Magento Community
 
dlachasse
Jr. Member
 
Avatar
Total Posts:  8
Joined:  2011-10-04
 

I just was looking back over some of the files and it looks like Connect Manager never finished writing all of the files to the server as there are some empty files sitting there. One of them being ./app/Mage.php. I replaced that with the most recent version and that seems to fix the “Fatal error: Class ‘Mage’ not found” error. But now it’s just a blank page, and no server error logs. Is there any way to trace these empty files so I can replace them - assuming there aren’t hundreds of them, that is.

Greg, see if replacing that Mage.php file is able to fix anything for you.

 
Magento Community Magento Community
Magento Community
Magento Community
 
rgregorywest
Jr. Member
 
Total Posts:  5
Joined:  2012-06-01
 

OK.  I tried replacing the Mage.php and still I am getting the 500 error.

I was able to finally run clean up by running it through SSH.  It runs but with warnings about a file not being found on line 45 of the code.

Greg

 
Magento Community Magento Community
Magento Community
Magento Community
 
rgregorywest
Jr. Member
 
Total Posts:  5
Joined:  2012-06-01
 

Another victim!

http://stackoverflow.com/questions/11362640/magento-1-7-0-2-upgrade-from-1-6-2

 
Magento Community Magento Community
Magento Community
Magento Community
 
rgregorywest
Jr. Member
 
Total Posts:  5
Joined:  2012-06-01
 

My problem is solved.

Turns out my index.php file was set to 666.  Ran a chmod to change it to 755 and all is well again!

 
Magento Community Magento Community
Magento Community
Magento Community
 
dlachasse
Jr. Member
 
Avatar
Total Posts:  8
Joined:  2011-10-04
 

YES! Great success. It looks like I had a different issue Greg. But hopefully this will help someone else out. I found that the Connect Manager did not successfully write all of the files back to my server when upgrading. There were countless empty files littered throughout various directories. So in hopes of it rewriting everything via SSH, I decided to force re-upgrade with:

./mage install community Mage_All_Latest --force

Then, reset folder permissions with:

find . -type f -exec chmod 644 {} \;
find . -type d -exec chmod 755 {} \;

You may need to clear your cache/session folders, but I doubt it.

 
Magento Community Magento Community
Magento Community
Magento Community
 
rgregorywest
Jr. Member
 
Total Posts:  5
Joined:  2012-06-01
 

During my quest for a solution, I had also forced a manual update as well.  I used SSH and went into the downloads directory and typed “php mage.php upgrade-all”.  Like you I had originally used Magento Connect and I am pretty sure I had a lot of incomplete files as well.  So, it was probably the combination of things that fixed the problem.

I would say that your solution is the most complete for anyone who has a similar problem.

Greg

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top