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

Re: install with non-default php

$
0
0

by Howard Miller.  

You need to know how this was done. Ubuntu doesn't natively support multiple PHP versions. There are, however, addons for doing this. "PHP Farm" and "suPHP" spring to mind, but there may be others. To be honest, I've never done it. Once you've worked out which method was used it should just be a matter of reading the instructions. 

Unfortunately, not a Moodle matter. If you're stuck you might be better posting in the Ubuntu forums. 


Re: Invalid collation 'utf8mb4_unicode_ci'.

$
0
0

by Howard Miller.  

Firstly, I know nothing about Microsoft stuff...

BUT... the only time(s) I have seen this happen with MySQL is when moving a database from one place to another. Essentially, the source and target databases have different default collations (it's nowhere near as simple as that before anybody corrects me, but this analogy will do). Imported text fields that do not specify a collation end up with something different. All your text fields *have* to have the same collation or it won't work. 

I wonder if something like that is going on?

Backup: Error reading from database

$
0
0

by Ian L.  

I tried upgrading to a recent version of Moodle, but it failed and then I went back to the old 2.7. 

And now I can't access admin. I got these errors:

Error reading from database
Debug info: Table 'mysite_moodle.mdl_sessions' doesn't exist
SELECT id, sid, state, userid, lastip, timecreated, timemodified FROM mdl_sessions WHERE sid = ?
[array (
0 => 'e74cea86f81c20e87cab898fd24b50bc',
)]
Error code: dmlreadexception
Stack trace:
  • line 443 of /lib/dml/moodle_database.php: dml_read_exception thrown
  • line 1080 of /lib/dml/mysqli_native_moodle_database.php: call to moodle_database->query_end()
  • line 1476 of /lib/dml/moodle_database.php: call to mysqli_native_moodle_database->get_records_sql()
  • line 1448 of /lib/dml/moodle_database.php: call to moodle_database->get_record_sql()
  • line 1427 of /lib/dml/moodle_database.php: call to moodle_database->get_record_select()
  • line 278 of /lib/classes/session/manager.php: call to moodle_database->get_record()
  • line 79 of /lib/classes/session/manager.php: call to core\session\manager::initialise_user_session()
  • line 775 of /lib/setup.php: call to core\session\manager::start()
  • line 24 of /config.php: call to require_once()
  • line 31 of /index.php: call to require_once()
How can I fix this? Been working on it for hours. Sites been down for a day+

Re: Backup: Error reading from database

Re: Backup: Error reading from database

$
0
0

by Ian L.  

Thanks, but I can't figure out how to do that. I tried importing that highlighted bit into php myadmin as a .sql file but it didn't work. I don't know much about this. how many columns would it be?

Also the error message says:

myusername_moodle.mdl_sessions so should the table be called just sessions or .mdl_sessions?

Re: Can't login after upgrade

$
0
0

by Salvatore DeMaio.  

Hello Ken,


I need to reset the admin password but email is not working on my moodle 2.9.3 release and I read your post but do not know where to find "code/admin/cli/" is it in moodle or PHP or mysql? It is installed on ubuntu 14.0


Re: Invalid collation 'utf8mb4_unicode_ci'.

$
0
0

by Ken Task.  

Don't really have an answer ... just recently experienced that collation when importing an SQL dump from MP to Ubuntu 16.04.   Didn't affect the import and could move on done the road.

Did do some sluething on it though ... and this shared with you ..

"Character encoding allows support for a set of characters, such as the Western alphabet, Asian scripts and non-alphanumeric symbols. Older utf8 databases support a smaller set of characters whereas utf8mb4 includes emojis, musical notation and Chinese Han characters."

Source: http://anothercoffee.net/wordpress-how-to-fix-unknown-collation-error/

While that's about WordPress, might also apply/work with your situation.

Good luck!

'spirit of sharing', Ken

Re: Backup: Error reading from database

$
0
0

by Ian L.  

O.k. I created a table with the name mdl_sessions and it seemed to have some affect as the debug info changed. It's pretty f**ked up though.  This is over my head is there a way to copy this from some where?

Current error:

Debug info: Incorrect integer value: 'df7ac14aa1f40ce578fc27365cdcf16b' for column 'sid' at row 1
INSERT INTO mdl_sessions (state,sid,sessdata,userid,timemodified,timecreated,lastip,firstip) VALUES(?,?,?,?,?,?,?,?)
[array (
0 => 0,
1 => 'df7ac14aa1f40ce578fc27365cdcf16b',
2 => NULL,
3 => 0,
4 => 1489153577,
5 => 1489153577,
6 => '2602:306:cfc8:8e6f:9005:1049:e8d9:9c64',
7 => '2602:306:cfc8:8e6f:9005:1049:e8d9:9c64',
)]
Error code: dmlwriteexception
Stack trace:
  • line 446 of /lib/dml/moodle_database.php: dml_write_exception thrown
  • line 1164 of /lib/dml/mysqli_native_moodle_database.php: call to moodle_database->query_end()
  • line 1210 of /lib/dml/mysqli_native_moodle_database.php: call to mysqli_native_moodle_database->insert_record_raw()
  • line 422 of /lib/classes/session/manager.php: call to mysqli_native_moodle_database->insert_record()
  • line 399 of /lib/classes/session/manager.php: call to core\session\manager::add_session_record()
  • line 79 of /lib/classes/session/manager.php: call to core\session\manager::initialise_user_session()
  • line 775 of /lib/setup.php: call to core\session\manager::start()
  • line 24 of /config.php: call to require_once()
  • line 31 of /index.php: call to require_once()


Re: Can't login after upgrade

$
0
0

by Ken Task.  

If typical Ubuntu 14.0 apache web root is in /var/www/html/   Moodle code would be in there.

Evidence of that is the presence of a config.php file ... so logged on a root user or sudo -s

ls /var/www/html/config.php

IF it says file not find then you have some sluething to do about your system.

IF it does show config.php exist there, then do the following:

cd /var/www/html/admin/cli/

The script is called 'reset_password.php'.  It will change the password of manual accounts only.  Typically there are three such accounts: guest ... which is ID 1, the initial admin user that installed the system, ID 2 and if the installer used the default login, then it is 'admin' and hopefully a third account ... yours.

from the location given above, type:

php reset_password.php

You will be prompted for the account login whose password you desire to reset.

If the script finds the account, you will then be prompted to provide the password in clear text ... meaning you will be able to see what you've typed.

IF the moodle has character requirements for password, you will need to provide a password that passes muster.

If you get the password changed successfully, stay at that location in terminal session, open browser, and see if you can login.

Recommendation: get to know your Ubuntu system from the command line.  That knowledge will save your 'hinie' many times.

'spirit of sharing', Ken



Re: Can't login after upgrade

$
0
0

by Salvatore DeMaio.  

Ken I am all set.  I found a previous post from you and it worked fine thank you

Re: Can't login after upgrade

$
0
0

by Salvatore DeMaio.  

Thank you very much

Re: Server 2016, IIS, SQL 2016, PHP7

$
0
0

by Usman Asar.  

Cheers Kenneth, Had been waiting to hear something from your side, Now I am assuming this dbhost may only be applicable to SQLServer Express edition, else other server editions will work as described everywhere else.

Re: install with non-default php

$
0
0

by Randy Thornton.  

Yeah, the issue is your web server, presumably Apache or nginx, is configured to use the 5.5.9 version of PHP so that is what it is using. 

If you want Moodle to run with 7, then you will have to reconfigure your web server to use the PHP 7 modules instead of the 5 ones. 

As Howard said, it depends on how you set this up and where things are (and also what mods you compiled in ;)

For Apache - eventually - you'll need to enable the php7 modules and turn off the php5 ones using a2dismod & a2enmod. Check the Ubuntu forums for details.

Re: Invalid collation 'utf8mb4_unicode_ci'.

$
0
0

by Kenneth McKinnon.  

No, but thanks for trying.  The collation is the same and the database works in a different server.

Re: Invalid collation 'utf8mb4_unicode_ci'.

$
0
0

by Kenneth McKinnon.  

I believe the script does not accommodate Microsoft SQL collations.  Could this be a bug?

All my research only points to MySQL fixes, which does not help me.  MSSQL does not have utf8 as a collation selection, instead they are utf8 compatible, I believe.


Re: install with non-default php

$
0
0

by Ken Task.  

Question ... is there a reason you need to keep PHP version 5?

Running some php based app that isn't compat with PHP 7.0.x?  WordPress, for example, actually recommends using PHP7.0.  Joomlas PHP 7.0 ... other ?  Check out their site.

If dedicated server for Moodle, go with 7.0.x as long as you have Moodle 3.0.1 or higher.  If you are running or trying to run version of Moodle lower ... upgrade the Moodle to the highest 3.0.x first and once that's running then you can change the default PHP.   BTW, command line install might be easiest - takes apache/web servcice out of the loop.

Just noticed the setup you have is like java ... /usr/bin/java is really a symlihk that points to whatever version of java you have installed in /opt/  That then becomes the default when using 'java' from any location on server.

This one is a symlink also ... see the ->

/usr/bin/php-cgi -> /etc/alternatives/php-cgi

The difference in what you type at command line:

php will call the symlinked PHP in alternatives.

php5 will call the symlinked PHP in alternatives.

There should be 2 main php.ini's ... one for 5 and one for 7.

Think all you really need to do is sort out the alternative stuff.

For more info:

http://manpages.ubuntu.com/manpages/precise/man8/update-alternatives.8.html

'spirit of sharing', Ken

When install theme moodle to freeze

$
0
0

by Сагындык Тусупбек.  

First check validation plugin i click button for update moodle database to install theme. After page kind of updated, but process is stoped. After some time i get page with install plugin. How to fix it? Thankssmile 

Moodle unfortunately cookies are currently not enabled in your browser

$
0
0

by vysakh b.  

Hi All,

My moodle site was working fine. I upgraded my server by increasing the RAM. And copied all the files to the server again and created database also.

But when login to access my admin or client it is showing that

unfortunately cookies are currently not enabled in your browser 

but I check in database the last login time. It's changing.

Please help to find a solution for this

Thanks

Vysakh 

Re: install with non-default php

$
0
0

by Mahmood Naderan.  

OK. in the Apache modules, I saw both php5 and php7 modules. So, I disabled php5 and enabled php7. Now, I can see the installer.

The problem is that, it says

Data directory (/var/www/moodle32data) cannot be created by the installer

although I created that with the sudo command from the terminal. Any idea for that?

Re: install with non-default php

$
0
0

by Howard Miller.  

What permissions did you give it?

chmod -R 0777 /var/www/moodle32data

should do. 

Viewing all 46839 articles
Browse latest View live


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