Quantcast
Channel: Installing and upgrading help
Viewing all 46932 articles
Browse latest View live

Re: Upgrading from 2.0 to 2.5, simple?

$
0
0
by Howard Miller.  

Yes. There's no point taking backups if you don't use them to attempt to create a (working) copy of your Moodle site. 

On anything more than a trivial site the ability to create backups and use them to make a parallel "test" site should be considered a core skill wink


Moodle error after database migration

$
0
0
by Johnny Lo.  

Environment IIS 7.5, PHP 5.6, Moodle 2.6.11, MS SQL2005. (Company policy, can't run Linux.)

Moved database from MS SQL 2005 server to a different MS SQL 2008 server via Backup and Restore. Recreated Login using same ID and password. Modified server name on config.php.

When trying to run Moodle again, it starts to install again and failed with the following message.

Installation - Moodle 2.6.11 (Build: 20150511)

Debug info: SQLState: 42000<br>
Error Code: 262<br>
Message: [Microsoft][ODBC Driver 11 for SQL Server][SQL Server]CREATE TABLE permission denied in database 'moodle'.<br>

CREATE TABLE mdl_04config (
id BIGINT NOT NULL IDENTITY(1,1),
name NVARCHAR(255) NOT NULL DEFAULT '',
value NVARCHAR(MAX) NOT NULL,
CONSTRAINT mdl_04conf_id_pk PRIMARY KEY (id)
)
Error code: ddlexecuteerror
Stack trace:
  • line 449 of \lib\dml\moodle_database.php: ddl_change_structure_exception thrown
  • line 250 of \lib\dml\sqlsrv_native_moodle_database.php: call to moodle_database->query_end()
  • line 686 of \lib\dml\sqlsrv_native_moodle_database.php: call to sqlsrv_native_moodle_database->query_end()
  • line 88 of \lib\ddl\database_manager.php: call to sqlsrv_native_moodle_database->change_database_structure()
  • line 77 of \lib\ddl\database_manager.php: call to database_manager->execute_sql()
  • line 417 of \lib\ddl\database_manager.php: call to database_manager->execute_sql_arr()
  • line 369 of \lib\ddl\database_manager.php: call to database_manager->install_from_xmldb_structure()
  • line 1486 of \lib\upgradelib.php: call to database_manager->install_from_xmldb_file()
  • line 237 of \admin\index.php: call to install_core()

I have been researching for a while now. Can't figure out what's missing. Any help would be much appreciated.


not getting messages

$
0
0
by deb chitester.  

what can i check to see why? i have heard nothing in weeks and never heard on my issues.

Re: Moodle error after database migration

$
0
0
by Bret Miller.  

Did you give the user the dbo role in the database?

Re: not getting messages

$
0
0
by Emma Richardson.  

You need to start a new thread and be more specific ...

Re: Moodle 2.6.2 & MSSQL2008

$
0
0
by Luis de Vasconcelos.  

What $CFG->dbtype are you using?

Temporarily make the $CFG->dbuser the DBO on the 2008 database and see if you can then connect Moodle to the database. What happens?


Re: Moodle error after database migration

$
0
0
by Ken Task.  

Am one of those Linux guys just trying to help .... sooooooo ...

A migrated site should NOT throw any user into installation.
The error info to pay attention to:
CREATE TABLE permission denied in database 'moodle'

https://dev.mysql.com/doc/refman/5.6/en/show-grants.html

Migration of the DB to another server means the grants (permissions) might have to be tweaked ... ie, the user defined in config.php needs to have ability to do XYZ using the DB.

You could install the mysql client on the web server and then test access to the DB server as the user is defined in config.php.

See if that user can: create a database called testing, create a table in testing, drop a table in testing, etc..

'spirit of sharing', Ken

Re: Moodle error after database migration

$
0
0
by Johnny Lo.  

The user is indeed missing dbo role. Once I have added it, it works. Thank you folks for your help!


Re: Moodle 2.6.2 & MSSQL2008

$
0
0
by Johnny Lo.  

It works! I checked the original user setting again after reading your post. Apparently I missed it when I recreated the user. Thanks!


Re: not getting messages

$
0
0
by deb chitester.  

not getting any messages from the listserve nothing its as if someone deleted my email.

Re: Cron error: operation timed out while waiting for a lock

$
0
0
by Howard Miller.  

It probably isn't. 

It just means that cron is already running. You quite often see this when cron is running normally and then you try to run it "manually" as well to observe the output.

Re: Is working Moodle if Transfer-Encoding is chunked?

$
0
0
by Howard Miller.  

Just thinking we should make sure we are talking about the same thing. The Moodle option (which is hidden) is...

$CFG->disablebyteserving = true;

If you do this (in your config.php) then only complete files will be downloaded. The clue is that your logs are full of requests for the same file from the same IP. 

Re: Cron error: operation timed out while waiting for a lock

$
0
0
by Leon Stringer.  

Hi,

I think you're right.

However, since the output includes the term "error" (i.e. "Error code: locktimeout") I think this is less than ideal as it's confusing (thus my question!).

Also, since it means that all error output (i.e. stderr) must be suppressed to avoid these messages you will never get to see if there's any genuine errors (from Moodle itself or a misbehaving third-party plugin).

Pretty frustrating from an administrator point-of-view!

Thanks for your post,

Leon

Re: Cron error: operation timed out while waiting for a lock

$
0
0
by Howard Miller.  

I agree... it confused me when I first saw it. 

Hence: MDL-50694

Re: Cron error: operation timed out while waiting for a lock

$
0
0
by Leon Stringer.  

Great, thanks for that!


Re: Need to start CRON but partial install has stopped it. HELP!

$
0
0
by Joey Barclay.  

I didn't go for GoDaddy, the person that worked here that setup our Moodle LMS did because he used to work for GD and then he up and quit leaving me to deal with the LMS.  

What I wanted to do is to STOP the installation or the "trigger" that is stopping CRON. The system seems to be running fine so I was hoping to turn off the error because the page that comes up does not allow me to do anything. I cannot access any pages in Moodle because of that "Mixed Versions" error page. There is only a single button to finish the install. I have to just type a different URL in the address line in order to get to the Administrative pages in Moodle when logged in as the Administrator user. I wanted to stop it to allow CRON to run because the error has stopped CRON from running. I have to add 200 more classes, 500 new student users, plus 60 teacher users, then enroll them into all of their courses before next Wednesday 6/1.  I need to be able to use the email function to send out usernames and automatically generated passwords for all of my student users which is why I need CRON to run. I want to see if I can make it work as if it NEVER checked for the update and never stopped waiting for me to upload and install a new version. Another post explained I already tried to upload and install a new version "clean" and ran into issue after issue after issue so I just want to temporarily make it work if possible. Then make plans to move to another host because I am not used to not having complete control over something and GoDaddy obviously doesn't allow complete control for the end user. Plus honestly I am a windows guy and would prefer to deal with Microsoft's idiosyncrasies as I am used to them.  


Regarding the "root" of the server. I just needed to check and change permissions on the folders and in order to change them I apparently have to call godaddy tech support and have them do it for me. At least that is what the tech person I spoke to told me I had to do. If there is another way I am unaware of it. The only access I have is the "Plesk" panel which is like a File Manager and really nothing else. Thanks for your response though. 

install from zip, upgrade with git?

$
0
0
by Lucien Stals.  

I have a moodle installation that was done from the downloaded zip file.

I'd like to upgrade it via the CLI, but the instructions here (https://docs.moodle.org/27/en/Administration_via_command_line) say I need to do a pull from GIT to get the latest files before running the upgrade command.

When I run the "git pull" command, I'm informed that "fatal: Not a git repository (or any of the parent directories): .git". and in fact I see no .git folder in my site.

How can I convert my zip installed Moodle instance to one that can talk to the git repo?


Re: install from zip, upgrade with git?

$
0
0
by Ken Task.  

Error is correct ... git pull will not find the hidden .git directory cause it isn't there.

First things first ... ** BEFORE DOING ANY BELOW ... FULL SITE BACKUP ***
That means a tar ball of the code directory, a tar ball of the data directory,
and an SQL dump.   Once you have that proceed.

2 ways - here's one ...

Adjust locations to your system as you've not said specifically what you have.
Below is off the top of my head and for CentOS/RHEL/Fedora flavored Linuxes:

Moodle code is at /var/www/html/   You know the version.
fgrep '$release' version.php will show.
For the sake of example, let's say it shows 2.7.x

Note the ownerships/permissions of the html directory - write it down.

cd /var/www/

git clone git://git.moodle.org/moodle.git htmlgit

That will acquire the most recent Moodle code to a directory: htmlgit

cd htmlgit
git branch -a

will show that git is set to master.  We want same version you have.

git branch --track MOODLE_27_STABLE origin/MOODLE_27_STABLE
git checkout MOODLE_27_STABLE

Check version: fgrep '$release' version.php

This might result in a minor upgrade of your current code.  Not a problem.
It's really recommended.

Tricky part ...
*copy* the add-ons you have in html into same locations in htmlgit

From /var/www/html/ (existing code of Moodle)
Let's say you have an add-on block called 'simpleclock'.

cd blocks
cp -rp simpleclock /var/www/htmlgit/blocks/

This copies the folder from functioning site (not git) to the git enabled directory.

Do the same for any mods and themes.

** important ... copy the config.php file from html to htmlgit
from /var/www/html/
cp -p config.php /var/www/htmlgit/

If you think you done, we then move the html directory to a back ...
from /var/www/

mv html htmlback

then move the htmlgit directory into place
mv htmlgit html

Check ownerships/permissions on html.
Check ownerships/permissions on the files/folders contain in html

Ok, change into html, then run:

git pull
php admin/cli/upgrade.php --non-interactive

Check ownerships/permissions on all files ... remember you exeuted commaands as root user and therefore the files added by git, etc. have root:root.

Could do a chown apache:apache * -R
And then go back and harden permissions after you get it up and running.

Try your site with a browser now.

Read over this ... then if your curious, can also share the other way.

'spirit of sharing', Ken


Re: install from zip, upgrade with git?

$
0
0
by Lucien Stals.  

Thanks Ken.

That sounds like exactly what I need smile

FYI, we are running on Amazon (AWS). I think it's RHEL or CentOS, or similar. (Not sure exactly).

I'm testing this on a  development instance, so if I kill it, it's not so bad, but yes, I'll do backups first.

Out of curiosity, in your instructions you mv the old copy of the site and then mv the new one into where the old one was. I've previously seen sys admins use symlinks for this instead. For example,  /var/www/html/moodle would be a symlink in  /var/www/html/moodle27. Then when upgrading to 2.8, they'd just change the symlink so it pointed to  /var/www/html/moodle28. 

Not being a sys admin myself (but it appears I'm rapidly falling into that role with Moodle), is there any real advantage/disadvantage to the two approaches?

Anyway, I'll try your suggestions and let you know how it goes.

Cheers,

Lucien.

Re: install from zip, upgrade with git?

$
0
0
by Ken Task.  

So as not to confuse, here's the other way ...

*** Same for backing up
*** Same example locations, etc..

cd /var/www
git clone git://git.moodle.org/moodle.git htmlgit
cd htmlgit
git branch --track MOODLE_27_STABLE origin/MOODLE_27_STABLE
git checkout MOODLE_27_STABLE
cp -rp .git ../html/  (this copies recursively the hidden .git directory into the current code directory)
cd html
ls -l .git

Now try:

git pull - this might pull down files and result in a minor upgrade

php admin/cli/upgrade.php --non-interactive

change ownerships
chown apache:apache * -R

Try the browser now.

Go to Notifications

Check on any updates to plugins.  Forgot to mention that in previous response.

** NOTE:  not only should one know how to do a full site backup, but one should also know how to restore that full site backup should the attempts to get code under git fail for some reason.

NOTE: should you get lost in commands, capture your history to a file:

history > commands.txt

commands.txt ... towards the bottom will have all the commands you issued in the sequence you issued them .

I usually make a little text document and keep it on my laptop that contains the commands - a commands cheat sheet so to speak.   I edit for version numbers, etc.  Then all I have to do is copy and paste between my cheat sheet and the terminal screen.

'spirit of sharing', Ken


Viewing all 46932 articles
Browse latest View live