Need help?

Our experts have had an average response time of 11.7 minutes in August 2021 to fix urgent issues.

We will keep your servers stable, secure, and fast at all times for one fixed price.

How we fix Moodle 500 internal server error for you

by | Aug 29, 2019

Moodle is one of the best open-source learning platforms. While navigating through Moodle have you got a message “500 internal server error”?

Moodle 500 Internal server error usually occurs due to the bad rewrite rules, wrong PHP settings, etc.

At Bobcares, we often fix this error for our customers who use Moodle, as a part of our Server Management Services.

Today let’s see this error in detail and discuss the ways our Support Engineers solve this for our customers.


What is Moodle 500 internal server error?

Moodle (modular object-oriented dynamic learning environment) is a free, open-source learning platform that uses PHP as a programming language. Again, 500 Internal Server Error is a server-side error. This code means that something has gone wrong on the webserver. But the server cannot specify the exact problem.

From our expertise in managing Moodle, the major possibilities for this error include:


1. Wrong rewrite rules

By default, any syntax error in the .htaccess or httpd.conf files leads to an internal server error. Similarly, the incompatible directive also causes this error. That is, it happens when we add the wrong directive in .htaccess or httpd.conf files.


2. Incorrect PHP settings

In the same way, incorrect PHP settings can also cause Moodle 500 errors.

For example, PHPsuexec is an Apache module used to increase the security of the site on the hosted system. Here the server does not support .htaccess files.

Any change in permission or ownership of the moodle directory also results in an error. Here you may also see a 403 Forbidden error.


How we fix the internal server error?

So far we have seen the reasons for the 500 error. Every reason points to bad settings in server-side files. When our customers face such an error, our Support Team begins checking by enabling debug mode.

For this, we,

  1. Log in to Moodle.
  2. Navigate to Site admnistration>>Development>>Debugging.
  3. Enable the checkbox ‘Display debug messages’.
  4. Choose the option ‘ALL: Show all reasonable PHP debug messages’ from the drop-down at


Enable debugging in Moodle


After making these changes our Support Engineers check for the logs. Logs give the exact reason for the error.

Now let’s see the fixes for two major causes:


1. Fixing rewrite rules

Our experts check the .htaccess or httpd.conf files and correct the syntax error.

They also check for the directive, if it was found incompatible with the server version, they fix it for our customers.


2. Correcting the PHP settings

Some customers use PHPsuexec, which does not support .htaccess file. Additionally, the error may be with permissions of the moodle directory.

So, our Dedicated Engineers set permissions of script folders to 755 using the command

chmod -R -type d 755 moodle

Here we use a php.ini file instead of a .htaccess in the moodle directory. The syntax used in the php.ini file is different from that of a .htaccess file.

[ Need help in fixing Moodle internal server error – We will fix it for you ]



In short, Moodle 500 internal server error is a server-side error. It happens mainly due to error in the .htaccess file, wrong permissions, etc. We saw other possible causes of errors and how our Support Engineers fixed it for our customers.


Never again lose customers to poor server speed! Let us help you.

Our server experts will monitor & maintain your server 24/7 so that it remains lightning fast and secure.


var google_conversion_label = "owonCMyG5nEQ0aD71QM";


  1. Raheel

    Hi, our moodle server is working fine. Sometimes it gives us 500.0 error.
    Could you please suggest any solution.
    Or could you please confirm, that above mentioned solution is for the same issue I am encountering.

    • Sijin George

      Hi Raheel,
      Moodle 500 errors can happen due to multiple reasons. We need to check the Moodle and server settings. We’ll be happy to talk to you on chat (click on the icon at right-bottom).


Submit a Comment

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

Privacy Preference Center


Necessary cookies help make a website usable by enabling basic functions like page navigation and access to secure areas of the website. The website cannot function properly without these cookies.

PHPSESSID - Preserves user session state across page requests.

gdpr[consent_types] - Used to store user consents.

gdpr[allowed_cookies] - Used to store user allowed cookies.

PHPSESSID, gdpr[consent_types], gdpr[allowed_cookies]


Statistic cookies help website owners to understand how visitors interact with websites by collecting and reporting information anonymously.

_ga - Preserves user session state across page requests.

_gat - Used by Google Analytics to throttle request rate

_gid - Registers a unique ID that is used to generate statistical data on how you use the website.

smartlookCookie - Used to collect user device and location information of the site visitors to improve the websites User Experience.

_ga, _gat, _gid
_ga, _gat, _gid


Marketing cookies are used to track visitors across websites. The intention is to display ads that are relevant and engaging for the individual user and thereby more valuable for publishers and third party advertisers.

IDE - Used by Google DoubleClick to register and report the website user's actions after viewing or clicking one of the advertiser's ads with the purpose of measuring the efficacy of an ad and to present targeted ads to the user.

test_cookie - Used to check if the user's browser supports cookies.

1P_JAR - Google cookie. These cookies are used to collect website statistics and track conversion rates.

NID - Registers a unique ID that identifies a returning user's device. The ID is used for serving ads that are most relevant to the user.

DV - Google ad personalisation

IDE, test_cookie, 1P_JAR, NID, DV, NID
IDE, test_cookie


These are essential site cookies, used by the google reCAPTCHA. These cookies use an unique identifier to verify if a visitor is human or a bot.