Problems using Git to Upgrade Moodle

Problems using Git to Upgrade Moodle

by Jim Fischer -
Number of replies: 22
Hi

I just finished installing Moodle on unbuntu 14.04 server.  The system seems to be working fine, I followed the instructions here:


https://docs.moodle.org/29/en/Step-by-step_Installation_Guide_for_Ubuntu


I initially installed version 2.6. I am now having issues when trying to use Git to upgrade to say 2.9 or 3.0 (I have tried both).  I tried this from within the moodle directory:

sudo git branch --track MOODLE_29_STABLE origin MOODLE_29_STABLE
sudo git checkout MOODLE_29_STABLE
sudo git pull

I got no errors.  However, when I login into moodle as the adminstrator  and check notifications, it shows that I am still using version 2.6.11.


Why is moodle not "upgrading" ?  Im not sure what I am doing wrong. 


I am also trying to get Moodle to interact with WeBWorK 2.11.  I followed the instructions at the WebWork wiki. I installed wwassignment module. However, when I go to notifications in moodle (as administrator) , there is no information about the wwassignment module.


Thanks for any help.


Jim


Average of ratings: -
In reply to Jim Fischer

Re: Problems using Git to Upgrade Moodle

by Ken Task -
Picture of Particularly helpful Moodlers

Two questions ... not related ... in one posting will get partial responses/questions ... like this one ...

When you run git pull what happens?

Do you actually see git working? ... and the end of the process git usually shows a summation screen of what changes were made to what files.    Does your system show that?

The very last file git acquires is version.php.  If git cannot replace that file .... then ....

Check that with fgrep '$release' version.php in the code directory to see what that file says.

Acquiring the new code should through the next admin user to login in the update/upgrade process.

Why not do that from the command line?

From moodlecode directory:

php admin/cli/upgrade.php --non-interactive [ENTER]

Will do what the web based upgrade will do ... only taking apache out of the loop making it less intensive server wise.

If running that as root, don't forget that all files acquired from Moodle repo become tagged as belonging to root user ... or in your case sudo user.   Which might not be proper for how your apache is setup (OS specific there ... CentOS, for example: apache:apache for all files directories in moodle code).

Your part two questions will have to be someone else.

'spirit of sharing', Ken

In reply to Jim Fischer

Re: Problems using Git to Upgrade Moodle

by AL Rachels -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers

Probably just a typo in your post, but just in case, your first line - sudo git branch --track MOODLE_29_STABLE origin MOODLE_29_STABLE - is missing the forward slash between origin and MOODLE_29_STABLE.

In reply to AL Rachels

Re: Problems using Git to Upgrade Moodle

by Jim Fischer -

Thanks for the replies.  Yes it is a typo in the post, I had the slash when I did the command. 


When I get access to my server, I will see what report I am getting when I run "git". 

Sorry about the multiple questions.  Im fine with sticking to one question and that is how to properly update from version 2.6 to 2.9.

Maybe  I should just start over?



In reply to Jim Fischer

Re: Problems using Git to Upgrade Moodle

by Ken Task -
Picture of Particularly helpful Moodlers

Well, let's see what we get when running git before we start thinking about 'starting over'.

In your moodle code directory is there a hidden .git directory?

cd /path/to/moodle/code/

ls -l .git

Notice the "dot" in front of the directory name.

If it is there, first see how the files/folders are tagged for ownerships.

ls -l [enter]

on a CentOS 6 box not run as shared server shows a listing of files/directories like thus:

-rw-r--r--   1 apache apache    1639 Apr 22 16:29 version.php

The first 'apache' is the owner ... the second 'apache' is the group.   Reason for asking this ... when you do a git command as root the newly acquired files will be tagged as root.

So, once having done that, try this command and see what you get:

IF it's working, you'll see *something* like this (I just did this on a production server):


[root@moodle moodle]# git pull
remote: Counting objects: 4239, done.
remote: Compressing objects: 100% (771/771), done.
remote: Total 2692 (delta 2001), reused 2502 (delta 1842)
Receiving objects: 100% (2692/2692), 695.95 KiB, done.
Resolving deltas: 100% (2001/2001), completed with 436 local objects.
From git://git.moodle.org/moodle
   3a77583..bf659cf9 MOODLE_27_STABLE -> origin/MOODLE_27_STABLE
   d4f2c87..0e38101  MOODLE_28_STABLE -> origin/MOODLE_28_STABLE
   e7975d1..18c4978  MOODLE_29_STABLE -> origin/MOODLE_29_STABLE
   e28a53b..ca0c654  MOODLE_30_STABLE -> origin/MOODLE_30_STABLE
   6c1342d..1e72daa  master     -> origin/master
From git://git.moodle.org/moodle
 * [new tag]         v3.1.0-beta -> v3.1.0-beta
Updating e7975d1..18c4978
Fast-forward
 admin/environment.xml                              |    2 +
 auth/db/lang/en/auth_db.php                        |    2 +-
 auth/db/tests/db_test.php                          |    2 +-
 auth/ldap/lang/en/auth_ldap.php                    |    2 +-
 auth/shibboleth/logout.php                         |    3 +-
 backup/moodle2/restore_stepslib.php                |   43 +++-
 badges/lib.php                                     |   10 +-
 course/lib.php                                     |    1 +
 course/tests/restore_test.php                      |  324 ++++++++++++++++++++
 install/lang/br/langconfig.php                     |   34 ++
 install/lang/es_mx/install.php                     |    2 +-
 install/lang/fr/admin.php                          |    4 +-
 lang/en/auth.php                                   |    2 +-
 lang/en/grades.php                                 |    2 +-
 lib/behat/classes/util.php                         |    3 +-
 lib/classes/date.php                               |    3 +-
 lib/classes/session/manager.php                    |   31 ++-
 lib/classes/session/memcached.php                  |   16 +
 lib/classes/user.php                               |   20 +-
 lib/deprecatedlib.php                              |    8 +-
 lib/dml/mysqli_native_moodle_database.php          |    6 +-
 lib/dml/tests/dml_test.php                         |   20 +-
 .../moodle-atto_image-button-debug.js              |    4 +
 .../moodle-atto_image-button-min.js                |    6 +-
 .../moodle-atto_image-button.js                    |    4 +
 .../atto/plugins/image/yui/src/button/js/button.js |    4 +
 lib/formslib.php                                   |   40 ++--
 lib/outputrenderers.php                            |    9 +-
 lib/tests/date_legacy_test.php                     |    8 +-
 lib/tests/date_test.php                            |    2 +-
 lib/tests/fixtures/timezonewindows.xml             |    4 +-
 lib/tests/scheduled_task_test.php                  |    8 +-
 login/index.php                                    |    2 +-
 .../airnotifier/message_output_airnotifier.php     |   15 +-
 mod/assign/gradingtable.php                        |   15 +-
 mod/assign/locallib.php                            |    6 +-
 mod/assign/renderer.php                            |    8 +-
 mod/assign/tests/locallib_test.php                 |   51 +++
 mod/data/field/checkbox/field.class.php            |    4 +-
 mod/data/field/menu/field.class.php                |   11 +
 mod/data/field/multimenu/field.class.php           |    2 +-
 mod/data/field/number/field.class.php              |   10 +
 mod/data/field/radiobutton/field.class.php         |   10 +
 mod/data/field/text/field.class.php                |   10 +
 mod/data/field/textarea/field.class.php            |    3 +-
 mod/data/tests/behat/required_entries.feature      |   22 ++
 mod/forum/index.php                                |    4 +-
 mod/forum/lib.php                                  |    4 +-
 mod/forum/markposts.php                            |    1 +
 mod/forum/subscribe.php                            |    4 +-
 mod/forum/subscribe_ajax.php                       |    2 +-
 .../classes/local/resource/contextsettings.php     |    3 +-
 .../classes/local/resource/linksettings.php        |    3 +-
 .../classes/local/resource/systemsettings.php      |    3 +-
 .../classes/local/service/toolsettings.php         |    8 +-
 mod/lti/service/toolsettings/version.php           |    2 +-
 mod/quiz/attemptlib.php                            |    4 +-
 mod/scorm/player.js                                |    1 +
 mod/scorm/view.js                                  |    2 +
 theme/bootstrapbase/less/moodle/undo.less          |    4 +-
 theme/bootstrapbase/less/moodle/yui_fixes.less     |    8 -
 theme/bootstrapbase/renderers/core_renderer.php    |    5 +-
 theme/bootstrapbase/style/moodle.css               |  Bin 378449 -> 378451 bytes
 user/edit_form.php                                 |   11 +-
 user/profile/lib.php                               |    5 +-
 user/tests/profilelib_test.php                     |    6 +
 version.php                                        |    4 +-
 67 files changed, 740 insertions(+), 142 deletions(-)
 create mode 100644 course/tests/restore_test.php
 create mode 100644 install/lang/br/langconfig.php
 delete mode 100644 theme/bootstrapbase/less/moodle/yui_fixes.less

Note version.php changed  and if you list it, you should also note it belongs to the root user now.

Change ownerships to apache user/group.

'spirit of sharing', Ken

In reply to Ken Task

Re: Problems using Git to Upgrade Moodle

by Jim Fischer -

I appreciate the detailed suggestions as I am a true "gitiot" and relatively new to unix.  Unfortunately, I got stopped on the first step.  There is no directory "code" within moodle. So I ran your suggested commands from within moodle. I dont understand what I see or what to make of it!


I tried

ls -l .git

from within the moodle directory which produced the following:


drwxr-xr-x  2 root root    4096 Apr 30 22:21 branches
-rw-r--r--  1 root root     584 May  4 07:48 config
-rw-r--r--  1 root root      73 Apr 30 22:21 description
-rw-r--r--  1 root root    2105 May  4 07:48 FETCH_HEAD
-rw-r--r--  1 root root      33 May  4 07:48 HEAD
drwxr-xr-x  2 root root    4096 Apr 30 22:21 hooks
-rw-r--r--  1 root root 1660424 May  4 07:48 index
drwxr-xr-x  2 root root    4096 Apr 30 22:21 info
drwxr-xr-x  3 root root    4096 Apr 30 22:23 logs
drwxr-xr-x 26 root root    4096 May  3 22:17 objects
-rw-r--r--  1 root root      41 May  4 07:48 ORIG_HEAD
-rw-r--r--  1 root root   24255 Apr 30 22:23 packed-refs
drwxr-xr-x  5 root root    4096 Apr 30 22:23 refs


Then I switched to root and ran git pull:


root@OTK-MATHDEV-01:/opt/moodle# git pull
remote: Counting objects: 704, done.
remote: Compressing objects: 100% (85/85), done.
remote: Total 447 (delta 357), reused 447 (delta 357)
Receiving objects: 100% (447/447), 87.93 KiB | 0 bytes/s, done.
Resolving deltas: 100% (357/357), completed with 123 local objects.
From git://git.moodle.org/moodle
   f38e287..ca0c654  MOODLE_30_STABLE -> origin/MOODLE_30_STABLE
   1cb6ac4..18c4978  MOODLE_29_STABLE -> origin/MOODLE_29_STABLE
   fc1ef59..1e72daa  master     -> origin/master
Updating f38e287..ca0c654
Fast-forward
 auth/db/tests/db_test.php                          |   2 +-
 auth/shibboleth/logout.php                         |   3 +-
 backup/moodle2/restore_stepslib.php                |  43 ++-
 badges/lib.php                                     |  10 +-
 blocks/badges/tests/behat/block_badges.feature     |  34 +++
 .../badges/tests/behat/block_badges_course.feature |  73 +++++
 .../tests/behat/block_badges_dashboard.feature     |  39 +++
 .../tests/behat/block_badges_frontpage.feature     |  44 +++
 blocks/badges/tests/fixtures/badge.png             | Bin 0 -> 2116 bytes
 course/tests/restore_test.php                      | 324 +++++++++++++++++++++
 install/lang/es/install.php                        |  30 +-
 install/lang/fr/admin.php                          |   4 +-
 lib/classes/session/manager.php                    |  31 +-
 lib/classes/session/memcached.php                  |  16 +
 lib/classes/user.php                               |  20 +-
 lib/deprecatedlib.php                              |   8 +-
 lib/dml/mysqli_native_moodle_database.php          |   6 +-
 lib/dml/tests/dml_test.php                         |  20 +-
 lib/formslib.php                                   |  40 +--
 mod/assign/tests/locallib_test.php                 |   8 +
 mod/forum/index.php                                |   4 +-
 mod/forum/lib.php                                  |   4 +-
 mod/forum/markposts.php                            |   1 +
 mod/forum/subscribe.php                            |   4 +-
 mod/forum/subscribe_ajax.php                       |   2 +-
 mod/scorm/player.js                                |   1 +
 mod/scorm/view.js                                  |   2 +
 theme/bootstrapbase/less/moodle/yui_fixes.less     |   8 -
 user/edit_form.php                                 |  11 +-
 user/profile/lib.php                               |   5 +-
 user/tests/profilelib_test.php                     |   6 +
 version.php                                        |   4 +-
 32 files changed, 707 insertions(+), 100 deletions(-)
 create mode 100644 blocks/badges/tests/behat/block_badges.feature
 create mode 100644 blocks/badges/tests/behat/block_badges_course.feature
 create mode 100644 blocks/badges/tests/behat/block_badges_dashboard.feature
 create mode 100644 blocks/badges/tests/behat/block_badges_frontpage.feature
 create mode 100644 blocks/badges/tests/fixtures/badge.png
 create mode 100644 course/tests/restore_test.php
 delete mode 100644 theme/bootstrapbase/less/moodle/yui_fixes.less


In reply to Jim Fischer

Re: Problems using Git to Upgrade Moodle

by Ken Task -
Picture of Particularly helpful Moodlers

We all are 'gitiot' when first beginning!   Please remember, you are using Linux ... not Unix ... there are differences. ;)

When attempting to help someone, it's difficult to provide
accurate commands and locations so 'substitutes' are used
as 'place holders' and it's up to you to 'translate' them
into your system setup.

Example: your code directory is in /opt/moodle ... which is not
typical for many Linux systems ... you didn't tell us that and how would
anyone be able to guess that? 

So when you see:
cd /path/to/moodle/code/ or cd /moodlecode/   you translate to /opt/moodle/

Now about git output ... good!  That's what you should be seeing.

Some brief things.  First, you are not a coder (neither am I) so using git, although inteneded for coders, will show coder understood info which for you doesn't mean that much but you do need to understand just a little of all that.

These two lines:
   f38e287..ca0c654  MOODLE_30_STABLE -> origin/MOODLE_30_STABLE
   1cb6ac4..18c4978  MOODLE_29_STABLE -> origin/MOODLE_29_STABLE
indicates git pull pulled into git (those hidden files in .git)
information about those two versions 29,30 that it did not have before.
That's good.

The listing of files shows how much is changing to each file and it's location in the code directory.

course/tests/restore_test.php line shows higher number ... lots of +'s thus
more change.

The only reason I mention that is in the rare case where there are errors in Moodle.  One might be able to re-call there were big changes to /path/blah.php ... maybe that's where I should concentrate efforts to fix errors.    At first, I copied those lines and pasted into a local text document so I could reference later ... *IF* there were hickups.

You see quite a few with 4+ which are minor changes ...
*** note the last one for the version.php file at /opt/moodle/
It shows 4+ and the only things changed in that file actually
relate to the updates that git pull acquired ... **the version number has changed**.

A fgrep '$release' version.php should show a higher version that what you had
before.

*NOW* to apply the changes and update your code and thus the DB, one need to run
the command line upgrade.php script in [moodlecode]/admin/cli/

So
cd /path/to/moodlecode/ (translate that path to your path)
php admin/cli/upgrade.php --non-interactive

The --non-interactive switch means don't prompt for info just do it.  This takes apache web server out of the loop in updates ... makes it faster and less prone to apache time outs.  That command takes the info for db, db user, db password from config.php file and uses that info to update the DB.   So an update not only involves update to code but update to the associated DB.   DB user must have enough priv's to make changes to the DB.

When that completes without error, your moodle has been updated to whatever
version was acquired by the git pull command.

Since you ran this as root, all the updated/changed/new files have been tagged
as belonging to root user.

MUST run:
chown apache:apache * -R
to set ownerships on whatever might have changed in the moodle code.

Now go to the Moodle via browser and go to Site Admin Notifications and check
for updates.

'spirit of sharing', Ken

In reply to Ken Task

Re: Problems using Git to Upgrade Moodle

by Jim Fischer -

Thanks for this wealth of information. I was able to grep the release and it showed higher number like you said it would.  I can see the file upgrade.php within the /admin/cli/ directory, however, I get an error on the next step:


root@OTK-MATHDEV-01:/opt/moodle# php admin/cli/upgrade.php --non-interactive
PHP Warning:  require(/opt/moodle/config.php): failed to open stream: No such file or directory in /opt/moodle/admin/cli/upgrade.php on line 41
PHP Fatal error:  require(): Failed opening required '/opt/moodle/config.php' (include_path='.:/usr/share/php:/usr/share/pear') in /opt/moodle/admin/cli/upgrade.php on line 41




In reply to Jim Fischer

Re: Problems using Git to Upgrade Moodle

by Ken Task -
Picture of Particularly helpful Moodlers

Your system is different than most ... period ... UGH!

So we have to find what PHP is being found:

which php

That will show the path to the php executable a command line php will execute.

It **might** show /usr/bin/php   but sounds like your system may not find it there.

Once know that ...

cd /path/to/moodlecode/admin/cli/

Now we are in the directory where that upgrade.php script is located ... we will not have to supply a path to it now.

Then try:

/path/to/php -f ./upgrade.php --non-interactive

Notice the differenes?  

the -f means work with a file

the ./ means look for upgrade.php in the present working directory ... where we are located.

and the -- is the switch for upgrade.php.

Please provide output of the following:

uname -an

php -m

php -i

'spirit of sharing', Ken



In reply to Ken Task

Re: Problems using Git to Upgrade Moodle

by Jim Fischer -

Below are the outputs you requested.  When you  say "system is different" if you are referring to the moodle system, that is likely due to me installing by simply following steps without really knowing what I was doing. I could have made a mistake or misinterpreted a step somehow. Id be happy to start all over if there is a cleaner or more standard way to install.

If you mean by the server itself or ubuntu system, that was set up by an IT adminstrator who then  let me have sudo control so that I could learn how to use linux and have a development server to test instructional software.


Anyways, thanks again for your help.  Im learning for sure. I am also doing some tutorials at the github site.  While I get the overall purpose of a git repository, the devil is in the details.

Jim


Here's the three outputs :

Linux OTK-MATHDEV-01 3.16.0-55-generic #74~14.04.1-Ubuntu SMP Tue Nov 17 10:15:59 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux

[PHP Modules]
bcmath
bz2
calendar
Core
ctype
curl
date
dba
dom
ereg
exif
fileinfo
filter
ftp
gd
gettext
hash
iconv
intl
json
ldap
libxml
mbstring
mhash
mysql
mysqli
openssl
pcntl
pcre
PDO
pdo_mysql
Phar
posix
pspell
readline
Reflection
session
shmop
SimpleXML
soap
sockets
SPL
standard
sysvmsg
sysvsem
sysvshm
tokenizer
wddx
xml
xmlreader
xmlrpc
xmlwriter
Zend OPcache
zip
zlib

[Zend Modules]
Zend OPcache


phpinfo()
PHP Version => 5.5.9-1ubuntu4.16

System => Linux OTK-MATHDEV-01 3.16.0-55-generic #74~14.04.1-Ubuntu SMP Tue Nov 17 10:15:59 UTC 2015 x86_64
Build Date => Apr 20 2016 14:28:36
Server API => Command Line Interface
Virtual Directory Support => disabled
Configuration File (php.ini) Path => /etc/php5/cli
Loaded Configuration File => /etc/php5/cli/php.ini
Scan this dir for additional .ini files => /etc/php5/cli/conf.d
Additional .ini files parsed => /etc/php5/cli/conf.d/05-opcache.ini,
/etc/php5/cli/conf.d/10-pdo.ini,
/etc/php5/cli/conf.d/20-curl.ini,
/etc/php5/cli/conf.d/20-gd.ini,
/etc/php5/cli/conf.d/20-intl.ini,
/etc/php5/cli/conf.d/20-json.ini,
/etc/php5/cli/conf.d/20-ldap.ini,
/etc/php5/cli/conf.d/20-mysql.ini,
/etc/php5/cli/conf.d/20-mysqli.ini,
/etc/php5/cli/conf.d/20-pdo_mysql.ini,
/etc/php5/cli/conf.d/20-pspell.ini,
/etc/php5/cli/conf.d/20-readline.ini,
/etc/php5/cli/conf.d/20-xmlrpc.ini

PHP API => 20121113
PHP Extension => 20121212
Zend Extension => 220121212
Zend Extension Build => API220121212,NTS
PHP Extension Build => API20121212,NTS
Debug Build => no
Thread Safety => disabled
Zend Signal Handling => disabled
Zend Memory Manager => enabled
Zend Multibyte Support => provided by mbstring
IPv6 Support => enabled
DTrace Support => enabled

Registered PHP Streams => https, ftps, compress.zlib, compress.bzip2, php, file, glob, data, http, ftp, phar, zip
Registered Stream Socket Transports => tcp, udp, unix, udg, ssl, sslv3, tls
Registered Stream Filters => zlib.*, bzip2.*, convert.iconv.*, string.rot13, string.toupper, string.tolower, string.strip_tags, convert.*, consumed, dechunk

This program makes use of the Zend Scripting Language Engine:
Zend Engine v2.5.0, Copyright (c) 1998-2014 Zend Technologies
    with Zend OPcache v7.0.3, Copyright (c) 1999-2014, by Zend Technologies
Configuration

bcmath

BCMath support => enabled

Directive => Local Value => Master Value
bcmath.scale => 0 => 0

bz2

BZip2 Support => Enabled
Stream Wrapper support => compress.bzip2://
Stream Filter support => bzip2.decompress, bzip2.compress
BZip2 Version => 1.0.6, 6-Sept-2010

calendar

Calendar support => enabled

Core

PHP Version => 5.5.9-1ubuntu4.16

Directive => Local Value => Master Value
allow_url_fopen => On => On
allow_url_include => Off => Off
always_populate_raw_post_data => Off => Off
arg_separator.input => & => &
arg_separator.output => & => &
asp_tags => Off => Off
auto_append_file => no value => no value
auto_globals_jit => On => On
auto_prepend_file => no value => no value
browscap => no value => no value
default_charset => no value => no value
default_mimetype => text/html => text/html
disable_classes => no value => no value
disable_functions => no value => no value
display_errors => Off => Off
display_startup_errors => Off => Off
doc_root => no value => no value
docref_ext => no value => no value
docref_root => no value => no value
enable_dl => Off => Off
enable_post_data_reading => On => On
error_append_string => no value => no value
error_log => no value => no value
error_log => no value => no value
error_prepend_string => no value => no value
error_reporting => 22527 => 22527
exit_on_timeout => Off => Off
expose_php => On => On
extension_dir => /usr/lib/php5/20121212 => /usr/lib/php5/20121212
file_uploads => On => On
highlight.comment => <font style="color: #FF8000">#FF8000</font> => <font style="color: #FF8000">#FF8000</font>
highlight.default => <font style="color: #0000BB">#0000BB</font> => <font style="color: #0000BB">#0000BB</font>
highlight.html => <font style="color: #000000">#000000</font> => <font style="color: #000000">#000000</font>
highlight.keyword => <font style="color: #007700">#007700</font> => <font style="color: #007700">#007700</font>
highlight.string => <font style="color: #DD0000">#DD0000</font> => <font style="color: #DD0000">#DD0000</font>
html_errors => Off => Off
ignore_repeated_errors => Off => Off
ignore_repeated_source => Off => Off
ignore_user_abort => Off => Off
implicit_flush => On => On
include_path => .:/usr/share/php:/usr/share/pear => .:/usr/share/php:/usr/share/pear
log_errors => On => On
log_errors_max_len => 1024 => 1024
mail.add_x_header => On => On
mail.force_extra_parameters => no value => no value
mail.log => no value => no value
max_execution_time => 0 => 0
max_file_uploads => 20 => 20
max_input_nesting_level => 64 => 64
max_input_time => -1 => -1
max_input_vars => 1000 => 1000
memory_limit => -1 => -1
open_basedir => no value => no value
output_buffering => 0 => 0
output_handler => no value => no value
post_max_size => 8M => 8M
precision => 14 => 14
realpath_cache_size => 16K => 16K
realpath_cache_ttl => 120 => 120
register_argc_argv => On => On
report_memleaks => On => On
report_zend_debug => Off => Off
request_order => GP => GP
sendmail_from => no value => no value
sendmail_path => /usr/sbin/sendmail -t -i  => /usr/sbin/sendmail -t -i
serialize_precision => 17 => 17
short_open_tag => Off => Off
SMTP => localhost => localhost
smtp_port => 25 => 25
sql.safe_mode => Off => Off
sys_temp_dir => no value => no value
track_errors => Off => Off
unserialize_callback_func => no value => no value
upload_max_filesize => 2M => 2M
upload_tmp_dir => no value => no value
user_dir => no value => no value
user_ini.cache_ttl => 300 => 300
user_ini.filename => .user.ini => .user.ini
variables_order => GPCS => GPCS
xmlrpc_error_number => 0 => 0
xmlrpc_errors => Off => Off
zend.detect_unicode => On => On
zend.enable_gc => On => On
zend.multibyte => Off => Off
zend.script_encoding => no value => no value

ctype

ctype functions => enabled

curl

cURL support => enabled
cURL Information => 7.35.0
Age => 3
Features
AsynchDNS => Yes
CharConv => No
Debug => No
GSS-Negotiate => Yes
IDN => Yes
IPv6 => Yes
krb4 => No
Largefile => Yes
libz => Yes
NTLM => Yes
NTLMWB => Yes
SPNEGO => No
SSL => Yes
SSPI => No
TLS-SRP => Yes
Protocols => dict, file, ftp, ftps, gopher, http, https, imap, imaps, ldap, ldaps, pop3, pop3s, rtmp, rtsp, smtp, smtps, telnet, tftp
Host => x86_64-pc-linux-gnu
SSL Version => OpenSSL/1.0.1f
ZLib Version => 1.2.8
date

date/time support => enabled
"Olson" Timezone Database Version => 0.system
Timezone Database => internal
Default timezone => America/Los_Angeles

Directive => Local Value => Master Value
date.default_latitude => 31.7667 => 31.7667
date.default_longitude => 35.2333 => 35.2333
date.sunrise_zenith => 90.583333 => 90.583333
date.sunset_zenith => 90.583333 => 90.583333
date.timezone => no value => no value

dba

DBA support => enabled
Supported handlers => cdb cdb_make db4 inifile flatfile

Directive => Local Value => Master Value
dba.default_handler => flatfile => flatfile

dom

DOM/XML => enabled
DOM/XML API Version => 20031129
libxml Version => 2.9.1
HTML Support => enabled
XPath Support => enabled
XPointer Support => enabled
Schema Support => enabled
RelaxNG Support => enabled

ereg

Regex Library => Bundled library enabled

exif

EXIF Support => enabled
EXIF Version => 1.4 $Id$
Supported EXIF Version => 0220
Supported filetypes => JPEG,TIFF

Directive => Local Value => Master Value
exif.decode_jis_intel => JIS => JIS
exif.decode_jis_motorola => JIS => JIS
exif.decode_unicode_intel => UCS-2LE => UCS-2LE
exif.decode_unicode_motorola => UCS-2BE => UCS-2BE
exif.encode_jis => no value => no value
exif.encode_unicode => ISO-8859-15 => ISO-8859-15

fileinfo

fileinfo support => enabled
version => 1.0.5-dev

filter

Input Validation and Filtering => enabled
Revision => $Id: 4d3899e089e6e45b157975ceef2ac7deb6e9d762 $

Directive => Local Value => Master Value
filter.default => unsafe_raw => unsafe_raw
filter.default_flags => no value => no value

ftp

FTP support => enabled

gd

GD Support => enabled
GD Version => 2.1.1-dev
FreeType Support => enabled
FreeType Linkage => with freetype
FreeType Version => 2.5.2
GIF Read Support => enabled
GIF Create Support => enabled
JPEG Support => enabled
libJPEG Version => 8
PNG Support => enabled
libPNG Version => 1.2.50
WBMP Support => enabled
XPM Support => enabled
libXpm Version => 30411
XBM Support => enabled
WebP Support => enabled
Directive => Local Value => Master Value
gd.jpeg_ignore_warning => 0 => 0

gettext

GetText Support => enabled

hash

hash support => enabled
Hashing Engines => md2 md4 md5 sha1 sha224 sha256 sha384 sha512 ripemd128 ripemd160 ripemd256 ripemd320 whirlpool tiger128,3 tiger160,3 tiger192,3 tiger128,4 tiger160,4 tiger192,4 snefru snefru256 gost
adler32 crc32 crc32b fnv132 fnv164 joaat haval128,3 haval160,3 haval192,3 haval224,3 haval256,3 haval128,4 haval160,4 haval192,4 haval224,4 haval256,4 haval128,5 haval160,5 haval192,5 haval224,5 haval25
6,5

iconv

iconv support => enabled
iconv implementation => glibc
iconv library version => 2.19

Directive => Local Value => Master Value
iconv.input_encoding => ISO-8859-1 => ISO-8859-1
iconv.internal_encoding => ISO-8859-1 => ISO-8859-1
iconv.output_encoding => ISO-8859-1 => ISO-8859-1

intl

Internationalization support => enabled
version => 1.1.0
ICU version => 52.1
ICU Data version => 52.1

Directive => Local Value => Master Value
intl.default_locale => no value => no value
intl.error_level => 0 => 0
intl.use_exceptions => 0 => 0

json

json support => enabled
json version => 1.3.2
JSON-C version (bundled) => 0.11

ldap

LDAP Support => enabled
RCS Version => $Id$
Total Links => 0/unlimited
API Version => 3001
Vendor Name => OpenLDAP
Vendor Version => 20431
SASL Support => Enabled

Directive => Local Value => Master Value
ldap.max_links => Unlimited => Unlimited

libxml

libXML support => active
libXML Compiled Version => 2.9.1
libXML Loaded Version => 20901
libXML streams => enabled

mbstring

Multibyte Support => enabled
Multibyte string engine => libmbfl
HTTP input encoding translation => disabled
libmbfl version => 1.3.2

mbstring extension makes use of "streamable kanji code filter and converter", which is distributed under the GNU Lesser General Public License version 2.1.

Multibyte (japanese) regex support => enabled
Multibyte regex (oniguruma) backtrack check => On
Multibyte regex (oniguruma) version => 5.9.2

Directive => Local Value => Master Value
mbstring.detect_order => no value => no value
mbstring.encoding_translation => Off => Off
mbstring.func_overload => 0 => 0
mbstring.http_input => pass => pass
mbstring.http_output => pass => pass
mbstring.http_output_conv_mimetypes => ^(text/|application/xhtml\+xml) => ^(text/|application/xhtml\+xml)
mbstring.internal_encoding => no value => no value
mbstring.language => neutral => neutral
mbstring.strict_detection => Off => Off
mbstring.substitute_character => no value => no value

mhash

MHASH support => Enabled
MHASH API Version => Emulated Support
mysql

MySQL Support => enabled
Active Persistent Links => 0
Active Links => 0
Client API version => 5.5.46
MYSQL_MODULE_TYPE => external
MYSQL_SOCKET => /var/run/mysqld/mysqld.sock
MYSQL_INCLUDE => -I/usr/include/mysql
MYSQL_LIBS => -L/usr/lib/x86_64-linux-gnu -lmysqlclient_r

Directive => Local Value => Master Value
mysql.allow_local_infile => On => On
mysql.allow_persistent => On => On
mysql.connect_timeout => 60 => 60
mysql.default_host => no value => no value
mysql.default_password => no value => no value
mysql.default_port => no value => no value
mysql.default_socket => /var/run/mysqld/mysqld.sock => /var/run/mysqld/mysqld.sock
mysql.default_user => no value => no value
mysql.max_links => Unlimited => Unlimited
mysql.max_persistent => Unlimited => Unlimited
mysql.trace_mode => Off => Off

mysqli

MysqlI Support => enabled
Client API library version => 5.5.46
Active Persistent Links => 0
Inactive Persistent Links => 0
Active Links => 0
Client API header version => 5.5.47
MYSQLI_SOCKET => /var/run/mysqld/mysqld.sock

Directive => Local Value => Master Value
mysqli.allow_local_infile => On => On
mysqli.allow_persistent => On => On
mysqli.default_host => no value => no value
mysqli.default_port => 3306 => 3306
mysqli.default_pw => no value => no value
mysqli.default_socket => /var/run/mysqld/mysqld.sock => /var/run/mysqld/mysqld.sock
mysqli.default_user => no value => no value
mysqli.max_links => Unlimited => Unlimited
mysqli.max_persistent => Unlimited => Unlimited
mysqli.reconnect => Off => Off

openssl
OpenSSL support => enabled
OpenSSL Library Version => OpenSSL 1.0.1f 6 Jan 2014
OpenSSL Header Version => OpenSSL 1.0.1f 6 Jan 2014

pcntl

pcntl support => enabled

pcre

PCRE (Perl Compatible Regular Expressions) Support => enabled
PCRE Library Version => 8.31 2012-07-06

Directive => Local Value => Master Value
pcre.backtrack_limit => 1000000 => 1000000
pcre.recursion_limit => 100000 => 100000

PDO

PDO support => enabled
PDO drivers => mysql

pdo_mysql

PDO Driver for MySQL => enabled
Client API version => 5.5.46

Directive => Local Value => Master Value
pdo_mysql.default_socket => /var/run/mysqld/mysqld.sock => /var/run/mysqld/mysqld.sock

Phar

Phar: PHP Archive support => enabled
Phar EXT version => 2.0.2
Phar API version => 1.1.1
SVN revision => $Id: a5488937a80433d434af6753d3db8517feaf91df $
Phar-based phar archives => enabled
Tar-based phar archives => enabled
ZIP-based phar archives => enabled
gzip compression => enabled
bzip2 compression => enabled
OpenSSL support => enabled
Phar based on pear/PHP_Archive, original concept by Davey Shafik.
Phar fully realized by Gregory Beaver and Marcus Boerger.
Portions of tar implementation Copyright (c) 2003-2009 Tim Kientzle.
Directive => Local Value => Master Value
phar.cache_list => no value => no value
phar.readonly => On => On
phar.require_hash => On => On

posix

Revision => $Id: 1dfa9997ed76804e53c91e0ce862f3707617b6ed $

pspell

PSpell Support => enabled

readline

Readline Support => enabled
Readline library => EditLine wrapper

Directive => Local Value => Master Value
cli.pager => no value => no value
cli.prompt => \b \>  => \b \>

Reflection

Reflection => enabled
Version => $Id: 31d836a7ac92a37b5c580836d91ad4736fe2f376 $

session

Session Support => enabled
Registered save handlers => files user
Registered serializer handlers => php_serialize php php_binary wddx
Directive => Local Value => Master Value
session.auto_start => Off => Off
session.cache_expire => 180 => 180
session.cache_limiter => nocache => nocache
session.cookie_domain => no value => no value
session.cookie_httponly => Off => Off
session.cookie_lifetime => 0 => 0
session.cookie_path => / => /
session.cookie_secure => Off => Off
session.entropy_file => /dev/urandom => /dev/urandom
session.entropy_length => 32 => 32
session.gc_divisor => 1000 => 1000
session.gc_maxlifetime => 1440 => 1440
session.gc_probability => 0 => 0
session.hash_bits_per_character => 5 => 5
session.hash_function => 0 => 0
session.name => PHPSESSID => PHPSESSID
session.referer_check => no value => no value
session.save_handler => files => files
session.save_path => /var/lib/php5 => /var/lib/php5
session.serialize_handler => php => php
session.upload_progress.cleanup => On => On
session.upload_progress.enabled => On => On
session.upload_progress.freq => 1% => 1%
session.upload_progress.min_freq => 1 => 1
session.upload_progress.name => PHP_SESSION_UPLOAD_PROGRESS => PHP_SESSION_UPLOAD_PROGRESS
session.upload_progress.prefix => upload_progress_ => upload_progress_
session.use_cookies => On => On
session.use_only_cookies => On => On
session.use_strict_mode => Off => Off
session.use_trans_sid => 0 => 0

shmop

shmop support => enabled

SimpleXML

Simplexml support => enabled
Revision => $Id: 363ea1fc44b0b7775e2ec3ce8456530fec6d1660 $
Schema support => enabled

soap

Soap Client => enabled
Soap Server => enabled
Directive => Local Value => Master Value
soap.wsdl_cache => 1 => 1
soap.wsdl_cache_dir => /tmp => /tmp
soap.wsdl_cache_enabled => 1 => 1
soap.wsdl_cache_limit => 5 => 5
soap.wsdl_cache_ttl => 86400 => 86400

sockets

Sockets Support => enabled

SPL

SPL support => enabled
Interfaces => Countable, OuterIterator, RecursiveIterator, SeekableIterator, SplObserver, SplSubject
Classes => AppendIterator, ArrayIterator, ArrayObject, BadFunctionCallException, BadMethodCallException, CachingIterator, CallbackFilterIterator, DirectoryIterator, DomainException, EmptyIterator, Files
ystemIterator, FilterIterator, GlobIterator, InfiniteIterator, InvalidArgumentException, IteratorIterator, LengthException, LimitIterator, LogicException, MultipleIterator, NoRewindIterator, OutOfBounds
Exception, OutOfRangeException, OverflowException, ParentIterator, RangeException, RecursiveArrayIterator, RecursiveCachingIterator, RecursiveCallbackFilterIterator, RecursiveDirectoryIterator, Recursiv
eFilterIterator, RecursiveIteratorIterator, RecursiveRegexIterator, RecursiveTreeIterator, RegexIterator, RuntimeException, SplDoublyLinkedList, SplFileInfo, SplFileObject, SplFixedArray, SplHeap, SplMi
nHeap, SplMaxHeap, SplObjectStorage, SplPriorityQueue, SplQueue, SplStack, SplTempFileObject, UnderflowException, UnexpectedValueException

standard

Dynamic Library Support => enabled
Path to sendmail => /usr/sbin/sendmail -t -i

Directive => Local Value => Master Value
assert.active => 1 => 1
assert.bail => 0 => 0
assert.callback => no value => no value
assert.quiet_eval => 0 => 0
assert.warning => 1 => 1
auto_detect_line_endings => 0 => 0
default_socket_timeout => 60 => 60
from => no value => no value
url_rewriter.tags => a=href,area=href,frame=src,input=src,form=fakeentry => a=href,area=href,frame=src,input=src,form=fakeentry
user_agent => no value => no value

sysvmsg

sysvmsg support => enabled
Revision => $Id: adf1d2d6be849c46eed3c3ee6f1cbebd1448d6e5 $

tokenizer

Tokenizer Support => enabled
wddx

WDDX Support => enabled
WDDX Session Serializer => enabled

xml

XML Support => active
XML Namespace Support => active
libxml2 Version => 2.9.1

xmlreader

XMLReader => enabled

xmlrpc

core library version => xmlrpc-epi v. 0.51
php extension version => 0.51
author => Dan Libby
homepage => http://xmlrpc-epi.sourceforge.net
open sourced by => Epinions.com

xmlwriter

XMLWriter => enabled

Zend OPcache

Opcode Caching => Disabled
Optimization => Disabled
Startup Failed => Opcode Caching is disabled for CLI

Directive => Local Value => Master Value
opcache.blacklist_filename => no value => no value
opcache.consistency_checks => 0 => 0
opcache.dups_fix => Off => Off
opcache.enable => On => On
opcache.enable_cli => Off => Off
opcache.enable_file_override => Off => Off
opcache.error_log => no value => no value
opcache.fast_shutdown => 0 => 0
opcache.file_update_protection => 2 => 2
opcache.force_restart_timeout => 180 => 180
opcache.inherited_hack => On => On
opcache.interned_strings_buffer => 4 => 4
opcache.load_comments => 1 => 1
opcache.log_verbosity_level => 1 => 1
opcache.max_accelerated_files => 2000 => 2000
opcache.max_file_size => 0 => 0
opcache.max_wasted_percentage => 5 => 5
opcache.memory_consumption => 64 => 64
opcache.optimization_level => 0xFFFFFFFF => 0xFFFFFFFF
opcache.preferred_memory_model => no value => no value
opcache.protect_memory => 0 => 0
opcache.restrict_api => no value => no value
opcache.revalidate_freq => 2 => 2
opcache.revalidate_path => Off => Off
opcache.save_comments => 1 => 1
opcache.use_cwd => On => On
opcache.validate_timestamps => On => On

zip

Zip => enabled
Extension Version => $Id: 05dd1ecc211075107543b0ef8cee488dd229fccf $
Zip version => 1.11.0
Libzip version => 0.10.1

zlib

ZLib Support => enabled
Stream Wrapper => compress.zlib://
Stream Filter => zlib.inflate, zlib.deflate
Compiled Version => 1.2.8
Linked Version => 1.2.8

Directive => Local Value => Master Value
zlib.output_compression => Off => Off
zlib.output_compression_level => -1 => -1
zlib.output_handler => no value => no value

Additional Modules

Module Name
sysvsem
sysvshm

Environment

Variable => Value
XDG_SESSION_ID => 18
TERM => vt100
SHELL => /bin/bash
SSH_CLIENT => 66.190.230.112 49240 22
OLDPWD => /opt/moodle/admin
SSH_TTY => /dev/pts/4
USER => fischerj
LS_COLORS => rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arj=01;3
1:*.taz=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.dz=01;31:*.gz=01;31:*.lz=01;31:*.xz=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.de
b=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.jpg=01;35:*.jpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.
pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;
35:*.webm=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=0
1;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.axv=01;35:*.anx=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3
=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.axa=00;36:*.oga=00;36:*.spx=00;36:*.xspf=00;36:
WEBWORK_ROOT => /opt/webwork/webwork2
MAIL => /var/mail/fischerj
PATH => /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/opt/webwork/webwork2/bin
QT_QPA_PLATFORMTHEME => appmenu-qt5
PWD => /opt/moodle/admin/cli
LANG => en_US.UTF-8
SHLVL => 1
HOME => /home/fischerj
PG_ROOT => /opt/webwork/pg
LOGNAME => fischerj
SSH_CONNECTION => 66.190.230.112 49240 172.29.0.154 22
LESSOPEN => | /usr/bin/lesspipe %s
XDG_RUNTIME_DIR => /run/user/1001
LESSCLOSE => /usr/bin/lesspipe %s %s
_ => /usr/bin/php

PHP Variables

Variable => Value
_SERVER["XDG_SESSION_ID"] => 18
_SERVER["TERM"] => vt100
_SERVER["SHELL"] => /bin/bash
_SERVER["SSH_CLIENT"] => 66.190.230.112 49240 22
_SERVER["OLDPWD"] => /opt/moodle/admin
_SERVER["SSH_TTY"] => /dev/pts/4
_SERVER["USER"] => fischerj
_SERVER["LS_COLORS"] => rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31
:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.dz=01;31:*.gz=01;31:*.lz=01;31:*.xz=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz
=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.jpg=01;35:*.jpeg=01;35:*.gif=01;35:*.bmp=01;35:*.p
bm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;3
5:*.mkv=01;35:*.webm=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=0
1;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.axv=01;35:*.anx=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.mid=00;36:*.midi=00;36:*.mka=
00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.axa=00;36:*.oga=00;36:*.spx=00;36:*.xspf=00;36:
_SERVER["WEBWORK_ROOT"] => /opt/webwork/webwork2
_SERVER["MAIL"] => /var/mail/fischerj
_SERVER["PATH"] => /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/opt/webwork/webwork2/bin
_SERVER["QT_QPA_PLATFORMTHEME"] => appmenu-qt5
_SERVER["PWD"] => /opt/moodle/admin/cli
_SERVER["LANG"] => en_US.UTF-8
_SERVER["SHLVL"] => 1
_SERVER["HOME"] => /home/fischerj
_SERVER["PG_ROOT"] => /opt/webwork/pg
_SERVER["LOGNAME"] => fischerj
_SERVER["SSH_CONNECTION"] => 66.190.230.112 49240 172.29.0.154 22
_SERVER["LESSOPEN"] => | /usr/bin/lesspipe %s
_SERVER["XDG_RUNTIME_DIR"] => /run/user/1001
_SERVER["LESSCLOSE"] => /usr/bin/lesspipe %s %s
_SERVER["_"] => /usr/bin/php
_SERVER["PHP_SELF"] =>
_SERVER["SCRIPT_NAME"] =>
_SERVER["SCRIPT_FILENAME"] =>
_SERVER["PATH_TRANSLATED"] =>
_SERVER["DOCUMENT_ROOT"] =>
_SERVER["REQUEST_TIME_FLOAT"] => 1462652324.731
_SERVER["REQUEST_TIME"] => 1462652324
_SERVER["argv"] => Array
(
)

_SERVER["argc"] => 0

PHP License
This program is free software; you can redistribute it and/or modify
it under the terms of the PHP License as published by the PHP Group
and included in the distribution in the file:  LICENSE

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

If you did not receive a copy of the PHP license, or have any
questions about PHP licensing, please contact license@php.net.

In reply to Jim Fischer

Re: Problems using Git to Upgrade Moodle

by Ken Task -
Picture of Particularly helpful Moodlers

Well, that it explains a lot ... :\

It might be ubuntu but it's evidently configured/under something called webwork

_SERVER["WEBWORK_ROOT"] => /opt/webwork/webwork2

which, according to what I can find via Googling is ...

"What is WeBWorK? WeBWorK is an open-source online homework system for math and sciences courses. WeBWorK is supported by the MAA and the NSF and ..."

That ain't Moodle.

So think your best bet for support adding a moodle to that mix might be forums etc. for Webwork.

but here's Moodle doc:

https://docs.moodle.org/30/en/Step-by-step_Installation_Guide_for_Ubuntu

But you may not be able to follow that doc by copy and paste considering your machine is not a true typically configured Ubuntu server.

So number 2 of your original posting should have been NUMBER !

"I am also trying to get Moodle to interact with WeBWorK 2.11.  I followed the instructions at the WebWork wiki. I installed wwassignment module. However, when I go to notifications in moodle (as administrator) , there is no information about the wwassignment module."

According to this:
http://webwork.maa.org/wiki/Moodle_Integration#.Vy5bl2Y_f-c
Supposedly It's compat with 1.9 series and 2.x of Moodle.  If they make that claim, they should be the ones to prove it by providing support for that.

'spirit of sharing', Ken

In reply to Jim Fischer

Re: Problems using Git to Upgrade Moodle

by Ken Task -
Picture of Particularly helpful Moodlers

Wait a minute here .... /opt/moodle/ appears to be code for moodle and that's all.   If a Moodle has been installed there would be a config.php file in /opt/moodle/.   The attempts at running anything in admin/cli/ all would fail if those scripts cannot find /opt/moodle/config.php

Open the upgrade.php script with a on server text editor like nano and one will see these lines near the beginning of the script:

upgrade.php:require(dirname(dirname(dirname(__FILE__))).'/config.php');
upgrade.php:require_once($CFG->libdir.'/adminlib.php');       // various admin-only functions
upgrade.php:require_once($CFG->libdir.'/upgradelib.php');     // general upgrade/install related functions
upgrade.php:require_once($CFG->libdir.'/clilib.php');         // cli only functions
upgrade.php:require_once($CFG->libdir.'/environmentlib.php');
upgrade.php:                      required in non-interactive mode.
upgrade.php:require("$CFG->dirroot/version.php");       // defines $version, $release, $branch and $maturity

See all those 'required_once lines ... they have to find the libdir and .php files at those locations + the version.php file from a variable that is coming from config.php ... the dirroot variable.

The only time I've heard of Moodle being installed in /opt/ is from a Fedora repo.   Is that how you acquired the original code for moodle?

Is the code in /opt/moodle/ really associated with a functioning Moodle?    Is there a config.php file located there?   If so, share it back here.

'spirit of sharing', Ken


In reply to Ken Task

Re: Problems using Git to Upgrade Moodle

by Jim Fischer -

I used the steps found here to install Moodle :

           https://docs.moodle.org/29/en/Step-by-step_Installation_Guide_for_Ubuntu

See step 4 for where it has me put moodle in /opt

The moodle has been up and running (ver 2.6) and I created a test course. I havent done much else with moodle, but when I ran thru the installation, I did not get any errors (that I know of)

I did not see a config.php in moodle, but there is a config-dist.php:


///////////////////////////////////////////////////////////////////////////
//                                                                       //
// Moodle configuration file                                             //
//                                                                       //
// This file should be renamed "config.php" in the top-level directory   //
//                                                                       //
///////////////////////////////////////////////////////////////////////////
//                                                                       //
// NOTICE OF COPYRIGHT                                                   //
//                                                                       //
// Moodle - Modular Object-Oriented Dynamic Learning Environment         //
//          http://moodle.org                                            //
//                                                                       //
// Copyright (C) 1999 onwards  Martin Dougiamas  http://moodle.com       //
//                                                                       //
// This program is free software; you can redistribute it and/or modify  //
// it under the terms of the GNU General Public License as published by  //
// the Free Software Foundation; either version 3 of the License, or     //
// (at your option) any later version.                                   //
//                                                                       //
// This program is distributed in the hope that it will be useful,       //
// but WITHOUT ANY WARRANTY; without even the implied warranty of        //
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         //
// GNU General Public License for more details:                          //
//                                                                       //
//          http://www.gnu.org/copyleft/gpl.html                         //
//                                                                       //
///////////////////////////////////////////////////////////////////////////
unset($CFG);  // Ignore this line
global $CFG;  // This is necessary here for PHPUnit execution
$CFG = new stdClass();

//=========================================================================
// 1. DATABASE SETUP
//=========================================================================
// First, you need to configure the database where all Moodle data       //
// will be stored.  This database must already have been created         //
// and a username/password created to access it.                         //

$CFG->dbtype    = 'pgsql';      // 'pgsql', 'mariadb', 'mysqli', 'mssql', 'sqlsrv' or 'oci'
$CFG->dblibrary = 'native';     // 'native' only at the moment
$CFG->dbhost    = 'localhost';  // eg 'localhost' or 'db.isp.com' or IP
$CFG->dbname    = 'moodle';     // database name, eg moodle
$CFG->dbuser    = 'username';   // your database username
$CFG->dbpass    = 'password';   // your database password
$CFG->prefix    = 'mdl_';       // prefix to use for all table names
$CFG->dboptions = array(
    'dbpersist' => false,       // should persistent database connections be
                                           //  setting, 'true' can improve performance
                                //  sometimes
    'dbsocket'  => false,       // should connection via UNIX socket be used?
                                //  if you set it to 'true' or custom path
                                //  here set dbhost to 'localhost',
                                //  (please note mysql is always using socket
                                //  if dbhost is 'localhost' - if you need
                                //  local port connection use '127.0.0.1')
    'dbport'    => '',          // the TCP port number to use when connecting
                                //  to the server. keep empty string for the
                                //  default port
);


//=========================================================================
// 2. WEB SITE LOCATION
//=========================================================================
// Now you need to tell Moodle where it is located. Specify the full
// web address to where moodle has been installed.  If your web site
// is accessible via multiple URLs then choose the most natural one
// that your students would use.  Do not include a trailing slash
//
// If you need both intranet and Internet access please read
// http://docs.moodle.org/en/masquerading

$CFG->wwwroot   = 'http://example.com/moodle';


//=========================================================================
// 3. DATA FILES LOCATION
//=========================================================================
// Now you need a place where Moodle can save uploaded files.  This
// directory should be readable AND WRITEABLE by the web server user
// (usually 'nobody' or 'apache'), but it should not be accessible
// directly via the web.
//
// - On hosting systems you might need to make sure that your "group" has
//   no permissions at all, but that "others" have full permissions.
//
// - On Windows systems you might specify something like 'c:\moodledata'

$CFG->dataroot  = '/home/example/moodledata';


//=========================================================================
// 4. DATA FILES PERMISSIONS
//=========================================================================
// The following parameter sets the permissions of new directories
// created by Moodle within the data directory.  The format is in
// octal format (as used by the Unix utility chmod, for example).
                     //  used? set to 'false' for the most stable

// The default is usually OK, but you may want to change it to 0750
// if you are concerned about world-access to the files (you will need
// to make sure the web server process (eg Apache) can access the files.
// NOTE: the prefixed 0 is important, and don't use quotes.

$CFG->directorypermissions = 02777;


//=========================================================================
// 5. DIRECTORY LOCATION  (most people can just ignore this setting)
//=========================================================================
// A very few webhosts use /admin as a special URL for you to access a
// control panel or something.  Unfortunately this conflicts with the
// standard location for the Moodle admin pages.  You can work around this
// by renaming the admin directory in your installation, and putting that
// new name here.  eg "moodleadmin".  This should fix all admin links in Moodle.
// After any change you need to visit your new admin directory
// and purge all caches.

$CFG->admin = 'admin';


//=========================================================================
// 6. OTHER MISCELLANEOUS SETTINGS (ignore these for new installations)
//=========================================================================
//
// These are additional tweaks for which no GUI exists in Moodle yet.
//
// Starting in PHP 5.3 administrators should specify default timezone
// in PHP.ini, you can also specify it here if needed.
// See details at: http://php.net/manual/en/function.date-default-timezone-set.php
// List of time zones at: http://php.net/manual/en/timezones.php
//     date_default_timezone_set('Australia/Perth');
//
// Change the key pair lifetime for Moodle Networking
// The default is 28 days. You would only want to change this if the key
// was not getting regenerated for any reason. You would probably want
// make it much longer. Note that you'll need to delete and manually update
// any existing key.
//      $CFG->mnetkeylifetime = 28;
//
// Not recommended: Set the following to true to allow the use
// off non-Moodle standard characters in usernames.
//      $CFG->extendedusernamechars = true;
//
// Allow user passwords to be included in backup files. Very dangerous
// setting as far as it publishes password hashes that can be unencrypted
// if the backup file is publicy available. Use it only if you can guarantee
// that all your backup files remain only privacy available and are never
// shared out from your site/institution!
//      $CFG->includeuserpasswordsinbackup = true;
//
// Completely disable user creation when restoring a course, bypassing any
// permissions granted via roles and capabilities. Enabling this setting
// results in the restore process stopping when a user attempts to restore a
// course requiring users to be created.
//     $CFG->disableusercreationonrestore = true;
//
// Keep the temporary directories used by backup and restore without being
// deleted at the end of the process. Use it if you want to debug / view
// all the information stored there after the process has ended. Note that
// those directories may be deleted (after some ttl) both by cron and / or
// by new backup / restore invocations.
//     $CFG->keeptempdirectoriesonbackup = true;
//
// Modify the restore process in order to force the "user checks" to assume
// that the backup originated from a different site, so detection of matching
// users is performed with different (more "relaxed") rules. Note that this is
// only useful if the backup file has been created using Moodle < 1.9.4 and the
// site has been rebuilt from scratch using backup files (not the best way btw).
// If you obtain user conflicts on restore, rather than enabling this setting
// permanently, try restoring the backup on a different site, back it up again
// and then restore on the target server.
//    $CFG->forcedifferentsitecheckingusersonrestore = true;
//
// Force the backup system to continue to create backups in the legacy zip
// format instead of the new tgz format. Does not affect restore, which
// auto-detects the underlying file format.
//    $CFG->usezipbackups = true;
//
// Prevent stats processing and hide the GUI
//      $CFG->disablestatsprocessing = true;
//
// Setting this to true will enable admins to edit any post at any time
//      $CFG->admineditalways = true;
//
// These variables define DEFAULT block variables for new courses
// If this one is set it overrides all others and is the only one used.
//      $CFG->defaultblocks_override = 'participants,activity_modules,search_forums,course_list:news_items,calendar_upcoming,recent_activity';
//
// These variables define the specific settings for defined course formats.
// They override any settings defined in the formats own config file.
//      $CFG->defaultblocks_site = 'site_main_menu,course_list:course_summary,calendar_month';
//      $CFG->defaultblocks_social = 'participants,search_forums,calendar_month,calendar_upcoming,social_activities,recent_activity,course_list';
//      $CFG->defaultblocks_topics = 'participants,activity_modules,search_forums,course_list:news_items,calendar_upcoming,recent_activity';
//      $CFG->defaultblocks_weeks = 'participants,activity_modules,search_forums,course_list:news_items,calendar_upcoming,recent_activity';
//
// These blocks are used when no other default setting is found.
//      $CFG->defaultblocks = 'participants,activity_modules,search_forums,course_list:news_items,calendar_upcoming,recent_activity';
//
// These blocks are used when no other default setting is found.
//      $CFG->defaultblocks = 'participants,activity_modules,search_forums,course_list:news_items,calendar_upcoming,recent_activity';
//
// You can specify a different class to be created for the $PAGE global, and to
// compute which blocks appear on each page. However, I cannot think of any good
// reason why you would need to change that. It just felt wrong to hard-code the
// the class name. You are strongly advised not to use these to settings unless
// you are absolutely sure you know what you are doing.
//      $CFG->moodlepageclass = 'moodle_page';
//      $CFG->moodlepageclassfile = "$CFG->dirroot/local/myplugin/mypageclass.php";
//      $CFG->blockmanagerclass = 'block_manager';
//      $CFG->blockmanagerclassfile = "$CFG->dirroot/local/myplugin/myblockamanagerclass.php";
//
// Seconds for files to remain in caches. Decrease this if you are worried
// about students being served outdated versions of uploaded files.
//     $CFG->filelifetime = 60*60*6;
//
// Some web servers can offload the file serving from PHP process,
// comment out one the following options to enable it in Moodle:
//     $CFG->xsendfile = 'X-Sendfile';           // Apache {@see https://tn123.org/mod_xsendfile/}
//     $CFG->xsendfile = 'X-LIGHTTPD-send-file'; // Lighttpd {@see http://redmine.lighttpd.net/projects/lighttpd/wiki/X-LIGHTTPD-send-file}
//     $CFG->xsendfile = 'X-Accel-Redirect';     // Nginx {@see http://wiki.nginx.org/XSendfile}
// If your X-Sendfile implementation (usually Nginx) uses directory aliases specify them
// in the following array setting:
//     $CFG->xsendfilealiases = array(
//         '/dataroot/' => $CFG->dataroot,
//         '/cachedir/' => '/var/www/moodle/cache',    // for custom $CFG->cachedir locations
//         '/localcachedir/' => '/var/local/cache',    // for custom $CFG->localcachedir locations
//         '/tempdir/'  => '/var/www/moodle/temp',     // for custom $CFG->tempdir locations
//         '/filedir'   => '/var/www/moodle/filedir',  // for custom $CFG->filedir locations
//     );
//
// YUI caching may be sometimes improved by slasharguments:
//     $CFG->yuislasharguments = 1;
// Some servers may need a special rewrite rule to work around internal path length limitations:
// RewriteRule (^.*/theme/yui_combo\.php)(/.*) $1?file=$2
//
//
// Following settings may be used to select session driver, uncomment only one of the handlers.
//   Database session handler (not compatible with MyISAM):
//      $CFG->session_handler_class = '\core\session\database';
//      $CFG->session_database_acquire_lock_timeout = 120;
//
//   File session handler (file system locking required):
//      $CFG->session_handler_class = '\core\session\file';
//      $CFG->session_file_save_path = $CFG->dataroot.'/sessions';
//
//   Memcached session handler (requires memcached server and extension):
//      $CFG->session_handler_class = '\core\session\memcached';
//      $CFG->session_memcached_save_path = '127.0.0.1:11211';
//      $CFG->session_memcached_prefix = 'memc.sess.key.';
//      $CFG->session_memcached_acquire_lock_timeout = 120;
//      $CFG->session_memcached_lock_expire = 7200;       // Ignored if PECL memcached is below version 2.2.0
//
//   Memcache session handler (requires memcached server and memcache extension):
//      $CFG->session_handler_class = '\core\session\memcache';
//      $CFG->session_memcache_save_path = '127.0.0.1:11211';
//      $CFG->session_memcache_acquire_lock_timeout = 120;
//      ** NOTE: Memcache extension has less features than memcached and may be
//         less reliable. Use memcached where possible or if you encounter
//         session problems. **
//
// Please be aware that when selecting either Memcached or Memcache for sessions that it is advised to use a dedicated
// memcache server. The memcache and memcached extensions do not provide isolated environments for individual uses.
// Using the same server for other purposes (MUC for example) can lead to sessions being prematurely removed should
// the other uses of the server purge the cache.
//
// Following setting allows you to alter how frequently is timemodified updated in sessions table.
//      $CFG->session_update_timemodified_frequency = 20; // In seconds.
//
// If this setting is set to true, then Moodle will track the IP of the
// current user to make sure it hasn't changed during a session.  This
// will prevent the possibility of sessions being hijacked via XSS, but it
// may break things for users coming using proxies that change all the time,
// like AOL.
//      $CFG->tracksessionip = true;
//
// The following lines are for handling email bounces.
//      $CFG->handlebounces = true;
//      $CFG->minbounces = 10;
//      $CFG->bounceratio = .20;
// The next lines are needed both for bounce handling and any other email to module processing.
// mailprefix must be EXACTLY four characters.
// Uncomment and customise this block for Postfix
//      $CFG->mailprefix = 'mdl+'; // + is the separator for Exim and Postfix.
//      $CFG->mailprefix = 'mdl-'; // - is the separator for qmail
//      $CFG->maildomain = 'youremaildomain.com';
//
// Enable when setting up advanced reverse proxy load balancing configurations,
// it may be also necessary to enable this when using port forwarding.
//      $CFG->reverseproxy = true;
//
// Enable when using external SSL appliance for performance reasons.
// Please note that site may be accessible via http: or https:, but not both!
//      $CFG->sslproxy = true;
//
// This setting will cause the userdate() function not to fix %d in
// date strings, and just let them show with a zero prefix.
//      $CFG->nofixday = true;
//
// This setting will make some graphs (eg user logs) use lines instead of bars
//      $CFG->preferlinegraphs = true;
//
// Enabling this will allow custom scripts to replace existing moodle scripts.
// For example: if $CFG->customscripts/course/view.php exists then
// it will be used instead of $CFG->wwwroot/course/view.php
// At present this will only work for files that include config.php and are called
// as part of the url (index.php is implied).
// Some examples are:
//      http://my.moodle.site/course/view.php
//      http://my.moodle.site/index.php
//      http://my.moodle.site/admin            (index.php implied)
// Custom scripts should not include config.php
// Warning: Replacing standard moodle scripts may pose security risks and/or may not
// be compatible with upgrades. Use this option only if you are aware of the risks
// involved.
// Specify the full directory path to the custom scripts
//      $CFG->customscripts = '/home/example/customscripts';
//
// Performance profiling
//
//   If you set Debug to "Yes" in the Configuration->Variables page some
//   performance profiling data will show up on your footer (in default theme).
//   With these settings you get more granular control over the capture
//   and printout of the data
//
//   Capture performance profiling data
//   define('MDL_PERF'  , true);
//
//   Capture additional data from DB
//   define('MDL_PERFDB'  , true);
//
//   Print to log (for passive profiling of production servers)
//   define('MDL_PERFTOLOG'  , true);
//
//   Print to footer (works with the default theme)
//   define('MDL_PERFTOFOOT', true);
//
//   Enable earlier profiling that causes more code to be covered
//   on every request (db connections, config load, other inits...).
//   Requires extra configuration to be defined in config.php like:
//   profilingincluded, profilingexcluded, profilingautofrec,
//   profilingallowme, profilingallowall, profilinglifetime
//       $CFG->earlyprofilingenabled = true;
//
// Force displayed usernames
//   A little hack to anonymise user names for all students.  If you set these
//   then all non-teachers will always see these for every person.
//       $CFG->forcefirstname = 'Bruce';
//       $CFG->forcelastname  = 'Simpson';
//
// The following setting will turn on username logging into Apache log. For full details regarding setting
// up of this function please refer to the install section of the document.
//     $CFG->apacheloguser = 0; // Turn this feature off. Default value.
//     $CFG->apacheloguser = 1; // Log user id.
//     $CFG->apacheloguser = 2; // Log full name in cleaned format. ie, Darth Vader will be displayed as darth_vader.
//     $CFG->apacheloguser = 3; // Log username.
// To get the values logged in Apache's log, add to your httpd.conf
// the following statements. In the General part put:
//     LogFormat "%h %l %{MOODLEUSER}n %t \"%r\" %s %b \"%{Referer}i\" \"%{User-Agent}i\"" moodleformat
// And in the part specific to your Moodle install / virtualhost:
//     CustomLog "/your/path/to/log" moodleformat
// CAUTION: Use of this option will expose usernames in the Apache log,
// If you are going to publish your log, or the output of your web stats analyzer
// this will weaken the security of your website.
//
// Email database connection errors to someone.  If Moodle cannot connect to the
// database, then email this address with a notice.
//
//     $CFG->emailconnectionerrorsto = 'your@emailaddress.com';
//
// Set the priority of themes from highest to lowest. This is useful (for
// example) in sites where the user theme should override all other theme
// settings for accessibility reasons. You can also disable types of themes
// (other than site)  by removing them from the array. The default setting is:
//      $CFG->themeorder = array('course', 'category', 'session', 'user', 'site');
// NOTE: course, category, session, user themes still require the
// respective settings to be enabled
//
// It is possible to add extra themes directory stored outside of $CFG->dirroot.
// This local directory does not have to be accessible from internet.
//
//     $CFG->themedir = '/location/of/extra/themes';
//
// It is possible to specify different cache and temp directories, use local fast filesystem
// for normal web servers. Server clusters MUST use shared filesystem for cachedir!
// Localcachedir is intended for server clusters, it does not have to be shared by cluster nodes.
// The directories must not be accessible via web.
//
//     $CFG->tempdir = '/var/www/moodle/temp';        // Directory MUST BE SHARED by all clsuter nodes.
//     $CFG->cachedir = '/var/www/moodle/cache';      // Directory MUST BE SHARED by all cluster nodes, locking required.
//     $CFG->localcachedir = '/var/local/cache';      // Intended for local node caching.
//
// Some filesystems such as NFS may not support file locking operations.
// Locking resolves race conditions and is strongly recommended for production servers.

//     $CFG->preventfilelocking = false;
//
// Site default language can be set via standard administration interface. If you
// want to have initial error messages for eventual database connection problems
// localized too, you have to set your language code here.
//
//     $CFG->lang = 'yourlangcode'; // for example 'cs'
//
// When Moodle is about to perform an intensive operation it raises PHP's memory
// limit. The following setting should be used on large sites to set the raised
// memory limit to something higher.
// The value for the settings should be a valid PHP memory value. e.g. 512M, 1G
//
//     $CFG->extramemorylimit = '1024M';
//
// Moodle 2.4 introduced a new cache API.
// The cache API stores a configuration file within the Moodle data directory and
// uses that rather than the database in order to function in a stand-alone manner.
// Using altcacheconfigpath you can change the location where this config file is
// looked for.
// It can either be a directory in which to store the file, or the full path to the
// file if you want to take full control. Either way it must be writable by the
// webserver.
//
//     $CFG->altcacheconfigpath = '/var/www/shared/moodle.cache.config.php
//
// The CSS files the Moodle produces can be extremely large and complex, especially
// if you are using a custom theme that builds upon several other themes.
// In Moodle 2.3 a CSS optimiser was added as an experimental feature for advanced
// users. The CSS optimiser organises the CSS in order to reduce the overall number
// of rules and styles being sent to the client. It does this by collating the
// CSS before it is cached removing excess styles and rules and stripping out any
// extraneous content such as comments and empty rules.
// The following settings are used to enable and control the optimisation.
//
// Enable the CSS optimiser. This will only optimise the CSS if themedesignermode
// is not enabled. This can be set through the UI however it is noted here as well
// because the other CSS optimiser settings can not be set through the UI.
//
//      $CFG->enablecssoptimiser = true;
//
// If set the CSS optimiser will add stats about the optimisation to the top of
// the optimised CSS file. You can then inspect the CSS to see the affect the CSS
// optimiser is having.
//
//      $CFG->cssoptimiserstats = true;
//
// If set the CSS that is optimised will still retain a minimalistic formatting
// so that anyone wanting to can still clearly read it.
//
//      $CFG->cssoptimiserpretty = true;
//
// Use the following flag to completely disable the Available update notifications
// feature and hide it from the server administration UI.
//
//      $CFG->disableupdatenotifications = true;
//
// Use the following flag to completely disable the installation of plugins
// (new plugins, available updates and missing dependencies) and related
// features (such as cancelling the plugin installation or upgrade) via the
// server administration web interface.
//
//      $CFG->disableupdateautodeploy = true;
//
// Use the following flag to disable modifications to scheduled tasks
// whilst still showing the state of tasks.
//
//      $CFG->preventscheduledtaskchanges = true;
//
// As of version 2.4 Moodle serves icons as SVG images if the users browser appears
// to support SVG.
// For those wanting to control the serving of SVG images the following setting can
// be defined in your config.php.
// If it is not defined then the default (browser detection) will occur.
//
// To ensure they are always used when available:
//      $CFG->svgicons = true;
//
// To ensure they are never used even when available:
//      $CFG->svgicons = false;
//
// Some administration options allow setting the path to executable files. This can
// potentially cause a security risk. Set this option to true to disable editing
// those config settings via the web. They will need to be set explicitly in the
// config.php file
//      $CFG->preventexecpath = true;
//
// Use the following flag to set userid for noreply user. If not set then moodle will
// create dummy user and use -ve value as user id.
//      $CFG->noreplyuserid = -10;
//
// As of version 2.6 Moodle supports admin to set support user. If not set, all mails
// will be sent to supportemail.
//      $CFG->supportuserid = -20;
//
// Moodle 2.7 introduces a locking api for critical tasks (e.g. cron).
// The default locking system to use is DB locking for Postgres, and file locking for
// MySQL, Oracle and SQLServer. If $CFG->preventfilelocking is set, then the default
// will always be DB locking. It can be manually set to one of the lock
// factory classes listed below, or one of your own custom classes implementing the
// \core\lock\lock_factory interface.
//
//      $CFG->lock_factory = "auto";
//
// The list of available lock factories is:
//
// "\\core\\lock\\file_lock_factory" - File locking
//      Uses lock files stored by default in the dataroot. Whether this
//      works on clusters depends on the file system used for the dataroot.
//
// "\\core\\lock\\db_record_lock_factory" - DB locking based on table rows.
//
// "\\core\\lock\\postgres_lock_factory" - DB locking based on postgres advisory locks.
//
// Settings used by the lock factories
//
// Location for lock files used by the File locking factory. This must exist
// on a shared file system that supports locking.
//      $CFG->lock_file_root = $CFG->dataroot . '/lock';
//
// Moodle 2.9 allows administrators to customise the list of supported file types.
// To add a new filetype or override the definition of an existing one, set the
// customfiletypes variable like this:
//
// $CFG->customfiletypes = array(
//     (object)array(
//         'extension' => 'frog',
//         'icon' => 'archive',
//         'type' => 'application/frog',
//         'customdescription' => 'Amphibian-related file archive'
//     )
// );
//
// The extension, icon, and type fields are required. The icon field can refer to
// any icon inside the pix/f folder. You can also set the customdescription field
// (shown above) and (for advanced use) the groups, string, and defaulticon fields.
//
// Upgrade key
//
// If the upgrade key is defined here, then the value must be provided every time
// the site is being upgraded though the web interface, regardless of whether the
// administrator is logged in or not. This prevents anonymous access to the upgrade
// screens where the real authentication and authorization mechanisms can not be
// relied on.
// Upgrade key
//
// If the upgrade key is defined here, then the value must be provided every time
// the site is being upgraded though the web interface, regardless of whether the
// administrator is logged in or not. This prevents anonymous access to the upgrade
// screens where the real authentication and authorization mechanisms can not be
// relied on.
//
// It is strongly recommended to use a value different from your real account
// password.
//
//      $CFG->upgradekey = 'put_some_password-like_value_here';
//
//=========================================================================
// 7. SETTINGS FOR DEVELOPMENT SERVERS - not intended for production use!!!
//=========================================================================
//
// Force a debugging mode regardless the settings in the site administration
// @error_reporting(E_ALL | E_STRICT); // NOT FOR PRODUCTION SERVERS!
// @ini_set('display_errors', '1');    // NOT FOR PRODUCTION SERVERS!
// $CFG->debug = (E_ALL | E_STRICT);   // === DEBUG_DEVELOPER - NOT FOR PRODUCTION SERVERS!
// $CFG->debugdisplay = 1;             // NOT FOR PRODUCTION SERVERS!
//
// You can specify a comma separated list of user ids that that always see
// debug messages, this overrides the debug flag in $CFG->debug and $CFG->debugdisplay
// for these users only.
// $CFG->debugusers = '2';
//
// Prevent theme caching
// $CFG->themedesignermode = true; // NOT FOR PRODUCTION SERVERS!
//
// Prevent JS caching
// $CFG->cachejs = false; // NOT FOR PRODUCTION SERVERS!
//
// Restrict which YUI logging statements are shown in the browser console.
// For details see the upstream documentation:
//   http://yuilibrary.com/yui/docs/api/classes/config.html#property_logInclude
//   http://yuilibrary.com/yui/docs/api/classes/config.html#property_logExclude
// $CFG->yuiloginclude = array(
//     'moodle-core-dock-loader' => true,
//     'moodle-course-categoryexpander' => true,
// );
// $CFG->yuilogexclude = array(
//     'moodle-core-dock' => true,
//     'moodle-core-notification' => true,
// );
//
// Set the minimum log level for YUI logging statements.
// For details see the upstream documentation:
//   http://yuilibrary.com/yui/docs/api/classes/config.html#property_logLevel
// $CFG->yuiloglevel = 'debug';
//
// Prevent core_string_manager application caching
// $CFG->langstringcache = false; // NOT FOR PRODUCTION SERVERS!
//
// When working with production data on test servers, no emails or other messages
// should ever be send to real users
// $CFG->noemailever = true;    // NOT FOR PRODUCTION SERVERS!
//
// Divert all outgoing emails to this address to test and debug emailing features
// $CFG->divertallemailsto = 'root@localhost.local'; // NOT FOR PRODUCTION SERVERS!
//
// Uncomment if you want to allow empty comments when modifying install.xml files.
// $CFG->xmldbdisablecommentchecking = true;    // NOT FOR PRODUCTION SERVERS!
//
// Since 2.0 sql queries are not shown during upgrade by default.
// Please note that this setting may produce very long upgrade page on large sites.
// $CFG->upgradeshowsql = true; // NOT FOR PRODUCTION SERVERS!
//
// Add SQL queries to the output of cron, just before their execution
// $CFG->showcronsql = true;
//
// Force developer level debug and add debug info to the output of cron
// $CFG->showcrondebugging = true;
//
//=========================================================================
// 8. FORCED SETTINGS
//=========================================================================
// It is possible to specify normal admin settings here, the point is that
// they can not be changed through the standard admin settings pages any more.
//
// Core settings are specified directly via assignment to $CFG variable.
// Example:
//   $CFG->somecoresetting = 'value';
//
// Plugin settings have to be put into a special array.
// Example:
//   $CFG->forced_plugin_settings = array('pluginname'  => array('settingname' => 'value', 'secondsetting' => 'othervalue'),
//                                        'otherplugin' => array('mysetting' => 'myvalue', 'thesetting' => 'thevalue'));
// Module default settings with advanced/locked checkboxes can be set too. To do this, add
// an extra config with '_adv' or '_locked' as a suffix and set the value to true or false.
// Example:
//   $CFG->forced_plugin_settings = array('pluginname'  => array('settingname' => 'value', 'settingname_locked' => true, 'settingname_adv' => true));
//
//=========================================================================
// 9. PHPUNIT SUPPORT
//=========================================================================
//=========================================================================
// $CFG->phpunit_prefix = 'phpu_';
// $CFG->phpunit_dataroot = '/home/example/phpu_moodledata';
// $CFG->phpunit_directorypermissions = 02777; // optional
//
//
//=========================================================================
// 10. SECRET PASSWORD SALT
//=========================================================================
// A site-wide password salt is no longer used in new installations.
// If upgrading from 2.6 or older, keep all existing salts in config.php file.
//
// $CFG->passwordsaltmain = 'a_very_long_random_string_of_characters#@6&*1';
//
// You may also have some alternative salts to allow migration from previously
// used salts.
//
// $CFG->passwordsaltalt1 = '';
// $CFG->passwordsaltalt2 = '';
// $CFG->passwordsaltalt3 = '';
// ....
// $CFG->passwordsaltalt19 = '';
// $CFG->passwordsaltalt20 = '';
//
//
//=========================================================================
// 11. BEHAT SUPPORT
//=========================================================================
// Behat test site needs a unique www root, data directory and database prefix:
//
// $CFG->behat_wwwroot = 'http://127.0.0.1/moodle';
// $CFG->behat_prefix = 'bht_';
// $CFG->behat_dataroot = '/home/example/bht_moodledata';
//
// You can override default Moodle configuration for Behat and add your own
// params; here you can add more profiles, use different Mink drivers than Selenium...
// These params would be merged with the default Moodle behat.yml, giving priority
// to the ones specified here. The array format is YAML, following the Behat
// params hierarchy. More info: http://docs.behat.org/guides/7.config.html
// Example:
//   $CFG->behat_config = array(
//       'default' => array(
//           'formatter' => array(
//               'name' => 'pretty',
//               'parameters' => array(
//                   'decorated' => true,
//                   'verbose' => false
//               )
//           )
//       ),
//       'Mac-Firefox' => array(
//           'extensions' => array(
//               'Behat\MinkExtension\Extension' => array(
//                   'selenium2' => array(
//                       'browser' => 'firefox',
//                       'capabilities' => array(
//                           'platform' => 'OS X 10.6',
//                           'version' => 20
//                       )
//                   )
//               )
//           )
//       ),
//       'Mac-Safari' => array(
//           'extensions' => array(
//               'Behat\MinkExtension\Extension' => array(
//                   'selenium2' => array(
//                       'browser' => 'safari',
//                       'capabilities' => array(
//                           'platform' => 'OS X 10.8',
//                           'version' => 6
//                       )
//                   )
//               )
//           )
//       )
//   );
// You can also use the following config to override default Moodle configuration for Behat.
// This config is limited to default suite and will be supported in later versions.
// It will have precedence over $CFG->behat_config.
// $CFG->behat_profiles = array(
//     'phantomjs' => array(
//         'browser' => 'phantomjs',
//         'tags' => '~@_file_upload&&~@_alert&&~@_bug_phantomjs',
//         'wd_host' => 'http://127.0.0.1:4443/wd/hub',
//         'capabilities' => array(
//             'platform' => 'Linux',
//             'version' => 2.1
//         )
//     ),
// );
//
// You can force the browser session (not user's sessions) to restart after N seconds. This could
// be useful if you are using a cloud-based service with time restrictions in the browser side.
// Setting this value the browser session that Behat is using will be restarted. Set the time in
// seconds. Is not recommended to use this setting if you don't explicitly need it.
// Example:
//   $CFG->behat_restart_browser_after = 7200;     // Restarts the browser session after 2 hours
//
// All this page's extra Moodle settings are compared against a white list of allowed settings
// (the basic and behat_* ones) to avoid problems with production environments. This setting can be
// used to expand the default white list with an array of extra settings.
// Example:
//   $CFG->behat_extraallowedsettings = array('somecoresetting', ...);
//
// You should explicitly allow the usage of the deprecated behat steps, otherwise an exception will
// be thrown when using them. The setting is disabled by default.
// Example:
//   $CFG->behat_usedeprecated = true;
//
// Including feature files from directories outside the dirroot is possible if required. The setting
// requires that the running user has executable permissions on all parent directories in the paths.
// Example:
//   $CFG->behat_additionalfeatures = array('/home/developer/code/wipfeatures');
//
// You can make behat save several dumps when a scenario fails. The dumps currently saved are:
// * a dump of the DOM in it's state at the time of failure; and
// * a screenshot (JavaScript is required for the screenshot functionality, so not all browsers support this option)
// Example:
//   $CFG->behat_faildump_path = '/my/path/to/save/failure/dumps';
//
// You can specify db, selenium wd_host etc. for behat parallel run by setting following variable.
// Example:
//   $CFG->behat_parallel_run = array (
//       array (
//           'dbtype' => 'mysqli',
//           'dblibrary' => 'native',
//           'dbhost' => 'localhost',
//           'dbname' => 'moodletest',
//           'dbuser' => 'moodle',
//           'dbpass' => 'moodle',
//           'behat_prefix' => 'mdl_',
//           'wd_host' => 'http://127.0.0.1:4444/wd/hub',
//           'behat_wwwroot' => 'http://127.0.0.1/moodle',
//           'behat_dataroot' => '/home/example/bht_moodledata'
//       ),
//   );
//
// To change name of behat parallel run site, define BEHAT_PARALLEL_SITE_NAME and parallel run sites will be suffixed
// with this value
// Example:
//   define('BEHAT_PARALLEL_SITE_NAME', 'behatparallelsite');
//
// Command line output for parallel behat install is limited to 80 chars, if you are installing more then 4 sites and
// want to expand output to more then 80 chars, then define BEHAT_MAX_CMD_LINE_OUTPUT
// Example:
//   define('BEHAT_MAX_CMD_LINE_OUTPUT', 120);
//
// Behat feature files will be distributed randomly between the processes by default. If you have timing file or want
// to create timing file then define BEHAT_FEATURE_TIMING_FILE with path to timing file. It will be updated for each
// run with latest time taken to execute feature.
// Example:
//   define('BEHAT_FEATURE_TIMING_FILE', '/PATH_TO_TIMING_FILE/timing.json');
//
// If you don't have timing file and want some stable distribution of features, then you can use step counts to
// distribute the features. You can generate step file by executing php admin/tool/behat/cli/util.php --updatesteps
// this will update step file which is defined by BEHAT_FEATURE_STEP_FILE.
// Example:
//   define('BEHAT_FEATURE_STEP_FILE', '/PATH_TO_FEATURE_STEP_COUNT_FILE/stepcount.json');
//
// Feature distribution for each process is displayed as histogram. you can disable it by setting
// BEHAT_DISABLE_HISTOGRAM
// Example:
//   define('BEHAT_DISABLE_HISTOGRAM', true);
//
//=========================================================================
// 12. DEVELOPER DATA GENERATOR
//=========================================================================
//
// The developer data generator tool is intended to be used only in development or testing sites and
// it's usage in production environments is not recommended; if it is used to create JMeter test plans
// is even less recommended as JMeter needs to log in as site course users. JMeter needs to know the
// users passwords but would be dangerous to have a default password as everybody would know it, which would
// be specially dangerouse if somebody uses this tool in a production site, so in order to prevent unintended
// uses of the tool and undesired accesses as well, is compulsory to set a password for the users
// generated by this tool, but only in case you want to generate a JMeter test. The value should be a string.
// Example:
//   $CFG->tool_generator_users_password = 'examplepassword';
//
//=========================================================================
// 13. SYSTEM PATHS (You need to set following, depending on your system)
//=========================================================================
// Ghostscript path.
// On most Linux installs, this can be left as '/usr/bin/gs'.
// On Windows it will be something like 'c:\gs\bin\gswin32c.exe' (make sure
// there are no spaces in the path - if necessary copy the files 'gswin32c.exe'
// and 'gsdll32.dll' to a new folder without a space in the path)
//      $CFG->pathtogs = '/usr/bin/gs';
//
// Clam AV path.
// Probably something like /usr/bin/clamscan or /usr/bin/clamdscan. You need
// this in order for clam AV to run.
//      $CFG->pathtoclam = '';
//
// Path to du.
// Probably something like /usr/bin/du. If you enter this, pages that display
// directory contents will run much faster for directories with a lot of files.
//
// Behat feature files will be distributed randomly between the processes by default. If you have timing file or want
// to create timing file then define BEHAT_FEATURE_TIMING_FILE with path to timing file. It will be updated for each
// run with latest time taken to execute feature.
// Example:
//   define('BEHAT_FEATURE_TIMING_FILE', '/PATH_TO_TIMING_FILE/timing.json');
//
// If you don't have timing file and want some stable distribution of features, then you can use step counts to
// distribute the features. You can generate step file by executing php admin/tool/behat/cli/util.php --updatesteps
// this will update step file which is defined by BEHAT_FEATURE_STEP_FILE.
// Example:
//   define('BEHAT_FEATURE_STEP_FILE', '/PATH_TO_FEATURE_STEP_COUNT_FILE/stepcount.json');
//
// Feature distribution for each process is displayed as histogram. you can disable it by setting
// BEHAT_DISABLE_HISTOGRAM
// Example:
//   define('BEHAT_DISABLE_HISTOGRAM', true);
//
//=========================================================================
// 12. DEVELOPER DATA GENERATOR
//=========================================================================
//
// The developer data generator tool is intended to be used only in development or testing sites and
// it's usage in production environments is not recommended; if it is used to create JMeter test plans
// is even less recommended as JMeter needs to log in as site course users. JMeter needs to know the
// users passwords but would be dangerous to have a default password as everybody would know it, which would
// be specially dangerouse if somebody uses this tool in a production site, so in order to prevent unintended
// uses of the tool and undesired accesses as well, is compulsory to set a password for the users
// generated by this tool, but only in case you want to generate a JMeter test. The value should be a string.
// Example:
//   $CFG->tool_generator_users_password = 'examplepassword';
//
//=========================================================================
// 13. SYSTEM PATHS (You need to set following, depending on your system)
//=========================================================================
// Ghostscript path.
// On most Linux installs, this can be left as '/usr/bin/gs'.
// On Windows it will be something like 'c:\gs\bin\gswin32c.exe' (make sure
// there are no spaces in the path - if necessary copy the files 'gswin32c.exe'
// and 'gsdll32.dll' to a new folder without a space in the path)
//      $CFG->pathtogs = '/usr/bin/gs';
//
// Clam AV path.
// Probably something like /usr/bin/clamscan or /usr/bin/clamdscan. You need
// this in order for clam AV to run.
//      $CFG->pathtoclam = '';
//
// Path to du.
// Probably something like /usr/bin/du. If you enter this, pages that display
// directory contents will run much faster for directories with a lot of files.

In reply to Jim Fischer

Re: Problems using Git to Upgrade Moodle

by Jim Fischer -

More info:

WebWork is an online hw system and I did install WebWork first.  Webwork is also in the /opt directory.

I am working also with webwork folks on the integration of webwork and moodle, however I thought the installation of moodle questions would be better suited for this forum.


I will check at the webwork forum to see if I am using the incorrect moodle installation procedure.

In reply to Jim Fischer

Re: Problems using Git to Upgrade Moodle

by Ken Task -
Picture of Particularly helpful Moodlers

Just placing files in a web accessible root doesn't install a moodle.

Refer to the docs for installing a Moodle on ubuntu given previously since git is now acquiring the code you desire in that /opt/moodle code directory.    It still needs a DB and a data directory before you begin the install.

'spirit of sharing', Ken


In reply to Ken Task

Re: Problems using Git to Upgrade Moodle

by Jim Fischer -

Hi

I know that it takes more than just downloading moodle. I followed the steps   found here:

https://docs.moodle.org/29/en/Step-by-step_Installation_Guide_for_Ubuntu

I was able to succesfully get moodle 2.6 to work in that I can access the moodle page on our server from anywhere and I was able to create a course via the browser.  I had no errors on install.

I have been exploring my server to see where files are located.  It looks like moodle related stuff went to two or three places:


/opt/moodle


/var/moodledata


/var/www/html/moodle



The issue I still have is upgrading moodle to any newer version, for example 3.03.  After using git checkout and git pull,  when I open moodle at the browser and login as admin, I dont see anything new under Notifications. It still says version 2.6.11.

So the short of it is that I am seem to be stuck in the final stages of upgrading using git.  When I get home from work, I will double check server directory/file locations.

Thanks for any help.


Jf





In reply to Jim Fischer

Re: Problems using Git to Upgrade Moodle

by Ken Task -
Picture of Particularly helpful Moodlers

Dunno why Step 5 of those directions say what they do, but if you followed them, the real moodle code (the one served out by apache) is in /var/www/html/moodle.

To see if that directory was really acquired via git:

cd /var/www/html/moodle/

ls -l .git

See the 'dot' in front of 'git'?

You might have followed the git upgrade steps in /opt/moodle rather than document root /var/www/html/moodle. 

Here's how to check:

cd /opt/moodle

fgrep '$relase' version.php

says what?  Suspect this one says it's the higher version ... but /opt/moodle isn't being served out by apache thus what you see after logging on is no change cause you are going via browser to /var/www/html/moodle/

Apache doesn't show that directory ... you go to http://yoursite/moodle/ and apache actually serves out /var/www/html/moodle

So here's a way to know for sure.

cd /var/www/html/moodle

fgrep '$release' version.php

shows what?

If it shows 2.6.x, then execute your git commands in /var/www/html/moodle/ rather than /opt/moodle to upgrade the real moodle.

Advise checking again the commands to 'upgrade'.   It is usually best to acquire the highest of your current version first with a git pull only and then

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

Once that completes, strongly suggest backing up not only the DB (sql dump) but the code directory *before* attempting *upgrade* to any higher version.

I, for one, others will disagree, prefer to 'march a moodle' ... 2.6 -> 2.7 (stop test, ok then bacup) -> 2,8 (stop check, if ok then backup) -> 2.9 (etc.).

Remember you are 'hyperjumping from a 2.x series to a 3.x series.

You can, however, do as you like.

Once completed, suggest removing /opt/moodle as it serves no purpose any more and might avoid confusion in the future.

'spirit of sharing', Ken


In reply to Ken Task

Re: Problems using Git to Upgrade Moodle

by Jim Fischer -

Yes!

You are absolutely correct about what the issue is.  This clears up a lot of confusion for me.  I had found the two moodle directories, but thought this was intentional by whomever wrote those instructions and that the main moodle directory was /opt/moodle.  As you suspected, the version in /var/www/html/moodle was the one I was seeing via the browser.  I wonder if the step by step instructions page should to be modified?

I like your suggestion about "marching" up the releases.  I will go to version 2.7 first.  This also explains why the module I added for WebWork which I inserted into /opt/moodle wouldnt show up!

Thanks Ken for all of your help.  While I havent done the git commands yet, I am pretty confident they will work once I do them in the correct directory.


Jim


In reply to Jim Fischer

Re: Problems using Git to Upgrade Moodle

by Jim Fischer -

I knew I jinxed my self when I said the upgrade would go fine under /var/www/html/moodle.  I seem to be making things worse and a bit lost.

I just remembered that in my many attempts to make things work I had in fact run the git commands from within this directory the other day.  I did this with version 29 and today with 27. In my weak understanding of things, I thought git was doing the same things and that the directory where the git commands are done  didnt make a difference!  I seemed to have a made a mess of things.  Is there a way to undo the git pulls I did earlier from within /var/www/html/moodle?  Im not understanding why git wont allow me to "checkout" version 27 or 29 which are listed as branches.  Here are some results of commands (from /var/www/html/moodle):

/var/www/html/moodle$ sudo git status |more
On branch MOODLE_26_STABLE
Your branch is up-to-date with 'origin/MOODLE_26_STABLE'.

Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git checkout -- <file>..." to discard changes in working directory)

        modified:   .gitignore
        modified:   .jshintrc
        modified:   .shifter.json
       

etc...

/var/www/html/moodle$ sudo git branch -a
* MOODLE_26_STABLE
  MOODLE_27_STABLE
  MOODLE_29_STABLE
  master


when I went to "upgrade" to version 27 I got the following error:


var/www/html/moodle$ sudo git checkout MOODLE_27_STABLE
error: Your local changes to the following files would be overwritten by checkout:
        .gitignore
        admin/auth_config.php
        admin/category.php
        admin/cli/install.php
        admin/cli/install_database.php
        admin/enrol.php
        admin/environment.xml
        admin/handlevirus.php
        admin/index.php
        admin/lib.php
        admin/registration/confirmregistration.php
        admin/registration/index.php
        admin/registration/lib.php
        admin/registration/register.php
        admin/registration/renderer.php
        admin/renderer.php
        admin/reports.php
        admin/repository.php
        admin/roles/classes/existing_role_holders.php
        admin/roles/usersroles.php
        admin/search.php
        admin/settings.php
        admin/settings/appearance.php
        admin/settings/courses.php
        admin/settings/development.php
        admin/settings/grades.php
        admin/settings/plugins.php
        admin/settings/security.php
        admin/settings/server.php
        admin/settings/subsystems.php
        admin/settings/top.php
        admin/settings/users.php
        admin/tests/behat/behat_admin.php
        admin/tests/behat/display_short_names.feature
        admin/tests/behat/filter_users.feature
        admin/tests/behat/set_admin_settings_value.feature
        admin/tests/behat/upload_users.feature
        admin/tool/assignmentupgrade/version.php
        admin/tool/behat/cli/init.php
        admin/tool/behat/cli/util.php
        admin/tool/behat/index.php
        admin/tool/behat/lang/en/tool_behat.php
        admin/tool/behat/renderer.php
        admin/tool/behat/tests/behat/basic_actions.feature
        admin/tool/behat/tests/behat/data_generators.feature
        admin/tool/behat/tests/behat/edit_permissions.feature
        admin/tool/behat/tests/behat/get_and_set_fields.feature
        admin/tool/behat/tests/behat/list_steps.feature
        admin/tool/behat/tests/behat/manipulate_forms.feature
        admin/tool/behat/tests/behat/nasty_strings.feature
        admin/tool/behat/tests/tool_behat_test.php
        admin/tool/behat/version.php
        admin/tool/capability/index.php
        admin/tool/capability/lang/en/tool_capability.php
        admin/tool/capability/version.php
        admin/tool/capability/yui/build/moodle-tool_capability-search/moodle-tool_capability-search-debug.js
        admin/tool/capability/yui/build/moodle-tool_capability-search/moodle-tool_capability-search.js
        admin/tool/capability/yui/src/search/js/search.js
        admin/tool/customlang/db/upgrade.php
        admin/tool/customlang/index.php
        admin/tool/customlang/version.php
        admin/tool/dbtransfer/locallib.php
        admin/tool/dbtransfer/version.php
        admin/tool/generator/classes/backend.php
        admin/tool/generator/classes/course_backend.php
        admin/tool/generator/lang/en/tool_generator.php
        admin/tool/generator/tests/maketestcourse_test.php
        admin/tool/generator/version.php
        admin/tool/health/index.php
        admin/tool/health/version.php
        admin/tool/innodb/index.php
        admin/tool/innodb/version.php
        admin/tool/installaddon/lang/en/tool_installaddon.php
        admin/tool/installaddon/version.php
        admin/tool/langimport/index.php
        admin/tool/langimport/version.php
        admin/tool/multilangupgrade/index.php
        admin/tool/multilangupgrade/version.php
        admin/tool/phpunit/cli/util.php
        admin/tool/phpunit/version.php
        admin/tool/phpunit/webrunner.php
        admin/tool/profiling/version.php
        admin/tool/qeupgradehelper/README.txt
        admin/tool/qeupgradehelper/afterupgradelib.php
        admin/tool/qeupgradehelper/cli/convert.php
        admin/tool/qeupgradehelper/convertquiz.php
        admin/tool/qeupgradehelper/cronsetup.php
        admin/tool/qeupgradehelper/cronsetup_form.php
        admin/tool/qeupgradehelper/db/install.php
        admin/tool/qeupgradehelper/extracttestcase.php
        admin/tool/qeupgradehelper/extracttestcase_form.php
        admin/tool/qeupgradehelper/index.php
        admin/tool/qeupgradehelper/lang/en/tool_qeupgradehelper.php
        admin/tool/qeupgradehelper/lib.php
        admin/tool/qeupgradehelper/listpreupgrade.php
        admin/tool/qeupgradehelper/listtodo.php
        admin/tool/qeupgradehelper/listupgraded.php
        admin/tool/qeupgradehelper/locallib.php
        admin/tool/qeupgradehelper/partialupgrade-example.php
        admin/tool/qeupgradehelper/renderer.php
        admin/tool/qeupgradehelper/resetquiz.php
        admin/tool/qeupgradehelper/settings.php
        admin/tool/qeupgradehelper/styles.css
        admin/tool/qeupgradehelper/version.php
        admin/tool/replace/lang/en/tool_replace.php
        admin/tool/replace/version.php
        admin/
Aborting


Here's what I get with ls -l .git

/var/www/html/moodle$ ls -l .git
total 2936
drwxrwxrwx   2 root root    4096 Apr 30 22:33 branches
-rwxrwxrwx   1 root root  753403 May  3 23:07 #COMMIT_EDITMSG#
-rwxrwxrwx   1 root root  753399 May  3 23:05 COMMIT_EDITMSG
-rw-r--r--   1 root root     502 May 14 07:12 config
-rwxrwxrwx   1 root root      73 Apr 30 22:31 description
-rwxrwxrwx   1 root root    2105 May 14 07:13 FETCH_HEAD
-rwxrwxrwx   1 root root      33 Apr 30 22:31 HEAD
drwxrwxrwx   2 root root    4096 Apr 30 22:26 hooks
-rw-r--r--   1 root root 1428368 May 14 07:14 index
drwxrwxrwx   2 root root    4096 Apr 30 22:26 info
drwxrwxrwx   3 root root    4096 Apr 30 22:26 logs
drwxrwxrwx 260 root root    4096 May  3 23:05 objects
-rwxrwxrwx   1 root root      41 May  3 23:04 ORIG_HEAD
-rwxrwxrwx   1 root root   24255 Apr 30 22:33 packed-refs
drwxrwxrwx   5 root root    4096 Apr 30 22:26 refs

In reply to Jim Fischer

Re: Problems using Git to Upgrade Moodle

by Jim Fischer -

Okay, I am making some progress.

I removed the git branches using sudo git branch -d branchname

Then I redid the checkout of 27 using -f for force and that did the trick!


I am curious why you prefer to run the upgrade command from the terminal rather than using the browser. Is there a difference?

Thanks again for all of the help. 


In reply to Jim Fischer

Re: Problems using Git to Upgrade Moodle

by Ken Task -
Picture of Particularly helpful Moodlers

Simple ... you are already at the command line 'giting' the code.   Using the commandline tools in moodlecode/admin/cli/ take apache out of the loop - it's just php and the DB then.   Has to be less entensive on the site.   Will report errors without having had to run on error reporting ... IF there is any.

While you are are command line one can quickly make backups of code and DB.

Whole process can be put into a bash shell script ... one command and done.

Have one site that has 5 instances of Moodle running on it - and a bash script that runs through each site ... runs cron, puts site into maintenance mode, backups up code and DB, acquires latest code, upgrades the site, backs up the site again (code DB), then takes the site out of maintenance mode ready to be used by students or myself for checking.

Total time for those 5 sites ... less than one hour - and most of the time, I am just watching screen scroll.

Ok, you have one site ... if you take the time to do the above via script from command line, updates or upgrades under 15 minutes ... more like 5 minutes most of the time (depending upon size of site).  The updates/upgrades to the plugins takes a few minutes more and most of the time they don't have to be done on the same day/time as the updates/upgrades.  Web interface best for that, me thinks.  Of course, I don't run 50 plugins/addons.

'spirit of sharing', Ken


In reply to Jim Fischer

Re: Problems using Git to Upgrade Moodle

by Ken Task -
Picture of Particularly helpful Moodlers

1st, don't mess with git ... keep it simple.   All you want to accomplish
is to be able to update (that means 2.6.3 to highest/mostsecure 2.6.highest) or
upgrade (that means 2.6.highest to the next version up ... that of 2.7.highest etc.)

To fix now ...

Acquire the code for your current 2.6.x in a work directory via git.

cd /var/www/html/
git clone git://git.moodle.org/moodle.git work

This creates a 'work' directory for you, sets up the hidden.git directory in 'work' with the master branch set as default.   We will change that to match the current version of 2.6.x (or at least the highest/most secure in that series.

cd work

git branch -a

will show a * beside 'master'.   We want 2.6.x

git branch --track MOODLE_26_STABLE origin/MOODLE_26_STABLE
git checkout MOODLE_26_STABLE

Now check the version (we are still in 'work'):

fgrep '$release' version.php

That should show the highest/most secure version of 2.6 ... which is what your production site is currently.

Now the tricky part ...
cd /var/www/html/moodle/
rm -fR .git
This removes/erases the .git directory - it's ok.   Messed up anyway with whatever
you tried/did.

Then we copy the work/.git directory into the moodle code directory

cd /var/www/html/work
cp -rp .git /var/www/html/moodle/

The last command above copies recursively and preserves the ownerships/permissions on the .git directory as well as all files contained therein.
It's ok if those belong to root:root as you will execute git commands as root.

Now we double check things ...

cd /var/www/html/moodle/
git branch -a

Does it show the tracked branch is 2.6 now?
If not stop and share what it says here.
IF it does how 2.6 is tracked now, proceed:

We need to make sure we have git talking 2.6 and that all the files in the production directory ARE indeed for 2.6

Run the following ... from /var/www/html/moodle as root user:

git pull

If that complains, STOP ... copy and paste info back here.

If it doesn't complain, then next ... we are still in the /var/www/html/moodle dir:

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

That may/may not do much ... but we must get the DB to match code.

Chown to apache:apache ... all files recursively:

chown apache:apache * -R

The -R is recursive.

Now we check via the web interface.   Login to Moodle and go to notifications.
Got any plugins that need updating ... update them.

Once we have the site settled back into 2.6.highest, time to move it to 2.7.
** 1: backup the code you have - we are still in /var/www/html/moodle/

mkdir /home/backup/
tar -cvf /home/backup/moodle26code.tar /var/www/html/moodle/ [ENTER]

** 2: Now the DB
mysql -u [dbuser] -p[dbuserpassword] [db_for_moodle] > /home/backuup/moodle26db.sql

Now it's safe to move forward

Again ... as root user in /var/www/html/moodle

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

Note the difference is in the version number ... the one we want.
Check the version.php file:

fgrep '$release' version.php

Does it say 2.7?   IF NOT, stop ... come back here again with latest info.
IF it does say 2.7, next steps ...

As before, upgrade via command line.   We are still in /var/www/html/moodle/

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

To check
fgrep '$release' version.php

Now login to web interface, go to Notifications and check for updates to
plugins.   Get them.

Site checks out OK?   Good!

BACKUP again ... on this time the backup files will have 27 in their names.

Basically to go from 2.7 -> 2.8 -> 2.9 it's a wash, rinse and repeat operation.

** BACKUP after each step upwards.   Those backups become fall back points should the next upgrade
fail for some reason.

*** IMPORTANT *** your system evidently has required version of PHP/MySQL(MariaDB) to run 2.x.
*** BEFORE moving upwards from 2.x check requirements for 3.x

Remove the 'work' directory:

cd /var/www/html/

rm -fR work

'spirit of sharing', Ken

In reply to Ken Task

Re: Problems using Git to Upgrade Moodle

by Jim Fischer -
Success!  I followed your clear instructions and now I am running 2.7 and have 2.6 backed up!

Thanks for your patience and willingness to help. Possibly my last question for this thread:

The step by step instructions I linked earlier do not say anything about setting up the "cron" job.  But as far as I can tell, I should be doing this. Is the following the appropriate place for me to start? I'm not expecting you to walk me thru it, just trying to find the best place to start. There's lots of information out there!


https://docs.moodle.org/30/en/Cron#Using_a_cron_command_line_in_Unix