Installing 2.6.5+ on BlueHost - Internal Server Error during install

Installing 2.6.5+ on BlueHost - Internal Server Error during install

by Matt Jordan -
Number of replies: 14
Hi all,

I am kind of new to this so I am very confused. The company I work for wants to install moodle for some corporate training. I had an old laptop so I installed Ubuntu 14.04LTS on it and got an instance of moodle up and running. So I know that I have been able to successfully follow the installation instructions before. Now that the company is hosting a dedicated server from BlueHost with CentOS 6.5 I can not seem to get moodle to install correctly. I have been google-ing and searching this forum all day but can't seem to get things worked out. Here are my steps...

  • Download moodle-latest-26.zip and used filezilla to upload it to the public_html directory where I unzipped it.
  • Create a moodledata folder in the home directory of the server and set permissions to 0777.
  • Create a new database and user with all privileges using the BlueHost database manager. I verified the login in the terminal.
  • Go to mydoman.com/moodle/ and start the web based install.
  • Enter the directory paths of the file locations, select improved MySQL.
  • Enter Database info localhost, correct username and password, table prefix as mdl1_, database port and socket left blank.
  • Accept the copyright notice.
  • PHP check comes up. intl and opcache complain, but this is because I am on php 5.4 right?
  • Clicking continue brings up an internal server error "The server encountered an internal error or misconfiguration and was unable to complete your request."

So what am I configuring wrong that this is happening? It seems like it may be something with my .htaccess file but I don't know what is wrong.

Server Specs:
CentOS 6.5
Apache 2.2.27
MySQL 5.5.37
PHP 4.5.28
Moodle 2.6.5+
Firefox 33.0


Average of ratings: -
In reply to Matt Jordan

Re: Installing 2.6.5+ on BlueHost - Internal Server Error during install

by Ken Task -
Picture of Particularly helpful Moodlers

Site is now getting an error:

"Config table does not contain version, can not continue, sorry.

More information about this error
http://docs.moodle.org/26/en/error/debug/missingconfigversion

It is usually not possible to recover from errors triggered during installation, you may need to create a new database or use a different database prefix if you want to retry the installation.
"

But before you begin, it appears you do have command line and much can be done
via terminal session.

There are some slight differences between Ubuntu and CentOS but remember, you were using Ubuntu locally and the CentOS install on Bluehost is the way they install dedicated which may not be the 'typical' way.   This to say what I share below may/may not be correct (I do run CentOS standalone servers - just colocated).   Typically, on a dedicated would thing Bluehost stuck to 'standard' install and the config file for apache is in /etc/httpd/conf/

Document root is: /var/www/html/

and it looks like there is already a home page at the domain name given.

They may have installed that .htaccess file there for some reason ... care to share what's in it?

To acquire information concerning the system here are some commands as root user:
uname -an (will show version of OS)
php -m (will show all the php modules loaded by current config
php -i (will show how php was initialized)
free - shows memory
top - shows top processes - one should see mysqld and httpd kick in from time to time.
ps aux |grep httpd - shows how many apache services have been launched and are running
ps aux |grep mysqld - shows info about mysqld process

Logs you need to check:
/var/log/httpd/error_log
/var/log/messages

/var/log/secure

There could be a mysql log in /var/log/ as well.

One might need to tweak mysql server some depending upon reason for the failed
install.

'spirit of sharing', Ken

In reply to Ken Task

Re: Installing 2.6.5+ on BlueHost - Internal Server Error during install

by Matt Jordan -

Hi Ken,

First of all, thank you for taking the time to reply. The community here is great!

uname -an results in "Linux server.elearningetc.com 2.6.32-431.29.2.el6.x86_64 #1 SMP Tue Sep 9 21:36:05 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux"

I have included php -m results and .htaccess files below.

I am trying to find the logs but the directory structure seems to be different for Bluehost. I am going to give them a call about that and the intl php extension.

In reply to Matt Jordan

Re: Installing 2.6.5+ on BlueHost - Internal Server Error during install

by Rick Jerz -
Picture of Particularly helpful Moodlers Picture of Testers

Upgrade your php to at least 5.3.3.  Needed for Moodle 2.6.5.  I see in my Bluehost's cPanel, php setting, that I can pick 5.4.  Are you sure that you only have PHP 4.5.28???

Using phpMyAdmin, make sure to change the collation (Operations tab) on the new database to utf8_unicode_ci.

You have to enable the intl php setting.  I am not quite sure where you do this.  Submit a ticket to Bluehost with this request.  I see that I have a php.ini file in my public_html folder, and it has intl enabled.  This might control the local php settings.  I'll upload mine for you to look at.

Don't worry about the opcache setting, this is just a warning.

I have Moodle 2.6 (experimental) running on my Bluehost account, so I know that it is doable.

In reply to Rick Jerz

Re: Installing 2.6.5+ on BlueHost - Internal Server Error during install

by Matt Jordan -

Hi Rick! Thanks for the reply.

So my collation was set to latin1_swedish_ci. I changed that over to utf8_unicode_ci.

I have yet to get intl added. You think that will definitely result in the failure of an install? The server check page makes it seem like that is an optional extension. Either way I will call Bluehost to get that sorted out.

I also don't seem to have a php.ini file in my public_html folder.

It is good to hear that it is possible to get moodle on bluehost! I will keep on trying the suggestions from all the users in this thread.

In reply to Matt Jordan

Re: Installing 2.6.5+ on BlueHost - Internal Server Error during install

by Rick Jerz -
Picture of Particularly helpful Moodlers Picture of Testers

I think the missing intl could cause the install to abort.

Somehow I think that I had moved that php.ini into my public_html folder.  I looked at my second Bluehost (experimental) server, and it is missing.  I don't know exactly how I discovered this, but someone/somewhere I found that I could move this php.ini (which I cannot recall where it came from) into my public_html folder to fix the problem.  I think that this then becomes the php.ini file that I edit to make other changes to my environment.

You can always add it to see if it helps.  If not, delete it.

In reply to Matt Jordan

Re: Installing 2.6.5+ on BlueHost - Internal Server Error during install

by Rick Jerz -
Picture of Particularly helpful Moodlers Picture of Testers

You got me curious about installing Moodle, so I tried installing the current 2.7.2+, just to see if it would work.  My Bluehost meets that php and mysql requirements.

Just did it, and I had success.  My intl check says okay, yet I get a subtle message saying intl should be enabled.

So right now, I have both 2.7.2+, Moodle2.6+ (Build: 20131224), and 1.9 running on this same server.  These are all experimental, so I have very few "hours" on these, so I can't say much about their stability.

In reply to Rick Jerz

Re: Installing 2.6.5+ on BlueHost - Internal Server Error during install

by Matt Jordan -

Hey Rick,


I had to walk away from the moodle project for a bit since it wasn't going anywhere, but I am still having problems. A couple questions for you....


Are you on a dedicated server from Bluehost or shared?

What directories are you installing it in?

Where do you have .htaccess files located?

EDIT: Also, which version of php do you have?


Bluehost can't seem to help me sad I have tried moodle 2.6, 2.7,and 2.8. I keep getting internal server errors!


Thanks,

Matt

In reply to Matt Jordan

Re: Installing 2.6.5+ on BlueHost - Internal Server Error during install

by Rick Jerz -
Picture of Particularly helpful Moodlers Picture of Testers

I am on a Bluehost shared server.  I follow Moodle's installation guidelines for directories: moodledata is below public_html, and moodle is within public_html (like ../public_html/moodle.)

I don't recall having to mess with .htaccess.

PHP 5.4.34.  mySQL 5.5.40, linux, Apache 2.2.29.



In reply to Matt Jordan

Re: Installing 2.6.5+ on BlueHost - Internal Server Error during install

by James B. Byrne -
If you CentOS server is in fact running 6.5 then the current httpd version should be 2.2.15-39 and php should be 5.3.3-27. What repo are httpd and php installed from or are they built locally/
In reply to James B. Byrne

Re: Installing 2.6.5+ on BlueHost - Internal Server Error during install

by Matt Jordan -

Hi James, thanks for the reply! I might have mistyped my php version initially.

httpd -v results:

Server version: Apache/2.2.27 (Unix)
Server built:   May 16 2014 05:05:30
Cpanel::Easy::Apache v3.24.18 rev9999


php -v results:

PHP 5.4.28 (cli) (built: May 16 2014 05:18:54)
Copyright (c) 1997-2014 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2014 Zend Technologies
    with the ionCube PHP Loader v4.4.1, Copyright (c) 2002-2013, by ionCube Ltd., and
    with Zend Guard Loader v3.3, Copyright (c) 1998-2013, by Zend Technologies


The repo I am using is webtatic using these instructions. I think Bluehost is blocking me somehow from updating php.



Average of ratings: Useful (1)
In reply to Matt Jordan

Re: Installing 2.6.5+ on BlueHost - Internal Server Error during install

by Philip Roy -

I had a very similar problem installing Moodle in a subdirectory with Bluehost (shared hosting, not dedicated server) and they were very helpful and got me through the issue.

Here's the one email I seem to have from them at the time as this might help...but I would contact them...

The issue you're having is because of the way we allow our customers to customize their php version per directory.   If you don't have a proper configuration in the folder you're using/installing to, the php settings will fall back to server defaults.  The public_html folder contains a .htaccess code that specifies php 5.4 should be used.  The folder you attempted installing moodle to does not have this same information in it's .htaccess file.  This is the .htaccess rewrite that allows for this function:


# Use PHP 5.4 php.ini as default

AddHandler application/x-httpd-php54 .php


If you want to create a folder called 'moodle' and add a .htaccess file to this folder with the above code, that will be most of the setup.  The only thing you need to do additionally is copy the php.ini file from public_html into the folder you created.  This will certainly get you past this error.

Hope that helps.

Phil

In reply to Matt Jordan

Re: Installing 2.6.5+ on BlueHost - Internal Server Error during install

by Usman Asar -
Picture of Plugin developers Picture of Testers

Matt, there must be Moodle available in their Mojo Marketplace as well, try installing there first, if it wents well, then you must have mistyped something during initial setup.

and opcache as well works on PHP 5.4 as I have hosts that have both PHP 5.4 and 5.5 but opcache is only available on 5.4 versions not on 5.5. that intl is international language support, if your site's english then it should'nt be an issue too, but with BlueHost/HostMonster, PHP is as well configurable even on shared  accounts, thats the thing I love about them.

as well, you MAY have to type in your .htaccess file about the PHP version you want to use, I dont remember  on top of my head but the staff will be able to give you exact command, as I remember once having issue with Moodle installation and they send me command to type into .htaccess file.

In reply to Usman Asar

Re: Installing 2.6.5+ on BlueHost - Internal Server Error during install

by Philip Roy -

Mojo installing attempts was actually the thing that repeatedly failed which then had me contact the Bluehost support team and get the info I posted earlier...just as an FYI.


Phil

In reply to Philip Roy

Re: Installing 2.6.5+ on BlueHost - Internal Server Error during install

by James B. Byrne -

The install of php on CentOS-6 provides two (at least) configuration places.  One is /etc/php.ini. The other is /etc/php.d/*.ini


When you install the php the officaial modules are enabled in specific files placed into /etc/php.d.  The, if you install the add it should just be activated, providing that the module is enumerated among the official modules.  For example take php-soap.  This in not installed with php and yet in /etc/php.d/ we see this:

# cat /etc/php.d/soap.ini
; Enable soap extension module
extension=soap.so

So, if php-soap is not installed this evidently has no effect.  If you do install php-soap at any point then it is automatically enabled when you restart the server.

If you are getting php module packages from other repositories you should check to see if they follow the same convention of if you ahve to manually provide the /etc/php.d/x.ini file yourself.