Re: /var/www/moodle as 'root' or 'www-data'?
Re: /var/www/moodle as 'root' or 'www-data'?
The server requested authentication method unknown to the client [caching_sha2_password]
Apache 2.4.41
PHP7.3.11 (I also downloaded PHP7.4.11)
MariaDB 10.4.8
I installed Moodle 4.0dev package. Error message prior to open Moodle was:
Database connection failed.
It is possible that the database is overloaded or otherwise not running properly.
The site administrator should also check that the database details have been correctly specified in config.php
Warning: mysql::_construct(); The server requested authentication method unknown to the client [caching_sha2_password] in
C:\users\......\moodle\lib\dml\mysqli_native_moodle_database.php on line 83
line 83 is: $conn = new mysqli($dbhost, $dbuser, $dbpass, '', $dbport, $dbsocket); // Connect without db
Can anyone advise me how to move forward finishing installation of the last step of Moodle? Thank you so very much.
Re: /var/www/moodle as 'root' or 'www-data'?
+ 1 to both responses so far ... hosting and how hosting sets you up a factor.
Have been into serveral hosting services (TMD,OVH,RS,other) for 'customers' and can see why there can be no docs in moodle that would cover them all.
Case in point ... customer moving from shared hosting to VPS server as an example will have their user jail environment copied to the VPS. When it comes to web server apps ... they end up with something like /home/customernameorid/public_html ... a user jail.
They could move it all to something more Linux Standards Base ... like apache ... /var/www/ but it's much easier to continue to do what they have done. So ... that affects ownerships/permissions of anything.
Now as to what they should be ... try this for grins to see what happens:
make permissions on your config.php file look like r--r-----
Note above doesn't mention user ... just permissions.
'SoS', Ken
Re: /var/www/moodle as 'root' or 'www-data'?
The reason for that scheme is, I can work in the shell 99% of the time as a non-privileged user (me). In exceptional cases, I can always get super user rights with su or sudo. On the "security" front, the "others" do not have any permission to the files (rw-r-----) and directories (rwxr-x---). But those "others" are either non-existent or trusted users on a production server. To whom would you give a shell account on your production server?
Re: /var/www/moodle as 'root' or 'www-data'?
>
> Note above doesn't mention user ... just permissions.
Ha, ha, ha! Was that Howard's Third principle, "Invest on Unix file permissions - You'll be a happy man"?
Re: Invalid course module ID
Thank you for your suggestions but when I click on the second link it says file not found....
Re: Invalid course module ID
Problem assigning manager group via LDAP, LDAP login against AD works.
I have a question about Moodle 3.9.2 (Build: 20201016) with LDAP authentication under Linux with PHP 7.4.3.
The installation is fresh and everything is up to date.
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=20.04
DISTRIB_CODENAME=focal
DISTRIB_DESCRIPTION="Ubuntu 20.04.1 LTS"
I read the help pages and the authentication via LDAP against the AD works.
All employees can log into Moodle with standard rights.
Only the assignment of the group (manager or course creator) via the AD does not work.
Querying the user via an ldapseasrch works, though.
ldapsearch -x -D "CN=moodle Funktions User,OU=Funktionsuser,OU=User,OU=ordner,DC=domain,DC=local" -w "pass" -b "ou=ordner,dc=domain,dc=local" -H ldap://192.168.1.1 "(&(objectClass=user)(memberOf="CN=moodle-manager,OU=Gruppen,OU=ordner,DC=domain,DC=local"))" attrs=sAMAccountName
Zur Not könnte ich die Leute auch über LDAP authentifizieren und die Administaratoren / Kursersteller Rechte von Hand zuweisen.
Nachdem es aber funktionieren sollte frage ich mich, warum es das nicht tut.
I've tried everything possible and can't get on with poking around.
How can I see where it's stuck?
I'm new to Moodle so sorry if there is an obvious log file that I haven't seen.
Here is the config of the LDAP plugin:
-<AUTH_LDAP>
-<SETTINGS>
<HOST_URL>192.168.1.1</HOST_URL>
<LDAP_VERSION>3</LDAP_VERSION>
<START_TLS>0</START_TLS>
<LDAPENCODING>utf-8</LDAPENCODING>
<PAGESIZE>250</PAGESIZE>
<PREVENTPASSINDB>1</PREVENTPASSINDB>
<BIND_DN>CN=moodle Funktions User,OU=Funktionsuser,OU=Terminalserver User,OU=ordner,DC=domain,DC=local</BIND_DN>
<BIND_PW>pass</BIND_PW>
<USER_TYPE>ad</USER_TYPE>
<CONTEXTS>OU=ordner,DC=domain,dc=local</CONTEXTS>
<SEARCH_SUB>1</SEARCH_SUB>
<OPT_DEREF>0</OPT_DEREF>
<MEMBERATTRIBUTE_ISDN>0</MEMBERATTRIBUTE_ISDN>
<OBJECTCLASS>objectClass=*</OBJECTCLASS>
<FORCECHANGEPASSWORD>0</FORCECHANGEPASSWORD>
<STDCHANGEPASSWORD>0</STDCHANGEPASSWORD>
<PASSTYPE>plaintext</PASSTYPE>
<CHANGEPASSWORDURL/>
<EXPIRATION>0</EXPIRATION>
<EXPIRATION_WARNING>10</EXPIRATION_WARNING>
<GRACELOGINS>0</GRACELOGINS>
<AUTH_USER_CREATE>0</AUTH_USER_CREATE>
<CREATE_CONTEXT/>
<MANAGERCONTEXT>CN=moodle-manager,OU=Moodle,OU=Gruppen,OU=ordner,DC=domain,DC=local</MANAGERCONTEXT>
<COURSECREATORCONTEXT>CN=moodle-kursersteller,OU=Moodle,OU=Gruppen,OU=ordner,DC=domain,DC=local</COURSECREATORCONTEXT>
<REMOVEUSER>1</REMOVEUSER>
<SYNC_SUSPENDED>0</SYNC_SUSPENDED>
<NTLMSSO_ENABLED>0</NTLMSSO_ENABLED>
<NTLMSSO_SUBNET/>
<NTLMSSO_IE_FASTPATH>0</NTLMSSO_IE_FASTPATH>
<NTLMSSO_TYPE>ntlm</NTLMSSO_TYPE>
<FIELD_MAP_FIRSTNAME>givenName</FIELD_MAP_FIRSTNAME>
<FIELD_UPDATELOCAL_FIRSTNAME>onlogin</FIELD_UPDATELOCAL_FIRSTNAME>
<FIELD_UPDATEREMOTE_FIRSTNAME>0</FIELD_UPDATEREMOTE_FIRSTNAME>
<FIELD_LOCK_FIRSTNAME>locked</FIELD_LOCK_FIRSTNAME>
<FIELD_MAP_LASTNAME>sn</FIELD_MAP_LASTNAME>
<FIELD_UPDATELOCAL_LASTNAME>onlogin</FIELD_UPDATELOCAL_LASTNAME>
<FIELD_UPDATEREMOTE_LASTNAME>0</FIELD_UPDATEREMOTE_LASTNAME>
<FIELD_LOCK_LASTNAME>locked</FIELD_LOCK_LASTNAME>
<FIELD_MAP_EMAIL>mail</FIELD_MAP_EMAIL>
<FIELD_UPDATELOCAL_EMAIL>onlogin</FIELD_UPDATELOCAL_EMAIL>
<FIELD_UPDATEREMOTE_EMAIL>0</FIELD_UPDATEREMOTE_EMAIL>
<FIELD_LOCK_EMAIL>unlocked</FIELD_LOCK_EMAIL>
<FIELD_MAP_CITY>l</FIELD_MAP_CITY>
<FIELD_UPDATELOCAL_CITY>onlogin</FIELD_UPDATELOCAL_CITY>
<FIELD_UPDATEREMOTE_CITY>0</FIELD_UPDATEREMOTE_CITY>
<FIELD_LOCK_CITY>unlocked</FIELD_LOCK_CITY>
<FIELD_MAP_COUNTRY>c</FIELD_MAP_COUNTRY>
<FIELD_UPDATELOCAL_COUNTRY>onlogin</FIELD_UPDATELOCAL_COUNTRY>
<FIELD_UPDATEREMOTE_COUNTRY>0</FIELD_UPDATEREMOTE_COUNTRY>
<FIELD_LOCK_COUNTRY>unlocked</FIELD_LOCK_COUNTRY>
<FIELD_MAP_LANG>preferredLanguage</FIELD_MAP_LANG>
<FIELD_UPDATELOCAL_LANG>onlogin</FIELD_UPDATELOCAL_LANG>
<FIELD_UPDATEREMOTE_LANG>0</FIELD_UPDATEREMOTE_LANG>
<FIELD_LOCK_LANG>unlocked</FIELD_LOCK_LANG>
<FIELD_MAP_DESCRIPTION>description</FIELD_MAP_DESCRIPTION>
<FIELD_UPDATELOCAL_DESCRIPTION>onlogin</FIELD_UPDATELOCAL_DESCRIPTION>
<FIELD_UPDATEREMOTE_DESCRIPTION>0</FIELD_UPDATEREMOTE_DESCRIPTION>
<FIELD_LOCK_DESCRIPTION>unlocked</FIELD_LOCK_DESCRIPTION>
<FIELD_MAP_URL/>
<FIELD_UPDATELOCAL_URL>oncreate</FIELD_UPDATELOCAL_URL>
<FIELD_UPDATEREMOTE_URL>0</FIELD_UPDATEREMOTE_URL>
<FIELD_LOCK_URL>unlocked</FIELD_LOCK_URL>
<FIELD_MAP_IDNUMBER>distinguishedName</FIELD_MAP_IDNUMBER>
<FIELD_UPDATELOCAL_IDNUMBER>onlogin</FIELD_UPDATELOCAL_IDNUMBER>
<FIELD_UPDATEREMOTE_IDNUMBER>0</FIELD_UPDATEREMOTE_IDNUMBER>
<FIELD_LOCK_IDNUMBER>locked</FIELD_LOCK_IDNUMBER>
<FIELD_MAP_INSTITUTION/>
<FIELD_UPDATELOCAL_INSTITUTION>oncreate</FIELD_UPDATELOCAL_INSTITUTION>
<FIELD_UPDATEREMOTE_INSTITUTION>0</FIELD_UPDATEREMOTE_INSTITUTION>
<FIELD_LOCK_INSTITUTION>unlocked</FIELD_LOCK_INSTITUTION>
<FIELD_MAP_DEPARTMENT>department </FIELD_MAP_DEPARTMENT>
<FIELD_UPDATELOCAL_DEPARTMENT>onlogin</FIELD_UPDATELOCAL_DEPARTMENT>
<FIELD_UPDATEREMOTE_DEPARTMENT>0</FIELD_UPDATEREMOTE_DEPARTMENT>
<FIELD_LOCK_DEPARTMENT>unlocked</FIELD_LOCK_DEPARTMENT>
<FIELD_MAP_PHONE1/>
<FIELD_UPDATELOCAL_PHONE1>onlogin</FIELD_UPDATELOCAL_PHONE1>
<FIELD_UPDATEREMOTE_PHONE1>0</FIELD_UPDATEREMOTE_PHONE1>
<FIELD_LOCK_PHONE1>unlocked</FIELD_LOCK_PHONE1>
<FIELD_MAP_PHONE2>telephoneNumber</FIELD_MAP_PHONE2>
<FIELD_UPDATELOCAL_PHONE2>oncreate</FIELD_UPDATELOCAL_PHONE2>
<FIELD_UPDATEREMOTE_PHONE2>0</FIELD_UPDATEREMOTE_PHONE2>
<FIELD_LOCK_PHONE2>unlocked</FIELD_LOCK_PHONE2>
<FIELD_MAP_ADDRESS>streetAddress</FIELD_MAP_ADDRESS>
<FIELD_UPDATELOCAL_ADDRESS>onlogin</FIELD_UPDATELOCAL_ADDRESS>
<FIELD_UPDATEREMOTE_ADDRESS>0</FIELD_UPDATEREMOTE_ADDRESS>
<FIELD_LOCK_ADDRESS>unlocked</FIELD_LOCK_ADDRESS>
<FIELD_MAP_FIRSTNAMEPHONETIC/>
<FIELD_UPDATELOCAL_FIRSTNAMEPHONETIC>oncreate</FIELD_UPDATELOCAL_FIRSTNAMEPHONETIC>
<FIELD_UPDATEREMOTE_FIRSTNAMEPHONETIC>0</FIELD_UPDATEREMOTE_FIRSTNAMEPHONETIC>
<FIELD_LOCK_FIRSTNAMEPHONETIC>unlocked</FIELD_LOCK_FIRSTNAMEPHONETIC>
<FIELD_MAP_LASTNAMEPHONETIC/>
<FIELD_UPDATELOCAL_LASTNAMEPHONETIC>oncreate</FIELD_UPDATELOCAL_LASTNAMEPHONETIC>
<FIELD_UPDATEREMOTE_LASTNAMEPHONETIC>0</FIELD_UPDATEREMOTE_LASTNAMEPHONETIC>
<FIELD_LOCK_LASTNAMEPHONETIC>unlocked</FIELD_LOCK_LASTNAMEPHONETIC>
<FIELD_MAP_MIDDLENAME/>
<FIELD_UPDATELOCAL_MIDDLENAME>oncreate</FIELD_UPDATELOCAL_MIDDLENAME>
<FIELD_UPDATEREMOTE_MIDDLENAME>0</FIELD_UPDATEREMOTE_MIDDLENAME>
<FIELD_LOCK_MIDDLENAME>unlocked</FIELD_LOCK_MIDDLENAME>
<FIELD_MAP_ALTERNATENAME/>
<FIELD_UPDATELOCAL_ALTERNATENAME>oncreate</FIELD_UPDATELOCAL_ALTERNATENAME>
<FIELD_UPDATEREMOTE_ALTERNATENAME>0</FIELD_UPDATEREMOTE_ALTERNATENAME>
<FIELD_LOCK_ALTERNATENAME>unlocked</FIELD_LOCK_ALTERNATENAME>
</SETTINGS>
</AUTH_LDAP>
Re: Setting up local Moodle server with existing database in Windows
- Backup the database from prod server and restore it to the database on the local server.
- Copy the Moodledata folder from the prod server to the local server.
- Copy the Moodle code folder from the prod server to the local server.
- Edit the config.php file on the backup server with the new details of the local server, like:
You may need to run the https://docs.moodle.org/en/Search_and_replace_tool to fix the url's on the local server.
Now open the local site in a browser (using the new $CFG->wwwroot address) and it should display.
Problems with update to Maria DB 10.5.6 and Moodle 3.1
Hello everyone, I recently been testing on a local server to do the upgrade process from Moodle 3.1 to Moodle 3.9. The first step I have done is to upgrade the MaryDB from version 5.5.65-MariaDB to the latest version available (10.5.6-MariaDB) according to the procedure explained in https://www.liquidweb.com/kb/how-to-upgrade-mariadb-5-5-to-mariadb-10-0-on-centos-7/.
The site works perfectly; however, the problem appears when I go to Site Administration > Server > Environment and find the following messages:
mysql full unicode support#File format
Your database has tables that are using Antelope as the file system.
For full UTF-8 support in MySQL and MariaDB, Barracuda is required as a
filesystem. Please convert the tables to the Barracuda file system. See
the Administration via Command Line documentation for details of a tool
to convert InnoDB tables to Barracuda.
mysql full unicode support#Large prefix
Full UTF-8 support in MySQL and MariaDB requires changing the MySQL
option 'innodb large prefix' to 'ON'. See the documentation for details.
When I installed the Moodle for the first time I solved the inconvenience by writing in the MariaDB:
SET GLOBAL innodb_file_format=Barracuda;
SET GLOBAL innodb_large_prefix = ON;
SET GLOBAL innodb_file_per_table=ON;
However, now these commands throw me the following errors:
ERROR 1238 (HY000): Variable 'innodb_file_format' is a read only variable
ERROR 1238 (HY000): Variable 'innodb_large_prefix' is a read only variable
Before this I decided to edit the /etc/my.cnf.d/server.cnf and add manually the following lines:
[mariadb]
innodb_file_per_table=ON;
innodb_large_prefix=ON;
innodb_file_format=Barracuda;
[mariadb-10.5]
innodb_file_per_table=ON;
innodb_large_prefix=ON;
innodb_file_format=Barracuda;
But the same errors still appear.
I restarted the httpd and MariaDB, I exit and log back into Moodle and the error persists.
I would like to know if I can obviate this message and continue with the update of the PHP to the version 7.0 to proceed later to the update of the Moodle to the version 3.5; in case of being necessary, how I can solve the message of error that throws me about the configuration of the database or if I committed some error in the process of update of the database.
S.O.: CentOS Linux release 7.8.2003 (Core)
Kernel: 3.10.0-1127.19.1.el7.x86_64
Motor de bases de datos: 10.5.6-MariaDB
PHP: 5.4.16
Moodle: 3.1.18
Everything is installed in a virtual machine in VirtualBox version 5.2.42 running on a Linux Mint 19.3.
The versions are all very old because it is a replica of a very
outdated server that I need to migrate, but before I touch the one I
have working I want to do a test on one that doesn't affect me.
Thanks in advance and best regards.
thanks for Information
This Website really help me to improve my Rahatindorishayari.com And I'm very glad to read Moodle articles
thanks
Re: Invalid course module ID
Re: Invalid course module ID
Re: Problem assigning manager group via LDAP, LDAP login against AD works.
Try changing "Member attribute uses dn" (auth_ldap | memberattribute_isdn) to Yes.
The docs says "This option takes a default value based on the User type" but from a quick look at the code I don't think this is correct. I'm not sure if it's the docs or the code that is wrong.
Re: Problem assigning manager group via LDAP, LDAP login against AD works.
Hi and thank you so much for the Info.
It works ! 😄 😄 😄
Greetings
Daniel
JSON.parse: unexpected character at line 1 column 1 of the JSON data
Add an activity or resource doesn't work after upgrade.
Previously: moodle-3.8.4+ (Build: 20200814) => moodle-3.9.2+ (Build: 20201016)
In version 3.8.4 everything worked.
After clicking on 'Add an activity or resource' in the course with Turn editing on, an error will be displayed: "Error occurred JSON.parse: unexpected character at line 1 column 1 of the JSON data". Screenshot attached.
Thank you in advance for any help.
Josef Kovar
Metropolitan university Prague
error/generalexceptionmessage after update to 3.8.0-0136
Good afternoon,
I've just attempted to update our Moodle installation to the latest version, 3.8.0-0136
To install this update I have also had to update PHP to 7.2 and the MariaDB installation. All of this is installed on a Synology DS718+ NAS
After the update was completed I have restarted the Synology.
When attempting to open the Moodle home page, an error is shown without any further explanation: "error/generalexceptionmessage"
I have been looking for some additional information in log files but I cannot seem to find any. Also checked if I could find anyone with similar issues after updating but without much result. Any tips on where to find additional information that can help me resolve this error?
Or perhaps a way to roll back this update ?
Thanks!
Arjan
Re: /var/www/moodle as 'root' or 'www-data'?
I've also dusted off a book on Apache Security that I forgot I had, so will see what's in there that may help with this. But perhaps pragmatically, the file and directory permissions are only one element of the 'onion' of security that you can wrap around the problem of securing your site.
Hosting moodle on Website
Hi,
I am trying to run moodle on a website carpetcleanerpicks.com
What I did was that I transferred all the installation pack that I've downloaded from the moodle to site to the server through FTP.
Thereafter, I try to run the install, I am getting the following errors:
Warning: require_once(C:\Documents and Settings\Carpet Cleaner\Desktop\MoodleWindowsInstaller-latest-19\server\moodle/lib/setup.php) [function.require-once]: failed to open stream: No such file or directory in D:\Hosting\4794532\html\server\moodle\config.php on line 20
Fatal error: require_once() [function.require]: Failed opening required 'C:\Documents and Settings\Carpet Cleaner\Desktop\MoodleWindowsInstaller-latest-19\server\moodle/lib/setup.php' (include_path='.;C:\php5\pear') in D:\Hosting\4794532\html\server\moodle\config.php on line 20
These errors can be seen when trying to access the link.
If someone can help me it will be very appreciated.
Thankyou