New Installation version 1.6 problems

New Installation version 1.6 problems

by Rod Spears -
Number of replies: 19
I am trying a new installation with 1.6
What does this mean?  Parse error: parse error, unexpected T_STRING in /homepages/9/d89467705/htdocs/moodle16/config.php on line 79

This is the first thing that appeared when I tried to install 1.6

I have installed previous versions with not problems.

Help!
Average of ratings: -
In reply to Rod Spears

Re: New Installation version 1.6 problems

by Gordon Bateson -
Picture of Core developers Picture of Peer reviewers Picture of Plugin developers
You have a syntax error in your config.php (around line 79) Probably, there is a missing apostrophe, quote or semi colon.

Please check your settings for $CFG->wwwroot and $CFG->dirroot. If you cannot see the cause of the error, please copy and paste lines 75-85 from your config.php into this forum

all the best
Gordon
In reply to Gordon Bateson

Re: New Installation version 1.6 problems

by Rod Spears -
Thanks!  I found the missing apostrophe.

The installation worked OK after that up to the point of setting up block tables.  It has stalled there.  I closed the browser and tried again, but it still displays the same page.  It stopped on Online Users.
In reply to Rod Spears

Re: New Installation version 1.6 problems

by Gordon Bateson -
Picture of Core developers Picture of Peer reviewers Picture of Plugin developers
Good to hear that you have kncked your config.php into shape.

However, you seem to be stuck, and since this is a new installation, I suggest you clear out all the tables from the database, and start the installation again.

The important point to catch is the first error message, or the first time the install stops. Go slowly and carefully. If the install stops, do not try to "battle on". Please copy and paste the last thing to appear on the screen.
In reply to Gordon Bateson

Re: New Installation version 1.6 problems

by Rod Spears -
I cleared the tables and started over.  It stopped at the same place.  This is the last message:

login

Login tables have been set up correctly

In reply to Rod Spears

Re: New Installation version 1.6 problems

by Gordon Bateson -
Picture of Core developers Picture of Peer reviewers Picture of Plugin developers
At this point, Moodle is setting up the tables for the blocks plugins.

After the "login tables" message, you should see similar messages about the "messages table", the "news_items" table and several others in alphabetical order up to the "social_activites" table.

Looking through the main installation script (admin/index.php), I see that
admin/index.php (line 240) calls the "upgrade_blocks_plugins" function in lib/blocklib.php (line 960). Things seem to be going wrong in there somewhere.
  • Do you have any non-standard blocks in the blocks folder? If so remove them and try again.
  • You could also try temporarily moving the "blocks/messages" folder to somewhere else to see if the installation gets any further.
  • Are you able to look at the Apache error log or phperror log to see if there are details about what happened? If so, please post details.

In reply to Gordon Bateson

Re: New Installation version 1.6 problems

by Rod Spears -
I have cleared my database several times and started over with similar problems.

I moved the messages folder and that did not work.

I then deleted the blocks folder and uploaded it over again.

I then created a new database and started over.  It still stops when setting up block tables.  Here is the page:

activity_modules

Activities tables have been set up correctly


admin

Administration tables have been set up correctly


blog_menu

Blog Menu tables have been set up correctly


blog_tags

Blog Tags tables have been set up correctly


calendar_month

Calendar tables have been set up correctly


calendar_upcoming

Upcoming Events tables have been set up correctly


course_list

Courses tables have been set up correctly


course_summary

Course/Site Description tables have been set up correctly


glossary_random

Random Glossary Entry tables have been set up correctly


html

HTML tables have been set up correctly


loancalc

Loan calculator tables have been set up correctly


login

Login tables have been set up correctly


messages

Messages tables have been set up correctly


news_items

Latest News tables have been set up correctly


online_users

Online Users tables have been set up correctly


participants

People tables have been set up correctly


In reply to Rod Spears

Re: New Installation version 1.6 problems

by Gordon Bateson -
Picture of Core developers Picture of Peer reviewers Picture of Plugin developers
I notice the installation got further than the "login" tables this time.

That suggests this problem is NOT caused by one single statement in one of the scripts. If that were the case, the installation would always crash in exactly the same place.

Instead, I think you may be hitting some other kind of limit, for example a database or disk quota, or the "30-second" limit for PHP scripts, which is the default time limit on many servers I have come across. Would that be a possibility?

If I were you, the next thing I would try would be to amend the installation script to skip the blocks plugins altogether. If you want to try this, please do the following:
  1. open admin/index.php with a text editor
  2. locate the the following line (around line 243):
    upgrade_blocks_plugins("$CFG->wwwroot/$CFG->admin/index.php");
  3. add two slashes to the start of the line, thus:
    //upgrade_blocks_plugins("$CFG->wwwroot/$CFG->admin/index.php");
  4. save the modified file
  5. remove all tables from the database
  6. run the installation again
  7. when you get to the "variables" page, locate the "debug" setting (in the "Miscellaneous" section) and set it to "Yes"
The installation will now proceed, but will skip the installation of blocks plugins.

When I tried the above on my server, the installation went through successfully to the "Site Settings" page, where you enter your site name and description. The page after that falls over because there are no blocks, but if you get that far, we may be able to insert the blocks by hand.

BTW, could you tell us the version and type of your OS, database and PHP?

all the best
Gordon
In reply to Gordon Bateson

Re: New Installation version 1.6 problems

by Rod Spears -
php version 4.4.2
apache 1.3.33
mysql version 4

This is a new installation, not an upgrade and I am using a new database.  I do not have direct access to the server. 

The previous problems I had were while upgrading.  I have also upgraded my production site once since the previous problems with no problems the last time.  I also set up a new moodle on the same server with no problems. 

I will try the things you suggested and let you know if that works.

Rod
In reply to Rod Spears

Re: New Installation version 1.6 problems

by Rod Spears -
I followed your instructions about skipping the installation of blocks.  As you predicted, it worked until i got to this point:

Could not retrieve blocks from the database -- Continue

After continuing I received this message on the next page:

Available Courses


Warning: array_shift(): The argument should be an array in /homepages/9/d89467705/htdocs/moodle16/course/lib.php on line 1203

In reply to Rod Spears

Re: New Installation version 1.6 problems

by Gordon Bateson -
Picture of Core developers Picture of Peer reviewers Picture of Plugin developers
Hi Rod,

please find attached a zipped up sql file which contains the sql statements to add the blocks to your site manually. Please unzip the file and import the mdl_16.sql file to your database using your favorite database administration software (e.g. phpMyAdmin)

I have assumed that the prefix for your Moodle tables is "_mdl". If you are using a different prefix, you will need to open up the file (with a text editor) change all occurrences of "mdl_" to the prefix you are using.

This should fix your install and let you get on with your work.

regards
Gordon
In reply to Gordon Bateson

Re: New Installation version 1.6 problems

by Gordon Bateson -
Picture of Core developers Picture of Peer reviewers Picture of Plugin developers
Oops,  there is a small typo in my previous message. I meant to say:
I have assumed that the prefix for your Moodle tables is "mdl_".
In reply to Gordon Bateson

Re: New Installation version 1.6 problems

by Rod Spears -
Thanks!

When I tried to do this I received this error message:

SQL query:
CREATE TABLE `mdl_block_rss_client` (
`id` int( 11 ) NOT NULL AUTO_INCREMENT ,
`userid` int( 11 ) NOT NULL default '0',
`title` text COLLATE utf8_unicode_ci NOT NULL ,
`preferredtitle` varchar( 64 ) COLLATE utf8_unicode_ci NOT NULL default '',
`description` text COLLATE utf8_unicode_ci NOT NULL ,
`url` varchar( 255 ) COLLATE utf8_unicode_ci NOT NULL default '',
PRIMARY KEY ( `id` )
) ENGINE = MYISAM DEFAULT CHARSET = utf8 COLLATE = utf8_unicode_ci COMMENT = 'Remote news feed information. Contains the news feed id, the' AUTO_INCREMENT =1
MySQL said: Documentation
#1064 - You have an error in your SQL syntax.  Check the manual that corresponds to your MySQL server version for the right syntax to use near 'collate utf8_unicode_ci NOT NULL,
  `preferredtitle` varchar(6
In reply to Rod Spears

Re: New Installation version 1.6 problems

by Gordon Bateson -
Picture of Core developers Picture of Peer reviewers Picture of Plugin developers
Oh dear. Looks like your version of MySQL doesn't like the CHARSET and COLLATE settings. Maybe you can fix it by removing all occurrences of the following from the sql file:
  • DEFAULT CHARSET = utf8
  • COLLATE = utf8_unicode_ci
In reply to Gordon Bateson

Re: New Installation version 1.6 problems

by Gordon Bateson -
Picture of Core developers Picture of Peer reviewers Picture of Plugin developers
It might be best to change "ENGINE=MyISAM" to "TYPE=MyISAM" too.

Please use the attached file, which incorporates the modifications mentioned in this and my previous post.

Good luck!
Gordon
In reply to Gordon Bateson

Re: New Installation version 1.6 problems

by Rod Spears -
Gordon,

The file worked!  Thanks for your help!

Any ideas about why all this happened, when I am usually able to install with no problems?

Rod
In reply to Rod Spears

Re: New Installation version 1.6 problems

by Gordon Bateson -
Picture of Core developers Picture of Peer reviewers Picture of Plugin developers
I'm afraid I don't have any great ideas about why this happened to you sad

It maybe that your MySQL server is less than the minimum recommended for Moodle 1.6 (see http://moodle.org/mod/forum/discuss.php?d=38354). If this just a testing server, I would suggest you use one of the all-in-one packages available on the Moodle downloads page. This will ensure that you have a Apache, PHP and MySQL setup that is known to work with Moodle 1.6

However, if you really want to get to the bottom of this, I think you need to find a programmer who can add "print" statements in the "upgrade_blocks_plugins" function in "lib/blocklib.php" (line 960) script, and so figure out exactly where, and then why, the install fails.

all the best
Gordon
In reply to Rod Spears

Re: New Installation version 1.6 problems

by Bob Builder -
I had the same problem, but removing the offending line in admin/index.php and then refreshing the page (you'll get a warning about sending POST data) sorted it.
In reply to Bob Builder

Re: New Installation version 1.6 problems

by john mcgrath -
Yeh I got this problem too - have tried to set up moodle 1.6 about five times now and going to give up - I think it's a bad sign if it needs this hacking about to make it work - maybe next  year!