Windows server: 500: Internal Server Error

Windows server: 500: Internal Server Error

by Daniel White -
Number of replies: 5

After having muliple problems with using MSSQL with Moodle I finally decided to ditch the whole thing and go with MySQL like Moodle wants. However, I'm finding this to be even more problematic!

I have installed MySQL and verified it is working correctly with phpMyAdmin. I run the install.php and everything runs fine, it creates the config.php and I can see the settings in the file. However, when clicking continue after the creation of the config.php file, Moodle completely falls over when it tries to go to index.php with a 500 Internal Server Error. When you turn off the friendly error pages in IE, all you get is a blank page. If you try and run install.php again, it will not run until you have deleted the config.php file.

Any suggestions?

Average of ratings: -
In reply to Daniel White

Re: Windows server: 500: Internal Server Error

by Daniel White -

Forgot to mention.

The server is running the lastest version of Moodle, PHP and MySQL. PHP/Moodle is running under IIS.

I have checked the knowledgebase about 500 errors but the answers are only useful for people running Apache, not IIS!

In reply to Daniel White

Re: Windows server: 500: Internal Server Error

by Richard Enison -
DW,

Believe me, MySQL with Moodle is nowhere near as problematic as MSSQL. I have been reading this forum (and the Installation Problems Forum) almost two years and seen waaaaaaaaaaaaaaaaay more problems with MSSQL than MySQL.
  1. I don't know offhand what the cause of your 500 error is, but I know it is an HTTP error. It has to do with web serving, not databases (db's). It is highly unlikely that your db has anything (directly at least) to do with this error.
  2. The fact that install.php won't run unless you delete config.php just means it is doing exactly what it is supposed to do. The purpose of install.php is to create config.php. Once that is done there is no point in running it again. The first eight lines or so in install.php contain code that simply checks to see if config.php exists; if it does, it redirects to index.php. Likewise index.php (in the main directory) contains code that does the same thing, except that it redirects to install.php if config.php does not exist. That's why when you first install Moodle and you type the URL of the main directory into the address box in your browser (IE in your case), it runs install.php.
  3. Apache and IIS are both web servers. Therefore they have similar functions, they just do them a little differently. The main differences are in the user interface. So while the remedies for HTTP problems like error 500 may appear to be applicable only to Apache, there is probably a counterpart in IIS for every action relating to Apache. For example, #1 syntax error, theoretically, could occur in an XML file with IIS, especially version 7, that corresponds to the httpd.conf file with Apache, but it is true this is less likely since most IIS users do not code the XML file by hand but use the GUI interface IIS provides with menus and dialog boxes. The same applies to #3, incompatible directives.
  4. Once config.php is created, control passes to admin/index.php, where the tables in the db are created. It seems to be at that point the error occurred. I don't know if the db server, mysqld, not running would cause that (I would think it would cause a different error), but is it possible that it wasn't? Your web server and db server both need to be running before starting the installation process. If so, it might be of some small interest to see if any tables have been created yet.
  5. Check with your IIS docs/help screens/tech support/IT Dept. on error 500.
  6. See also the FAQ on blank pages.
RLE
In reply to Richard Enison

Re: Windows server: 500: Internal Server Error

by Daniel White -

Hi RLE,

Thanks for your help.

In the end, I couldn't work out what was causing the problem so I just blew the server away and started again!

The joy of Virtual Servers!

Seems to be working this time round except for the issue I've just posted for. I'm pretty sure I'm following the same steps every time but each time something else wierd and wonderful goes wrong!

In reply to Daniel White

Re: Windows server: 500: Internal Server Error

by Dave Rea -

Not sure it helps if you have moved on to another fix, but I got that when I installed it on my home pc for the first time on Sunday. After a lot of fiddling I found that I had activated IIS in windows (after reading one forum post), then found that it had taken port 80 so that apache couldn't get at it. I know you are the other way round using IIS, but is there a port doubling up going on?

No expert at all, but that's what I found

cheers

Dave

In reply to Dave Rea

Re: Windows server: 500: Internal Server Error

by Richard Enison -
DR,

Just for the record and whoever is interested: you're right about port 80. If an application is running that listens on that port, no other application can do so (the same is true of any port number). And another application that typically listens on port 80 is Skype. See Windows installation using XAMPP#Skype.

RLE