Install on Web Server/http headers

Install on Web Server/http headers

by Clint Rivest -
Number of replies: 10
Hi all.
I'm trying to install moodle onto my web server. I'm using EasyCGI as my server.
So, here's the problem.
I've dled, and unzipped moodle 1.9.2.
I uled the files to my server.
When I try to install it (http://www.centreicehockey.com/moodle19/moodle/install.php) I just get a message saying that complete http headers were not returned:"The specified CGI application misbehaved by not returning a complete set of HTTP headers".
Does anyone know what this message means? Better yet, how to get it installed on my web server? I've read the documentation, but it only seems to be for a local install, not on a web server. Or, the documentation does not explain how to "start" the installation process (http://www.installationwiki.org/Moodle) It just assumed I could get the ball rolling...
Any help would be great!
Average of ratings: -
In reply to Clint Rivest

Re: Install on Web Server/http headers

by Richard Enison -
CR,

The "instructions" you reference are actually just what they say they are: a tutorial. It actually links to the real instructions, where it says:

The official Moodle website, http://moodle.org/, contains detailed installation instructions.

Specifically, the installation instructions are at http://docs.moodle.org/en/Installing_Moodle.

Also, the tutorial refers to XAMPP, which is fine for local use, but not recommended for servers, for security reasons. See http://docs.moodle.org/en/Complete_install_packages_for_Windows#Security_matters_.28A_MUST_READ.21.29

EDIT: I don't know anything about EasyCGI, but it looks like you don't have PHP configured properly to work with it. When I tried to access README.txt, it worked only when I gave the correct pathname (http://www.centreicehockey.com/moodle19/moodle/README.txt). But when I gave it a URL ending with .php, it gave me the error msg. you reported even when I used a filename that shouldn't exist. It is as if PHP is bombing, and it never even gets to Moodle itself. It never even gets to the point where it checks if the PHP script named in the URL exists or not.

RLE
In reply to Clint Rivest

Re: Install on Web Server/http headers

by Simon Williams -

Hi guys,

I have a very similar problem. I too am using EasyCGI hosting on a windows server. I've installed moodle with a MySQL database and it mostly went fine, except it didnt prompt me to enter an admin username and password but ended up at the login page. I have managed to log in with the admin username and the pages appear to work. However if I go into my profile and attempt to change my password, upon clicking confirm I also get the error...

The specified CGI application misbehaved by not returning a complete set of HTTP headers.

and I noticed the URL in the address bar has a duplicate path appended to it e.g. http://www.mydomain.com/moodle/login/change_password.php/moodle/login/change_password.php

Can anyone help?????

Simon

In reply to Simon Williams

Re: Install on Web Server/http headers

by Clint Rivest -
Simon:
I got mine to work! Well, sort of.
Here's what you need to check:
In the Easycgi control panel, go to the place where you select what version of PHP you are running. Make sure it is 4.4.4. If you chose 5.2.1, it won't work.
Hope this helps!
If you get it working, maybe you can help me out. I ran into more problems!
In reply to Clint Rivest

Re: Install on Web Server/http headers

by Simon Williams -
Thanks Clint,
Yep the PHP 4.4.4 seems to have got things running, but I find when I try and select a course or indeed a few things, I get a blank white webpage....

Also I attempted to load my own user image, and I only get a missing image. I've checked the paths in the configuration and they look ok, but perhaps there's something not right?

Any ideas? I dont know if I should expect these blank web pages, or if something is wrong.

Kind regards
Simon


In reply to Simon Williams

Re: Install on Web Server/http headers

by Simon Williams -
If it helps, this is what error messages are coming up causing the blank pages. I'm no expert in PHP, does anyone know whats causing this... I am hosting on EasyCGI...

Notice: Constant COURSE_MAX_LOG_DISPLAY already defined in c:\websites\svpworld282\svpworld.com\moodle\course\lib.php on line 5

Notice: Constant COURSE_MAX_LOGS_PER_PAGE already defined in c:\websites\svpworld282\svpworld.com\moodle\course\lib.php on line 6

Notice: Constant COURSE_LIVELOG_REFRESH already defined in c:\websites\svpworld282\svpworld.com\moodle\course\lib.php on line 7

Notice: Constant COURSE_MAX_RECENT_PERIOD already defined in c:\websites\svpworld282\svpworld.com\moodle\course\lib.php on line 8

Notice: Constant COURSE_MAX_SUMMARIES_PER_PAGE already defined in c:\websites\svpworld282\svpworld.com\moodle\course\lib.php on line 9

Notice: Constant COURSE_MAX_COURSES_PER_DROPDOWN already defined in c:\websites\svpworld282\svpworld.com\moodle\course\lib.php on line 10

Notice: Constant COURSE_MAX_USERS_PER_DROPDOWN already defined in c:\websites\svpworld282\svpworld.com\moodle\course\lib.php on line 11

Notice: Constant FRONTPAGENEWS already defined in c:\websites\svpworld282\svpworld.com\moodle\course\lib.php on line 12

Notice: Constant FRONTPAGECOURSELIST already defined in c:\websites\svpworld282\svpworld.com\moodle\course\lib.php on line 13

Notice: Constant FRONTPAGECATEGORYNAMES already defined in c:\websites\svpworld282\svpworld.com\moodle\course\lib.php on line 14

Notice: Constant FRONTPAGETOPICONLY already defined in c:\websites\svpworld282\svpworld.com\moodle\course\lib.php on line 15

Notice: Constant FRONTPAGECATEGORYCOMBO already defined in c:\websites\svpworld282\svpworld.com\moodle\course\lib.php on line 16

Notice: Constant FRONTPAGECOURSELIMIT already defined in c:\websites\svpworld282\svpworld.com\moodle\course\lib.php on line 17

Notice: Constant EXCELROWS already defined in c:\websites\svpworld282\svpworld.com\moodle\course\lib.php on line 18

Notice: Constant FIRSTUSEDEXCELROW already defined in c:\websites\svpworld282\svpworld.com\moodle\course\lib.php on line 19

Notice: Constant MOD_CLASS_ACTIVITY already defined in c:\websites\svpworld282\svpworld.com\moodle\course\lib.php on line 21

Notice: Constant MOD_CLASS_RESOURCE already defined in c:\websites\svpworld282\svpworld.com\moodle\course\lib.php on line 22

Fatal error: Cannot redeclare make_log_url() (previously declared in C:\Websites\svpworld282\svpworld.com\moodle\course\lib.php:25) in c:\websites\svpworld282\svpworld.com\moodle\course\lib.php on line 25


In reply to Simon Williams

Re: Install on Web Server/http headers

by Richard Enison -
SW,

As I said before, I don't know anything about EasyCGI, but it looks like this may be related to the doubling up of the URL. If that is causing the same PHP files to be loaded twice, that could cause functions and classes to be seen as being redeclared, which is, as it says, a fatal error. It also results in the constants being recognized as already defined, but those are just notices, not errors.

The file course/lib.php, which is where you are blowing up, is referenced at least 55 times in other Moodle PHP script files. The developers of Moodle were very careful to make sure that every one of those references were with require_once, not require or include, so that the functions defined in it are only declared once. But if that crazy web server is loading the whole URL twice, all bets are off.

RLE
In reply to Richard Enison

Re: Install on Web Server/http headers

by Simon Williams -
I have a copy of the php.ini file and have set everything as it should be, but each time I attempt to create a course or run most things I get error messages such as...

PHP Fatal error: Cannot redeclare make_log_url() (previously declared in C:\Websites\svpworld282\svpworld.com\moodle\course\lib.php:25) in c:\websites\svpworld282\svpworld.com\moodle\course\lib.php on line 25

I have no idea what's happening, perhaps I should try to delete the installation and reinstall?

How easy is to reinstall? Do i need to delete the database or can i just overwrite it with a new install?

Regards
Simon

In reply to Simon Williams

Re: Install on Web Server/http headers

by Richard Enison -
SW,

It probably would be safest to delete the database. Otherwise it might try to recreate the tables and you get a bunch of "Table already exists" errors. At least drop the tables.

It is usually best to delete the Moodle PHP files before putting in new ones, or rename the directory and extract the new files to a new one with the old name. But if you extract or download exactly the same version of Moodle, it would probably not hurt to overwrite the files. See this FAQ. This one may also be of interest.

Again, I am convinced that what was happening was that, for some reason, it was loading the same PHP scripts twice, so functions and classes were seen as redeclared. I don't know anything about EasyCGI, but I suspect it is the guilty party. Maybe it is not being configured properly. I can't help you with that; maybe someone else can. But if you continue to use it the way you have been, it will probably happen again.

RLE
In reply to Clint Rivest

Re: Install on Web Server/http headers

by Simon Williams -
Clive,
Are you still with EasyCGI? If so have you managed to retain your moodle site since they have upgraded their servers? Mine no longer works and I am trying to figure out the problem. It appears the paths are now different in config.php, and I am not sure of the formatting as they no longer start with c:

Any help would me most appreciated!

Simon

In reply to Simon Williams

Re: Install on Web Server/http headers

by Richard Enison -
SW,

If by Clive you mean Clint, it seems he is no longer enrolled in Using Moodle.

Anyway, why don't you post the old and new contents of your config.php file (without the database password, of course!) so we can see what's going on and see what might need to be done about it.

RLE