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

Re: upgrade from 3.1.15 to 3.5.4 throws "Invalid permissions detected when trying to create a directory" error

$
0
0
by Benoît M.  

I am debugging.

I add this 2 lines in config.php:


mkdir("/var/www/moodledata/foo", 0777);
mkdir("/var/www/moodledata/bar", 777);


which give:

root@28688cca5172:/# ls -ld /var/www/moodledata/foo
drwxr-xr-x 2 www-data www-data 4096 Mar 21 15:14 /var/www/moodledata/foo
root@28688cca5172:/# ls -ld /var/www/moodledata/bar
dr----x--t 2 www-data www-data 4096 Mar 21 15:14 /var/www/moodledata/bar


to be continued...


Re: 3.6.3+ (Build:20190315) Exception - Call to a member function get_formatted_name() on null

$
0
0
by Douglas Musty.  

Turned on all debugging. There were three issues related to plugins and a theme. I resolved those but the error is still occurring.

Re: 3.6.3+ (Build:20190315) Exception - Call to a member function get_formatted_name() on null

$
0
0
by Douglas Musty.  

Added the theme config setting but the same thing is happening. I clear the themes caches and tried a couple different themes with the same error occurring.


[21-Mar-2019 11:21:50 America] PHP Notice:  Undefined index: forum in /home5/public_html/elearn/course/renderer.php on line 2417
[21-Mar-2019 11:21:50 America] Default exception handler: Exception - Call to a member function get_formatted_name() on null Debug: 
Error code: generalexceptionmessage
* line 2419 of /course/renderer.php: Error thrown
* line 133 of /index.php: call to core_course_renderer->frontpage()

Re: 3.6.3+ (Build:20190315) Exception - Call to a member function get_formatted_name() on null

$
0
0
by Ken Task.  

Sigh!  Missed a question ... 'upgraded from what to what you have now'?

Those 3 plugins ... any of them addons for forums?

Something about system now in order ... can you located the web services error logs?   What do they show?

Are you remotely hosted on shared or a VPS or?

Platform (OS) could also come into play.

Got command line to site?   There are some scripts in moodlecode/admin/cli/ that will help with Database ... character set/collation and at all levels ... DB, Tables, and columns in those tables.  If nothing else will give ya some more info.

What does php mysql_compressed_rows.php -i show?

'spirit of sharing', Ken


Re: 3.6.3+ (Build:20190315) Exception - Call to a member function get_formatted_name() on null

$
0
0
by Douglas Musty.  

  • Do not know exact build but from 3.4 to 3.6.3
  • plugins laegrader and groupdocs removed for now. Theme Aigne re-installed.
  • Remote hosted on shared
  • Linux, do not now distribution (Apache 2.4, PHP 7.0, MySQL 5.6, Perl 5.26)

Not where I can right now but I can SSH into the server tonight and run the command.

Re: upgrade from 3.1.15 to 3.5.4 throws "Invalid permissions detected when trying to create a directory" error

$
0
0
by Howard Miller.  

As I said. Just delete the cache directory and see what happens.

Is the permissions setting correct in config.php

//=========================================================================
// 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).
// 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;

Re: 3.6.3+ (Build:20190315) Exception - Call to a member function get_formatted_name() on null

$
0
0
by Ken Task.  

'shared host' ...

2 possible issues - one is theme ...
https://moodle.org/plugins/pluginversions.php?plugin=theme_aigne
shows compat up to version 3.0 of Moodle.

The second possible issue ...
folks who are on shared host may have issues in setting
the 'right' character set/collation and file format (Barricuda) for DB for version 3.6.any
https://docs.moodle.org/36/en/MySQL_full_unicode_support

Running the scripts in moodlecode/admin/cli/ might fail as they require a user that can alter DB server config and no one does that on shared hosting DB servers cept tech support of provider.

'spirit of sharing', Ken


Re: upgrade from 3.1.15 to 3.5.4 throws "Invalid permissions detected when trying to create a directory" error

$
0
0
by Alain Raap.  

Benoit, I created a temp folder outside the moodledata directory and made it writable for the Apache user. There I also put the cache and localcache of Moodle. Maybe that helps for the directory permission problems.

In my config.php file:

$CFG->tempdir   = 'path to your tempdir';
$CFG->cachedir  = $CFG->tempdir.'/cache';
$CFG->localcachedir = $CFG->tempdir.'/localcache';


Upgrade 3.5.4+ to 3.5.5+ gives database error

$
0
0
by Alain Raap.  

When I upgrade Moodle from 3.5.4+ to 3.5.5+ and I login after the upgrade, I get a database error and can't login.
With DEBUG mode on I see there's a problem with collation of MySQL tables that have changed. Any idea why this problem occurs with this upgrade? Will there be a fix for this problem the next Moodle build?

Version Error after moveing the installation

$
0
0
by Aaron Richner.  

Hello Community

I have a problem with my installation since I tried to move it to another server.

To test the move I migrated the data and exported the database. I didn't activate the maintenance mode because it takes a long time and this is a productive instance. (Maybe this is the problem, then I would have to announce a maintenance window). The new Server has also a newer PHP-Version and the Folder and Database has an other nameing.

After I have imported the data on the new server, the message "Config table does not contain version, can not continue, sorry." appears. But when I compare the version.php file and the database the string is the same.

I have already found this error in the forum, but only for installations not after a migration. So deleting and restarting is a bit difficult. I successfully tested an empty Moodle instance.

Maybe someone has had the same problem before or knows what else it could be. Otherwise I'll try Maintenance or don't change the versions and names.

Thanks and Regards
Aaron


In my version.php
$version  = 2016052305.01;

In My Database:

moodle-1-test=# select * from mdl_config where name = 'version';

 id |  name   |     value     

----+---------+---------------

 22 | version | 2016052305.01

(1 row)

Moving Moodle site from shared hosting to VPS

$
0
0
by Andre Nel.  

Hi, 

I need to move my moodle site from the shared hosting i have been using to a vps.  I have downloaded copies of moodledata, htt access (moodle files) and the database.  

I am using xampp.  I have put the moodle files in htdocs, and then also put the moodle data in the xampp folder and then i created a the database and imported the files.


I went into to config in moodle folder and edited as follows:

$CFG->dbtype    = 'mariadb';

$CFG->dblibrary = 'native';

$CFG->dbhost    = 'localhost';

$CFG->dbname    = 'pilotlry_mood547';

$CFG->dbuser    = 'pilotlry_mood547';

$CFG->dbpass    = '';

$CFG->prefix    = 'mdlax_';

$CFG->dboptions = array (

  'dbpersist' => 0,

  'dbport' => '',

  'dbsocket' => '',

  'dbcollation' => 'utf8_general_ci',

);


$CFG->wwwroot   = 'http://localhost/pilot';

$CFG->dataroot  = 'C:\xampp\moodledata\pilot';

$CFG->admin     = 'admin';

but when i try access the site, my browser times out and says site cant be reached


THanks in advance

Re: Upgrade 3.5.4+ to 3.5.5+ gives database error

$
0
0
by Alain Raap.  

See the error included

Re: Version Error after moveing the installation

$
0
0
by Aaron R.  

I found the problem.

The connection could be established, but the user could not read the tables.

I was a little confused about this error message, because only the one entry was mentioned and it didn't say: I can't read anything.

Re: upgrade from 3.1.15 to 3.5.4 throws "Invalid permissions detected when trying to create a directory" error

$
0
0
by Benoît M.  

Hi Howard,

you're right. There is  a note about the use of quote in config-dist.php

I finally found the root of the issue. It comes from the string value passed to the parameter $CFG->directorypermissions = '0777'.

This one is working:


$CFG->directorypermissions = 0777; //casting problem here ?
var_dump($CFG->directorypermissions);die;

outputs:

int(511)


Whereas this settings throw the error when moodle tries to create folder in cache dirs:

$CFG->directorypermissions = '0777'; //no casting problem here but apache fails when creating cache dirs
var_dump($CFG->directorypermissions);die;


outputs:

string(4) "0777"


This is very confusing to saw that the right you write 0777 is interpreted by php to 511.

Idem for the default value from config.dist.php :

$CFG->directorypermissions = 02777;
var_dump($CFG->directorypermissions);die;
outputs:

int(1535)
cheers,

ben

Re: Upgrade 3.5.4+ to 3.5.5+ gives database error

$
0
0
by Alain Raap.  

I checked the collation of all Moodle tables with admin/cli/mysql_collation.php and saw that several tables had different collation values (mdl_user for example). When I changed the collation of all the tables with command  /usr/bin/php admin/cli/mysql_collation.php --collation=my-own-db-collation I could login again. But this isn't the way I want to upgrade to the new 3.5.5+ version!


Office 365 - Could not check reply URL

Re: Upgrade 3.5.4+ to 3.5.5+ gives database error

$
0
0
por Ken Task.  

Please explain: '...this isn't the way I want to upgrade to the new 3.5.5+ version!"

And, what was 'my-own-db-collation'? (if that's something you can provide in forums).

When you upgrade are you using git or the 'older' method?

'spirit of sharing', Ken


Re: Upgrade 3.5.4+ to 3.5.5+ gives database error

$
0
0
por Alain Raap.  

Well if I upgrade Moodle to a new version I don't expect a database error like this one.

I can't provide the collation, but I compared the collation of all the tables with 3.5.4+ and they were different for several
tables (mdl_user, mdl_config and mdl_config_plugins).

I don't use git, the 'old' way I assume.

Re: Upgrade 3.5.4+ to 3.5.5+ gives database error

$
0
0
por Ken Task.  

Future of MySQL - version 8 (has been released).

From:
https://dev.mysql.com/doc/refman/8.0/en/charset-unicode-sets.html

utf8: An alias for utf8mb3.

Note
The utf8mb3 character set is deprecated and will be removed in a future MySQL release. Please use utf8mb4 instead. Although utf8 is currently an alias for utf8mb3, at that point utf8 will become a reference to utf8mb4. To avoid ambiguity about the meaning of utf8, consider specifying utf8mb4 explicitly for character set references instead of utf8.

The way I read that ... if staying with MySQL ... and eventually upgrading it to 8 ...
the moodle db will have to be utf8mb4.

Before updating/upgrading, check server environment.

Extra ... way more ...

The 'old way' ... keep config.php (archived) and any plugin not part of core.
Acquire new code.   Unzip or whatver, copy back into new code config.php and any plugins
not part of core.   Run the upgrade.
It's always been advised to check the config-dist.php file with the new code for
changes/additions not present before.


Git - no files move.  Git acquires newer version of 5.5.4+ -> 5.5.5+ core code in place.
Less prone to human error in archiving all tha needs to be archived prior to upgdate/upgrade ... op forgot to copy back an addon plugin - get missing from disk.
Checking plugins is also a good idea prior to updating/upgrading.
(* if one has customized code, one could stash or run their own git repo)

I do this and it's served me well to avoid issues on updates and espcially upgrades.
(Don't have any sites with major customizations/hacks to core code)

Create a directory in moodle code called 'addons'.
In 'addons', create a addons.txt file which is nohing more than the 'shortname' of
all the addons in the site.
Looks like:
mod_hvp
mod_questionnaire
mod_customcert

Create an executable script that uses moosh to check addon versions.
'checkaddons'

#!/bin/bash
#
echo 'Add-on listing: ';
cat ./addons.txt;
echo '---------------------';
for i in `cat ./addons.txt`
do
   echo "Addon in que: $i";
moosh -n plugin-list |grep $i
done

When run, looks like:

Add-on listing:
mod_hvp
mod_questionnaire
mod_customcert
---------------------
Addon in que: mod_hvp
mod_hvp,2.7,2.8,2.9,3.0,3.1,3.2,3.3,3.4,3.5,3.6,https://moodle.org/plugins/download.php/19174/mod_hvp_moodle36_2019031301.zip
Addon in que: mod_questionnaire
mod_questionnaire,1.9,2.0,2.2,2.3,2.4,2.5,2.6,2.7,2.8,2.9,3.0,3.1,3.2,3.3,3.4,3.5,3.6,https://moodle.org/plugins/download.php/19206/mod_questionnaire_moodle36_2018050109.zip
Addon in que: mod_customcert
mod_customcert,2.9,3.0,3.1,3.4,3.5,3.6,https://moodle.org/plugins/download.php/18626/mod_customcert_moodle36_2018120301.zip

I then use the above url's to build a 'getlist' file which looks like:

https://moodle.org/plugins/download.php/19174/mod_hvp_moodle36_2019031301.zip
https://moodle.org/plugins/download.php/19206/mod_questionnaire_moodle36_2018050109.zip
https://moodle.org/plugins/download.php/18626/mod_customcert_moodle36_2018120301.zip

And then use wget to get them:

wget -i getlist

Using the acquired zips:

mod_hvp_moodle36_2019031301.zip
mod_questionnaire_moodle36_2018050107.zip
report_questionnairestats_moodle34_2018060700.zip

I upgrade manually.  I hide the original plugin directory first for easier recovery
from a plugin compat issue

Put site in maintenance mode via CLI - that stops cron from running and any 'normal' access by students/teachers.

cd mod
mv hvp .hvp
Then copy the zip for hvp into mod.
Unzip
change owneerships/permissions.

After I get all those in place, use:
cd moodleoode/admin/cli/
php upgrade.php

I've now gotten into habit of purging caches from CLI

Then take the site out of maintenance mode:

php maintenance.php --disable

And check the running of cron via CLI.

Then check Notifications and Plugins via browser.

Yeah, I like getting my hands 'dirty' a little.  Makes me feel like
I've 'accomplished' something ... or 'earned my pay' ... so to speak.

'spirit of sharing', Ken


Re: Moving Moodle site from shared hosting to VPS

$
0
0
by Rick Jerz.  

I don't know why.

However, I would do this a little bit differently.

1) Install a clean copy of Moodle on your VPS that matches your shared hosting-Moodle version.

2) Add plugins to your VPS-Moodle to match your shared hosting-Moodle.

3) Delete all tables from your VPS Moodle, do a restore of your hosting-Moodle database backup to your VPS.

4) Delete the moodledata folder from your VPS, replace it with a backup of your hosting-Moodle moodledata folder.

5) Now that your new VPS has the data and moodledate contents from your old moodle, try logging into your new VPS-Moodle.

I cannot say that this is absolutely going to work for you.  It is just what I would try based upon how I move my own moodles around.  One needs to do things correctly for this process to work.  I also don't know if this would work if your two systems have different operating systems.  I am always in Linux when I do this.

I am offering ideas that might help you think through your own situation.

Viewing all 47048 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>