Web developer - Web analytics specialist

How to Solve Magento 500 Internal Server Errors

Many users encounter some weird Magento 500 Internal Server Errors (Error type 500). I will try to list the most common solutions. These errors are not always caused by the same reason. You should try to take a look at your server’s error logs to get some help about this error.

You can get additional info about the errors by Turning on Developer Mode. Look in the Magento bootstrap file (index.php), you’ll see lines similar to the following

#Mage::setIsDeveloperMode(true);
#ini_set(‘display_errors’, 1);

Uncomment these. In a production system, you’d never want to have your errors display to the browser, but while developing having an errors and warnings thrown immediately in your face is invaluable. This way, you will see the actually problem which lead to the Internal Error Server. In almost cases, the reason is that there is an exception throw after output is sent to browser.

Solution #1

This error might be caused because you have not set the correct permissions for the magento folders. To solve this go to File Manager and then change the file permission of index.php file from 664 to 644.  Also change the permissions of downloader/index.php file to 644 as well otherwise when you will try to access System > Magento Connect >Magento Connect Manager (after magento installation) by logging to magento admin,  you will get 500 Internal Server Error.

You can also try this tool, it’s a magento cleanup utility. It will set the correct permissions for your complete magento installation:

  1. Download it
  2. Unzip magento-cleanup.php to the root directory of your magento installation
  3. Browse to http://yourdomain.com/magento/magento-cleanup.php

Solution #2

Your server does not support some of the magento specifications. You can easily test this using the magento check utility. Follow the steps below to check your server’s software, if there is an incompatibility this utility will show it.

  1. Download it
  2. Unzip magento-check.php to the root directory of your magento installation
  3. Browse to http://yourdomain.com/magento/magento-check.php

Solution #3

If you are getting weird 500 internal server errors on specific pages of your site, it might be a matter of resources. I was getting internal server erros on some product pages and on the http://yourdomain.com/checkout/onepage. I found out that the .htacess file of my magento installation was somehow reset and the php_value memory_limit value was set to 32M as soon as I raised it, the internal server errors vanished! You should use at least 256M for over 600-700 SKUs. Magento is very resource hungry and it is easy to get these kind of errors if you try to save some bucks from the hosting.

Solution #4

Htaccess file which is located at Magento root folder. It will be this case if you meet Internal Server Error on every page. Try to remove it for testing purpose
If your website was running file for a long time, then it must be a change at Server side, just submit a ticket to Hosting Company.

Solution #5 (Comment from Huberto)

If the curl extension is missing you can get 500 Internal server error. You can install it using the command below:
apt-get install curl libcurl3 libcurl3-dev php5-curl

Written By

91 Comments

  1. Hi
    Your first solution worked 4 me.
    Thanx

    0
    1. Yes, it worked, using Solution #1.

      As I am a amature running Magento 1.9.0.1, I did a backup database from System>Tools>Backup> Database and Media Backup, after running that it went blank and the next thing I know, it appears Internal server 500.

      Lucky for this tutorial here, it’s up and running again. I was having cold sweat for the past few hours looking for solution and getting help.

      Never run the back up in the Magento itself.

      Kudos to TeachJam!

      0
    2. Solution #1 worked for me!

      0
    3. thanks for this , i have solved my problem by the file permisssion , i changed my file permission of the index file from 666 to 644. thnks you very much.

      0
    4. Thanks ..Magento Internal server error 500 resolved issue solution

      0
  2. Salil Kalghatgi

    Solution 4!!!!!!
    I had magento running on a subdomain with Joomla on the main domain. tried all the database, memory, and permission configs, deleting the magento .htaccess worked like a charm. thanks a lot

    0
  3. Solution 4 work for me.

    I delete .htaccess file.

    Is there any reason to but it back to root folder? Does the website need it for some reason to to work?

    0
    1. Yes, the htaccess file is used to set php variables, permission settings and many other important stuff.

      0
    2. Anderson Possamai

      For me too! Magen CE 1.7

      0
  4. Hi,

    If the cURL extension is not installed, you receive an error screen 500 in admin.

    apt-get install curl libcurl3 libcurl3-dev php5-curl

    0
    1. Thanks for the addition 😉

      0
  5. First tip of enabling error messages was the key to solve my problem. I would never figure out that I had to make the ENTIRE /var directory writable (including its contents). Magento Wikis and instructions doesn’t say that.

    0
    1. I had a problem where my website cannot be indexed by Google and returned error 500.
      The above comment worked for me. But can somebody PLEASE explain to me why merely enabling the error message fixed crawling error?

      Thanks!

      0
  6. Thank you man! The solution with magento-cleanup tool worked like a charm.

    0
  7. I have internal server error (500) when click for example on Google search on product url… but if I see the page product from site from categories and then to click on the same product and the same url.. the url product page is ok.. The magento site is in multistore, the rewrite url is active, the php_value memory_limit is to 256 MB.. The is on external click of url but only the product url: http://www.domainname.com/en/nome-prodotto.html, the click on page url not direct for example http://www.domainname.com/en/name-categorie/name-product.html is ok. The canonical option is active. Can you help me?

    0
    1. if you want you can send a couple of actual links with this to my email and I can try to take a look 😉

      0
      1. hello !
        I had install magento 1.8.0.0 alpha version ,after using it for 30 min ,
        I am facing some problem after clicking the manage category option in catalog ,on clicking the manage category the next page which is supposed to be manage category page where we can add ,edit the category will come but i found some other kind of stuff …this stuff contains a page with field like…page 1 of pages

        0
        1. i have a snapshot of that other page please help to get over this error

          0
          1. Hi, I’m not sure what your problem is. if you send me a url I can take a look…

            0
  8. Cleanup tool worked like a charm
    Thanks

    0
  9. I made the magento-cleanup solution but my site ended up having errors and now I can’t access my site anymore. error says

    Can’t retrieve entity config: core/store_group

    and all other errors. can I revert the cleanup?. any solution on this one?. thanks.

    0
    1. Did you keep a backup? if you did you can use it to restore your installation.
      If not check that app/code/core/Mage/Core/etc exists and is not corrupted. Check other files under app/code/core/Mage/Core or restore it from the original Magento distribution.

      0
  10. I have enabled some login in Mage::DispatchEvent for debugging. It caused me getting 500 error when I save config. ONLY with saving config, but actual data was saved succesfully. When I removed the loging, everything is fine. I wonder why

    0
  11. Hallo,

    got the same issue on the downloader.
    For me the solution was a to high memory_limit. I think suhosin don’t like it. So I reduced the memory limit to 1024M and everything works.

    Cheers,
    Matthias

    0
  12. Thank you man. You helped me a lot.

    0
  13. Hello, like everyone else in this post im stuck on that 500 internal server error. Last weekend i add my paypal account info, and everything was great. Like 1 hour after that i was changing some .cvs fiiles and then the nightmare started.

    Every time i try to buy something everything is ok until my shopping cart webpage, once there when i press the PROCEED to CHECOUT, i get this error.

    Fatal error: Class ‘Mage_Checkout_Controller_Action’ not found in /var/www/vhost/goclick.es/home/html/staging/app/code/core/Mage/Checkout/controllers/OnepageController.php on line 29

    I have magento 1.7.0.2, and well, if anyone here have an idea about what to do i want to thank you in advance. o.o /

    0
  14. thanks solution1 saved my day..thanks a lot buddy

    0
  15. 1ª Solução perfeita. Parabéns e obrigado !

    0
  16. great article,very help full , thank you for Solution #1 🙂

    0
  17. Thank you very much! The permission tool works greatly!

    0
  18. Thanks! very help full , thank you for Solution #1

    0
  19. Thanks! You saved my neck with this solution!

    0
  20. Hey there, thanks for the fixes. Many 500 Internal Server Errors occur if you have some files missing. I’ve met alot of these 500 Errors, and most of the time there were a files missing.

    Check your app/code/core folder for missing files, this often helps!

    Thanks for the file which fixes the permissions. Helped for me!

    0
    1. Thanks for sharing mate! 🙂

      0
  21. Hi, thanks for this article. I in the first solution you suggest changing permissions for the downloader/index.php I changed the perms to 0644 form 0777, and I cleared the Magento Cache, but I still get the 500 error when trying to access the Magento Connect Manager, this is the only error message I get.

    Is there anything else I can do to try and clear this issue, I really need to install an extension, and I cannot do this until I get the Magento Connect Manager working…any ideas would be warmly received.

    0
    1. I have now managed to solve the problem for myself. Although I got the exact answer from another source, this article prompted me to look in the right place, so thanks for that. 🙂

      0
      1. I’m glad this was helpful 🙂

        0
    1. Thanks for the heads up Dan. Although it would have been nice to refer the original link 🙂 It’s fine. Let’s share the knowledge 🙂

      0
  22. Good replies in return of this matter with solid arguments and explaining
    all concerning that.

    0
  23. A great post. Thanks man.

    0
  24. I am so happy i came across your solutions… i was just having 500 errors all the time and i was sick of it.
    Thank you so much!!

    0
  25. Hi Dear

    I am new to mangento, and face problem of exporting 4499 products via system, dataflow, export all product but get 500 error.
    I check many solution but did not work for me. kindly let me know what is problem

    reply me please on sarfaraz@qh-enterprises.com

    Regards

    0
  26. I really like this and it has helped me during some of my troubleshooting sessions. Especially Solution 3 & 5 where head breakers I forgot.

    Do you mind If I translate this to Dutch and put it on my site?

    Thank you,

    0
    1. No problem. Just mention the URL as the source 🙂

      0
  27. Thanks so much for this post – solution 1 worked a treat!

    0
  28. Pingback:How to Solve Magento 500 Internal Server Errors: | linuxcpanelsolutions

  29. Thanks . This post was really helpfull. Keep posting.

    0
  30. Pretty much valuable info! Solving Magento 500 internal server errors, explained in such easy-to-understand dialects; explanation given on is much detailed as well; appreciate it.

    Reasons behind it are not same all the time; seeing the server’s error logs can certainly be a big help to us; yes finding some anonymity; great!

    0
  31. Hi,

    I just installed latest magento version and testing it at the moment. I am getting 500 internal server error on almost every step on both frontend and backend.
    I applied all the above solutions but could not get sorted the issue and now looking for your help. Please help me to resolve the issue and I will be really thankful to you.

    Many Thanks
    Kazmi
    URL: http://WWW.QHAOUTLET.COM

    0
  32. solution 2 is great.

    0
  33. thanks alot you saved me!!

    0
  34. Solutions 1 is working fine for me.

    Thanks

    0
  35. i got the error on product pages which use “custom option” only. I have applied everything as above but still same. Please help me. thank you.

    You try these link which have “custom option”

    http://reiss.my/english/reiss-products/uv/uv-beauty-cream-33.html
    http://reiss.my/english/reiss-products/scrub/gel-scrubs.html
    http://reiss.my/english/reiss-products/uv/vita-e-luminous-33.html

    0
  36. The .htaccess solution willl not help if the server settings are lower than you choose.

    you should all learn more about m2e pro if you really want to start making the most of magento http://www.magentodedicatedserver.com/m2e-pro-hosting/

    the way to dump your DB the fast way is

    mysqldump -u root -p MAGENTOdbNAME > ./mg.sql

    then import like this

    mysql -u root -p NewMAGENTOdbNAME < ,/mg.sql

    0
  37. just been sent here by my developer, thanks solution 2 worked for me. Great post

    0
  38. Hello,

    I tried all solutions but it dosn’t work.

    0
  39. no solution worked. plz help
    when i select any page i’m getting

    Internal Server Error

    The server encountered an internal error or misconfiguration and was unable to complete your request.

    Please contact the server administrator and inform them of the time the error occurred, and the actions you performed just before this error.

    More information about this error may be available in the server error log.
    Apache Server at excrin.com Port 80

    0
  40. This worked for me:

    In .htaccess file I commented out the SecFilterEngine and SecFilterScanPOST in the mod_security section:

    ###########################################
    # disable POST processing to not break multiple image upload

    # SecFilterEngine Off
    # SecFilterScanPOST Off

    Give it a try…

    0
  41. i tried bt i’m getting same error! help!

    0
  42. The solution No.1 solved my issue. Thank you a lot.

    0
  43. Solution 1 works super…

    0
  44. solution #4 worked for me, completely forgot about the htaccess file. another thing I had to do was reindex via shell as unable to access admin, that could be added as a possible solution to solve problems too.

    0
    1. Can you please share with me a few details on the steps you followed to re-index the via shell? I would love to add this in the original article.

      0
  45. Dear Sir,

    As I am a amature running Magento 1.9.0.1, I did a backup database from System>Tools>Backup> Database and Media Backup, after running that it went blank and the next thing I know, it appears Internal server 500.
    So pls tell me magento installation file means which file

    0
  46. Solution #3 works for me, I was getting error on loginPost page, its shows blank page and by checking on firebug its shows 500 internal server error,

    my memory limit was already set to 512M and I increased it to 1024M and I got it working.

    I am not sure why too much memory, as I don’t have that much products on my site may be few hundred.

    but have got it working thanks. 🙂

    0
  47. Thank you, thank you, thank you!

    0
  48. Yes, Solution #1 is worked for me

    0
  49. Solution #1 solved my issue. Thank you!

    0
  50. Hi, Solution 3 worked for me. Thanks you !

    0
  51. 1st solution magic thanks for sharing 🙂

    0
  52. First solution worked for me.

    Thank you very much

    0
  53. Just in case!
    I fixed doing this on debian (ubuntu will be the same)
    sudo apt-get install php5-mcrypt
    sudo php5enmod mcrypt
    sudo /etc/init.d/apache2 restart

    0
  54. If you are running Magento on an Nginx solution, check the /etc/lib/nginx and /etc/lib/nginx/tmp folder permissions.

    0
  55. It helped me a lot…..thank you!

    0
  56. Hi!
    Solution #1 is working
    thanx a loooot

    0
  57. I had a Error 500 as well and took forever to find the problem but I fixed it by doing the following (not sure why it worked but it did 🙂 )

    Go to your Cpanel and change the PHP version (my case from 5.4 to 5.5) and then change it back. Reload the website and Bingo!

    0
  58. If you are moving from a live to dev, also check your local.xml. I had memcache and redis running and had to remove and take to a stock layout.xml to work.

    0
  59. Pingback:500 Internal Server Error in store page - MagentoHub

  60. I tried to take backup from admin area. Oh! then it was showing error message ” internal server error”. I wasted my few hours from my outsourcing work but fanally I solve with the of solution -1,

    Thanks for the post.

    mmr

    0
  61. Thanks a lot. #1 solution worked for me 🙂

    0
  62. Solution #1 did the trick! Thank you so much!

    0
  63. Pingback:Magento 1.9 Error: Have I been hacked? * VPN SSL Online

  64. Pingback:Magento: There has been an error processing your request, Error log record number * VPN SSL Online

  65. Pingback:Magento error: Mage registry key "controller" already exists * VPN SSL Online

  66. Hi i just tried all steps non of them worked then as per a magento experts advice a friend of mine told me to go to includes/config.php

    at the end of the file you should see these 2 lines that are to be in same as given below

    #define(‘COMPILER_INCLUDE_PATH’, dirname(__FILE__).DIRECTORY_SEPARATOR.’src’);
    #define(‘COMPILER_COLLECT_PATH’, dirname(__FILE__).DIRECTORY_SEPARATOR.’stat’);

    in my case ” # ” was missing that made the compilation tool to not work so it gave the error HTTP 500 on my magento admin backend & frontend both i am using ver. 1.9.2.4

    0
  67. Solution #1 did the trick! Thank you so much!

    0
  68. Solution #1 works for Error 500. Thank You, Guys!

    0
  69. Thx,
    I will try the following extension
    – magento-check
    – magento-cleanup

    0
  70. After I download file from #Solution 2, it show result like below:

    Congratulations! Your server meets the requirements for Magento.

    You have PHP 5.2.0 (or greater)
    Safe Mode is off
    You have MySQL 4.1.20 (or greater)
    You have the curl extension
    You have the dom extension
    You have the gd extension
    You have the hash extension
    You have the iconv extension
    You have the mcrypt extension
    You have the pcre extension
    You have the pdo extension
    You have the pdo_mysql extension
    You have the simplexml extension

    0
  71. I can’t get the magento-cleanup tool to work. The permissions aren’t set. How do I get this to work. I have direct admin acces but don’t have ssh-access available. What can I do to get this to work?

    0

Leave a Reply

Your email address will not be published. Required fields are marked *