Installation on 1and1 server

Installation on 1and1 server

Mark DeYoung -
回帖数:28

I am attempting to install a new copy of Moodle 1.9.2 weekly build. I am using IE and Filezilla to manage the files on the server.

I am installing on 1and1 servers. The PHP version in the servers is 5.2.6

My php.ini file has the following information.

upload_max_filesize = 20M;
browscap = /usr/local/lib/browscap.ini;
error_reporting = (E_ALL & ~E_NOTICE & ~E_WARNING);
url_rewriter.tags = "a=href,area=href,frame=src,form=fakeentry,fieldset=";
register_globals = off;
allow_url_fopen = off;
max_execution_time = 50000;
safe_mode = off;
file_uploads = on;
magic_quotes_gpc = on;
memory_limit = 41943040;
short_open_tag = on;
post_max_size = 26214400;

My .htaccess file has the following information.

AddType x-mapp-php5 .php

The installation sets up all the database files, with no errors. I can see the MySQL files through my phpAdmin service. After hitting the continue button the installation goes to the "http://deyoungconsultingtraining.com/admin/index.php" and displays a blank page. I am assuming there is an error somewhere but I have no way of knowing. Can someone point this novice in the right direction.

Mark

回复Mark DeYoung

Re: Installation on 1and1 server

David Hogg -

Hi Mark,

I too had problems with installation on 1 and 1 servers (but the UK branch of the company).  I spent a lot of time adjusting the php memory settings in the .htaccess file etc. but found that NOT installing some of the modules was best e.g. I deleted the workshop folder in the moodle/mod directory so that it doesn't install and my installation was completed when I accessed the notifications page.

This is a rather low tech solution - but it worked!!

I haven't tried to install the workshop module later as I don't need it but you could give it a go.

Good luck

回复David Hogg

Re: Installation on 1and1 server

Mark DeYoung -

I had noticed your previous posts about this topic, but I am trying to avoid having to lose any of the features. If you reinstall the workshop module and it works, let me know.

Also, do you have a php.ini file in every subdirectory?

Mark

回复Mark DeYoung

Re: Installation on 1and1 server

David Hogg -
I did not put the php.ini file in every directory as there was conflicting advice about it's effectiveness (and the script looked a bit involved!)

I will try and install the workshop module tonight (if time) or tomorrow.
回复Mark DeYoung

Re: Installation on 1and1 server

David Hogg -
Hi Mark,
Unfortunately while trying to install the workshop module I received the same memory error as before - take the block away and all is fine. Apologies to the Workshop module but it wont be used on that site!

Best of luck with your problem. If you find a solution (possibly with php.ini) could you post it please. Thanks
回复David Hogg

Re: Installation on 1and1 server and 1.9

david freeman -
I concur with what has been suggested by others to do to get 1.9 running on 1and1. I created the .htaccess with the single command AddType x-mapp-php5 .php in it. I placed this in my root, and not in my moodle folder as I don't care if all my apps are referencing php5.

I also set up a local php.ini file in the moodle folder with the suggested parameters. I did not put this in multiple locations. Once this was done, I still had the installation hanging problem. I then removed the /workshop folder from the /mod directory, and refreshed the install page, and the installation continued with no problems.

We are not currently using the workshop module in our other installations (not on 1and1), so it won't be missed, but I sure would like to know why it caused the hang up, and if there will be other issues that pop up later due to 1and1's "unique" shared hosting setup.
Thanks to all who helped figure this out!
DCF
回复david freeman

Re: Installation on 1and1 server and 1.9

Scott van Niekerk -

1and1 informed me that, with setting the max file (40M) and max post size (10M), the php.ini file needs to be in 2 places, root moodle folder and admin.

回复Scott van Niekerk

Re: Installation on 1and1 server and 1.9

david freeman -
Thanks for the info. BTW did you get your installation running?
DCF
回复david freeman

Re: Installation on 1and1 server and 1.9

Scott van Niekerk -

I am further along, not getting error messages at least.

I am at the login page, trying to input my user name and password with which I usually login to moodle, and am not having any luck! Tells me "invalid login".

I try to click "forgot username/password" and it supposedly emails it to me, but nothing ever arrives!

Crumbs......... any thoughts. I didn't yet try to delete the workshop module, it doesn't sound like that will be necessary in my case!

回复Richard Enison

Re: Installation on 1and1 server

Mark DeYoung -

I installed 1.8 version and all worked well. I am going to watch and see if 1and1 upgrades their servers to work with 1.9 and then upgrade myself.

Mark

回复Mark DeYoung

Re: Installation on 1and1 server

Tony Agar -

Hi Mark,

Congratulations on installing Moodle 1.8. I have spent the last week unsuccessfully trying to install 1.9 with little help from 1 and 1 tech support.

I have created a folder in my web space root directory called Moodle using Webspace explorer. Presumably I now have to upload a zipper version of Moodle 1.8 into that folder and unzip it?

Any help you can give would be gratefully appreciated.

Tony Agar

回复Tony Agar

Re: Installation on 1and1 server

Richard Enison -
TA,

It doesn't matter where you put the zip file, as long as you extract the files into your web space. The top level folder (directory) that gets extracted when you do that is called moodle, and everything else is under that. So if you extract the files into the folder you already created, you will have a site in Moodle/moodle. Perhaps you would prefer to delete Moodle and just extract into your web root folder.

For starters, read the Moodle doc page on 1 and 1 MySQL installation that I linked to in my previous post. Then, bearing in mind that 1 and 1's Control Panel is probably functionally similar to cPanel, you can probably get a better understanding of the process of installing Moodle by watching one or both of the Moodle installation video tutorials linked to in the third paragraph of the Moodle doc page Installing Moodle. Just bear in mind that there probably are minor differences in the menu structure between 1 and 1's Control Panel and cPanel.

Also, you might profit from my two "rules" of dealing with commercial web hosts, which are based on almost two years of reading Moodle forum posts:
  1. Don't use Fantastico (if 1 and 1 doesn't offer it, good for them; in that case you can ignore rule #1).
  2. Don't ask tech support to help you install or upgrade Moodle unless they are a Moodle Partner. If you have a technical question about PHP, Apache, IIS, MySQL or other database, Linux, Windows, etc., fine. Just don't mention Moodle. For example, say, "How do I change the PHP memory limit?" not, "How do I satisfy Moodle's memory requirement?"
RLE
回复Richard Enison

Re: Installation on 1and1 server

Tony Agar -

Thanks Richard.

I have configured my config.php file as so :-

$CFG->dbtype    = 'mysql';       // mysql or postgres7 (for now)

$CFG->dbhost    = 'db1602.oneandone.co.uk';   // eg localhost or db.isp.com

$CFG->dbname    = 'db258186361';      // database name, eg moodle

$CFG->dbuser    = 'dbo258186361';    // your database username

$CFG->dbpass    = 'RdfDJdKZ';    // your database password

$CFG->prefix    = 'mdl_';        // Prefix to use for all table names

$CFG->wwwroot   = 'http://www.anchorageseaschool.co.uk';

$CFG->dirroot   = /homepages/12/d258186361/htdocs/wsc120146434/moodle';

$CFG->dataroot  = '/homepages/12/d258186361/htdocs/moodledata';

AddType x-mapp-php5 .php

I then try pressing install.php on my webserver ie 1 And 1 and nothing happens. I do do not get taken to the Moodle installation page as shown in the tutorial

Yours

Tony

 

回复Tony Agar

Re: Installation on 1and1 server

Richard Enison -
TA,

First thing you need to do is change your database p/w. You've just told the whole world what it is!

Secondly, the AddType directive is not a PHP statement and does not belong in config.php. It is an Apache directive so it needs to go into httpd.conf or some other conf file, or .htaccess. In your case, since you are using a commercial web host, probably the latter. That could be the reason your site isn't working. Although I would expect it to do something in that case, like display the contents of install.php.

Which brings me to this: what do you mean by "pressing install.php on my webserver"? You did type http://www.anchorageseaschool.co.uk/install.php or http://www.anchorageseaschool.co.uk/moodle/install.php into a web browser, right?

I just noticed: what happened to the opening single quote mark in the dirroot line? Is that a typo in your post? I would have thought you would just copy and paste the code from config.php into the post.

Also, is the web document root /homepages/12/d258186361/htdocs/wsc120146434/moodle or /homepages/12/d258186361/htdocs/wsc120146434? That will determine whether you need to type /moodle after the domain name in your browser to get to your Moodle site. If it is the latter (so you do have to type /moodle), then I have a problem with your moodledata location. Because it is potentially web accessible, another security hazard. If you have no choice about it, put an .htaccess file in the moodledata directory with Apache directives that will make it inaccessible to hackers with web browsers:

order deny,allow
deny from all

See Installing Moodle#Creating_the_data_directory.

RLE
回复Richard Enison

Re: Installation on 1and1 server

Tony Agar -

RLE

I am using this link to reply to the help you sent me on Oct 8 on a different forum as it seems that on this forum has a number of people who have successfully got Moodle to work on 1 and 1 servers.

  1. config.php- as a total novice, I had assumed his post was the whole file as originally I left out <?php and ?> in mine, let alone those 4 lines I mentioned.
  2. Having visited:- http://www.pair.com/support/knowledge_base/the_basics/file_permissions.html I understand what you are saying, but surely 754 or 704 would be better? In any case until I can get it work on 1 and 1, nobody can access it including me!
  3. I have had areply from 1 and 1 supprt about .htaccess:- To be more specific on your concerns about the error that shows from the
    URL RYAO.anchorageseaschool.co.uk is the .htaccess file on the server,
    when i try to check the content it shows "NULL" and trying to parse the
    server to run and read the php scripts in version 5.  If you are going
    to rename the .htaccess file into .htaccess_old, you will get the
    specific error of directory permissions.

    Notice: Undefined property: directorypermissions in
    /homepages/46/d120146428/htdocs/moodle/lib/textlib.class.php on line 56.
    All that is in mine is AddType x-mapp-php5.php. I presume that they are able to read the error files behind /htdocs/ which neither Diane or I can access at the moment, becuase when I remane the file as instructed I get a message that "Internet Explorer cannot find the Webpage", let alone access to the error files we need.
  4. Could it be that the directory permissions in one's config.php need to be set at the the same as those in the /lib/textlib.class.php?

TA 

回复Tony Agar

Re: Installation on 1and1 server

Richard Enison -
TA,
  1. OK.
  2. Having read the link about permissions you quote, you know that the 4 in 704 (as well as 754) is the permission to read for the public. What's the advantage of that? People using web browsers already have the ability to read your website files because the 7 gives all rights to your webserver, which is where the browsers get their info from. The 4 gives people using the same file system (1and1's other clients) the right to read your files directly, unles 1and1 takes additional measures to protect their clients from themselves and each other. To me, if anything, that's a disadvantage.
  3. I'm not sure what question that quote from 1and1 was in response to. All I know is that the notice at the end was just that: a notice, not an error. You can ignore it. Whenever you run Moodle with error_reporting set to display notices, you will get lots of notices like that because Moodle makes abundant use of the fact that PHP is not a strongly-typed language, which means that you don't have to declare properties of objects in advance; you can assign them on the fly, which Moodle does a lot.

    What file were you instructed to rename and who instructed you? How did you try to access it with Internet Explorer? As for accessing error logs, see http://faq.1and1.com/scripting_languages_supported/php/8.html. Also, see my suggestions to DH in the other thread regarding this script.
  4. /lib/textlib.class.php doesn't set directorypermissions. It uses whatever it is set to in config.php.
RLE
回复Richard Enison

Re: Installation on 1and1 server

Tony Agar -

RLE

As I migrate from this forum to how the one that is about "Getting the best out Moodle" having finally got 1 and 1 technical support to successfully install Moodle 1.8 for me, I would like to thank you for your efforts to help me.

Also for posterity and anybody else trying to get Moodle to work on 1 and 1, this the message I got from their Technical Support people.

This code (AddType x-mapp-php5.php) sometimes work and sometimes not in our new Operating system in Linux which is Devian 4.0 . Anyway I already
replace the code to (AddHandler x-mapp-php5 .php) which works on Devian
4.0 . Your site now works fine!

And indeed it does. It was as simple as that. They made no changes to my php.ini file which I had copied off Mark DeYoung's post but removed all the error handling off my config.php file and so it looks like the one Diane posted on 3/10/2008 on the "More 1and1 installation problems" forum.

TA

回复Richard Enison

Re: Installation on 1and1 server

Scott van Niekerk -

RLE: I am getting an error, even when I sign in as a guest to my site on the server. Any ideas what this means?:

Notice : Undefined property: stdClass::$frontpage in /homepages/11/d228891186/htdocs/mfrsuccess/moodle/index.php on line 187

Thanks!

回复Scott van Niekerk

Re: Installation on 1and1 server

Scott van Niekerk -

Or how about this error message....

Notice: Undefined property: stdClass::$forum_manydiscussions in /homepages/11/d228891186/htdocs/mfrsuccess/moodle/mod/forum/view.php on line 265

 Something is definitely OFF on my site, and I have no idea what it is....

Can anyone help me?

回复Scott van Niekerk

Re: Installation on 1and1 server

Richard Enison -
SvN,

Those are not errors. They are, as they say, notices. You can ignore them.

RLE
回复Richard Enison

Re: Installation on 1and1 server

Scott van Niekerk -

Right you are RLE! They look like this.........

Notice: Undefined property: stdClass::$coursemanager in /homepages/11/d228891186/htdocs/mfrsuccess/moodle/lib/datalib.php on line 675

But they are very disruptive to the appearance of the site. What do I need to do to erase or fix these "notices"?

Thanks, Scott

回复Scott van Niekerk

Re: Installation on 1and1 server

Scott van Niekerk -

This particular line that the above notice (Notice: Undefined property: stdClass::$coursemanager in /homepages/11/d228891186/htdocs/mfrsuccess/moodle/lib/datalib.php on line 675)

is referring to reads:

$CFG->coursemanager = trim($CFG->coursemanager);

any suggestions from anyone on what to do about all these notices?

And happy thanksgiving!

回复Scott van Niekerk

Re: Installation on 1and1 server

Richard Enison -
SvN,

Set your error_reporting to exclude display of notices. If you have a custom php.ini file that contains the line

error_reporting = E_ALL

change it to

error_reporting = E_ALL & ~E_NOTICE

which is the default. If you are using a different method of setting it (.htaccess, ini_set), make the corresponding change there.

And a happy Turkey Day to you too!

RLE
回复Richard Enison

Re: Installation on 1and1 server

Scott van Niekerk -

I added the line you - RLE - suggested ....

error_reporting = E_ALL & ~E_NOTICE

to my php.ini file, but it didn't seem to make a difference! When I browse to http://www.mfrsuccess.com/moodle/ (please check to see if you see similar) I see: 

Notice: Undefined index: loaded in /homepages/11/d228891186/htdocs/mfrsuccess/moodle/lib/accesslib.php on line 549

Warning: in_array() [function.in-array]: Wrong datatype for second argument in /homepages/11/d228891186/htdocs/mfrsuccess/moodle/lib/accesslib.php on line 549

Notice: Undefined index: loaded in /homepages/11/d228891186/htdocs/mfrsuccess/moodle/lib/accesslib.php on line 559

Warning: in_array() [function.in-array]: Wrong datatype for second argument in /homepages/11/d228891186/htdocs/mfrsuccess/moodle/lib/accesslib.php on line 559

Please help me fix these notices and warnings.

Thanks,
Scott

回复Scott van Niekerk

Re: Installation on 1and1 server

Richard Enison -
SvN,
  1. Once again, you need to ask 1and1 tech. support what needs to be done (by you or them) to cause the changes you make to php.ini to take effect. Also, make sure the php.ini file is in the right directory. Or you could use ini_set instead as you suggested a week ago in another thread.
  2. Once activated, the change you made should take care of the notices, but not the warnings. The very first post in this thread contains the line

    error_reporting = (E_ALL & ~E_NOTICE & ~E_WARNING);

    which should take care of both. The semicolon at the end is unnecessary. Statements in PHP scripts end with a semicolon. Settings in php.ini do not; the semicolon in that file is used to begin a comment.
  3. However, suppressing warnings may not always be a good idea. A lot of times I have seen reports in this forum of a warning that a certain required file could not be opened because it didn't exist, or because the permissions were wrong, and this is followed by an error msg. that the require_once failed. Without the warning, you wouldn't know why it failed.
  4. You're not using both the error_reporting setting in php.ini and with ini_set in config.php, are you? Maybe one is overriding the other.
RLE
回复Scott van Niekerk

Re: Installation on 1and1 server

Scott van Niekerk -
I discovered, with all these errors, that if I took out the following script from my config.php file, it fixed my problem of all the error and notice reporting!

ini_set ('display_errors', 'on');

ini_set ('log_errors', 'on');

ini_set ('display_startup_errors', 'on');

ini_set ('error_reporting', E_ALL);

$CFG->debug = DEBUG_ALL;

回复Mark DeYoung

Re: Installation on 1and1 server

Tony Agar -

Mark,

Thank you for posting your php.ini file, it is considerably different from the one I downloaded from /discuss.php?d=76650 and am using to try and install moodle 1.8

Is it the same one you used in your successful install of 1.8?

I notice also that URL link to your moodle site is now working. Did you have to make any changes to your config.php file to get it to work on 1 and 1.

A copy of that would be great if you wouldnt mind posting it as there are a number of us getting 500 and 404 errors with 1 and 1.

Also how many tables did you get set up in mySQL, I only got 90?

Many thanks

Tony

回复Tony Agar

Re: Installation on 1and1 server

Penny Magas -
Wow!!! I've been reading the various posts about Moodle on 1and1 for the last hour. I think I only accidentally got mine to work. But I feel certain that it's not secure, so I need to figure all that out. Taking out the Workshop folder was inspired - my thanks to all of you who have been working on this!!

Cheers!
Penny