Table "sessions" does not exist

Table "sessions" does not exist

Ian L發表於
Number of replies: 26

Trying to upgrade 2.7 to the latest 3.2. 
Followed the instructions here:


History
First said needed to change to innoDB couldn't then so tried to go back to backup and got errors mentioned here:

Server then said they updated my DB to innoDB, so then tried again to upgrade to 3.2 and now this is my error. I have been googling like mad and my site has been offline and f'd up for 2 days.

i need to fix this. can you please help?

Debug info: 
Error code: ddltablenotexist
Stack trace:
  • line 645 of /lib/dml/moodle_database.php: dml_exception thrown
  • line 1501 of /lib/dml/moodle_database.php: call to moodle_database->where_clause()
  • line 286 of /lib/classes/session/manager.php: call to moodle_database->get_record()
  • line 82 of /lib/classes/session/manager.php: call to core\session\manager::initialise_user_session()
  • line 785 of /lib/setup.php: call to core\session\manager::start()
  • line 849 of /config.php: call to require_once()
  • line 93 of /admin/index.php: call to require()

This is what my config.php looks like ( I deleted a bunch of lines that were commented out to paste here):

<?php

///////////////////////////////////////////////////////////////////////////

//                                                                       //

// Moodle configuration file                                             //

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    = 'mysqli';      // '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    = 'user_mdinno';     // database name, eg moodle

$CFG->dbuser    = 'user_mdinno';   // your database username

$CFG->dbpass    = 'xxx';   // your database password

$CFG->prefix    = 'mdl_';       // prefix to use for all table names

$CFG->dboptions = array(

    'dbpersist' => false,       // should persistent database connections be

                                //  used? set to 'false' for the most stable

                                //  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

    'dbhandlesoptions' => false,// On PostgreSQL poolers like pgbouncer don't

                                // support advanced options on connection.

                                // If you set those in the database then

                                // the advanced settings will not be sent.

    'dbcollation' => 'uft8_general_ci', // MySQL has partial and full UTF-8

                                // support. If you wish to use partial UTF-8

                                // (three bytes) then set this option to

                                // 'utf8_unicode_ci', otherwise this option

                                // can be removed for MySQL (by default it will

                                // use 'utf8mb4_unicode_ci'. This option should

                                // be removed for all other databases.

);



//=========================================================================

// 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://www.moodle.mysite.com';



//=========================================================================

// 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/username/public_html/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).

// 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';



//=========================================================================


評比平均分數: -
In reply to Ian L

Re: Table "sessions" does not exist

Ken Task發表於
Particularly helpful Moodlers的相片

Seen in the config file a path that indicates/hints your server is on a shared system or a VPS in a user jail (data directory in public_html/).   I would hope there is an .htaccess file there that would not allow raw directory listing ... or deny all ... cept the username under which a shared system or VPS in a jail would run.

Sometimes, it's a good idea to share at least where you host ... provider ... and the type of hosting package you have purchased.   That info might help someone trying to help you seek out provider FAQ's/blogs/their community forums to see if other customers experience the same issue.

Another clue is this bit:

Server then said they updated my DB to innoDB

When you say Server ... take it that means Provider and they meaning helpdesk.

So that indicates you do not have full access to the configuration of the DB server as well.

Also, please verify your hosting package satisfies the minimum requirements for version 3.2
https://docs.moodle.org/dev/Moodle_3.2_release_notes#Database_requirements

Moodle upgrade: Moodle 2.7 or later (if upgrading from earlier versions, you must upgrade to 2.7.14 as a first step)

PHP version: minimum PHP 5.6.5.

Please provide more specific information about hosting setup.

And ... did you begin the whole upgrade process by taking a full site backup ... that's a backup of the code, an SQL dump of the database, and an archive of the data directory.

Do you have at least the backup sql and code?

'spirit of sharing', Ken

In reply to Ken Task

Re: Table "sessions" does not exist

Ian L發表於

Thanks Ken. It's a shared host. Inmotionhosting. They haven't been very helpful. They kept telling me I was on innoDB when it wasn't and then finally some guy made a new database with innoDB that i could see in PHPmyadmin.

I can't upload files bigger than 50mib to phpmyadmin. Have some access but not all.

I backed up the files and sql not moodledata. when i upgraded. i keep getting sessions errors of some sort when i try to upgrade or when i tried to go back.

PHP setting is 5.6.3. I tried changing the setting to 5.7 but that didn't make a difference.

In reply to Ian L

Re: Table "sessions" does not exist

Ken Task發表於
Particularly helpful Moodlers的相片

Shared hosting ... probably not a good environment for Moodle 3.2 with all the extras (having said that should say that inmotionhosting is one of the better ones ... but even they need to take into consideration customers attempting to upgrade to M3 anything.

As far as sessions ... did the 2.7.x, when it was running, use the DB for sessions or did it use files?  You might not remember ... but I'd set it to files rather than DB as it appears having DB issues anyway.

If, in your moodledata, there is a sessions directory, it indicates you might have used files ... not DB.  IF you had used DB, then DB's tables could have grown rather large and might even have been in need of optimizing ... but, on shared hosting, you have no access to DB ... nor it's config.

The one thing you didn't move ... moodledata was in public_html and had an .htaccess file in there to protect it.   This won't hurt ... go into moodledata/sessions ... remove all files contained there in.  Also, Moodle caches a lot of stuff now ... also in moodledata a cache directory and a localcache directory exist.   The contents of those could also be removed manually.   Moodle should rebuild what it needs to cache when it needs to cache it.

In your config.php file or the restored code, make sure Moodle will use files, not DB by adding a line to config.php that restricts sessions to files only.

$CFG->dbsessions='0';

Check the .htaccess file in moodle data ... mind sharing what that has in it?

Also, if you had been running the site under php-fast cgi or something like that (anything other than mod) you could have error_log files spread all over various code directories.  Each one of those have clues and might require you to create an .htaccess file for that directory that allows something not allowed site wide (the main php.ini file for your site).

That's what I mean by a 'jail' on VPS systems.

If you PM me, i might have an offer to help you determine if it's a hosting issue or not.

'spirit of sharing', Ken


In reply to Ken Task

Re: Table "sessions" does not exist

Ian L發表於

Not sure if it was using files or sessions. Where is that setting? 

I tried removing the sessions, cache, localcache and a couple others I found mentioned in this forum it didn't seem to do anything.

I did try putting this:

$CFG->dbsessions='0';

in there. Didn't seem to do anything should I leave it in there?

Htaccess in moodledata says this:

deny from all

AllowOverride None

Note: this file is broken intentionally, we do not want anybody to undo it in subdirectory!

I just tried reinstalling 2.7 with a new database, but when I switch the database back to the old I get an error still (ERROR READING FROM DATABASE).


In reply to Ian L

Re: Table "sessions" does not exist

Ken Task發表於
Particularly helpful Moodlers的相片

Ya know, when one gets into one of these, confusion reigns ... things that sound logical, aren't.

So here we go ... pardon me ... just pointing out some things ...

"Not sure if it was using files or sessions. Where is that setting?"

You can't get to the Moodle Admin UI to see or set that.  So right now that's not really important.   The only way you can set it is in config.php.

"I just tried reinstalling 2.7 with a new database, but when I switch the database back to the old I get an error still (ERROR READING FROM DATABASE)."

Now step back and think about that one ... could it be that when the 2.7 upgrade to hyperjumped 3.2 failed it actually crashed some where in the middle?  Such that the DB is half and half or a table that was in the process of conversion/re-ordering or changing got whacked?   I'll answer that ...  Yes!

That's why I've asked ... and you've yet to respond to this .... did you make a backup of the DB before you attempted the upgrade?

IF you did, restore that database to a slightly different name ... rather than moodle, how about moodle27g (meaning moodle version 2.7.x Good ... ie, did work before)  and use that DB in the restored 2.7 code from a backup of the code.

Now if you didn't make a backup, shame on you ... but here's a test of Inmotionhosting service ... do they have a backup of your account?   In that backup there is more than likely the 2.7 site that was working.   Even if shared hosted ... they should have an image of that machine ... and probably serveral days worth of backups.   Inquire!

'spirit of sharing', Ken

In reply to Ken Task

Re: Table "sessions" does not exist

Ian L發表於

Yes! I made a backup. But I can't upload it cause it's too big 180mb+ and can only do 50. They did that. At first they said they said they got errors uploading it or whatever. But then today they sent me an email sayign everything looks fine on their end.

Pretty typical of them in my experience.

the database that i switched the new one too was the old 2.7. how do i find out if there is error like u said in the database? i did repair it and said it was ok.

In reply to Ian L

Re: Table "sessions" does not exist

Ken Task發表於
Particularly helpful Moodlers的相片

Sounds like your 'cheapo' days are over ... ie, shared hosting and over limits imposed by cheapo package. :\   Surely they have offered moving you to a VPS.

Can think of two ways you could find out if the backup you have downloaded and in your possession off the server is corrupted itself ...

1. install a local (on PC or whatever you have) Moodle and use 2.7 code backup, the DB sql dump into a fresh database .... in this case to get fully functioning site checked you'd need a backup of your moodedata directory as well.

2. .... and this ... final offer

If you PM me, i might have an offer to help you determine if it's a hosting issue or not.

'spirit of sharing', Ken


In reply to Ken Task

Re: Table "sessions" does not exist

Ian L發表於

Thanks I am trying to download that to my computer now. I'll see how that goes. 

The only other idea I had was trying to import one table at a time into a new database.

In reply to Ian L

Re: Table "sessions" does not exist

Ian L發表於

I don't know if this is important but I noticed the new installation of 2.7 has 250 tables in it and my back up has 209? They should match right?

But the back up is 258miB and the new installation 12.5.

This is getting confusing seems like they changed my database to innoDB and then when I created a new database for installation it's a MyISAM like my backup is.

In reply to Ian L

Re: Table "sessions" does not exist

Ken Task發表於
Particularly helpful Moodlers的相片

Not all 2.7's, once they have been used and admin installed a theme or block or mod or a course or two, would have the same number of tables.

Did you un-install any core mods/blocks/fetc.?   Thus your backup would have fewer.

A stock 2.7 with only an additional auth plugin shows 

mysql> show tables;
+----------------------------------+
| Tables_in_moodle27               |
+----------------------------------+

more stuff ...

at bottom of output:

| mdl_workshopform_rubric_config   |
| mdl_workshopform_rubric_levels   |
+----------------------------------+
319 rows in set (0.01 sec)

The above from a stock 2.7.highest with only an additional auth plugin installed.

Does "back up is 258miB and the new installation 12.5" mean:

backup is 258MB and new installation is 12.5MB?

Then yes, your DB SQL dump would be larger ... site has been used.

Example on a sandbox site with a 2.7latest ...

[root@sos moodle27]# du -h /home/backup/moodles/moodle2718-db-20170311161726.sql
2.9M    /home/backup/moodles/moodle2718-db-20170311161726.sql

It does have some tinker courses installed in it.

As far as a provider having MyISAM as default engine ... on a shared system, not all users use software that has recommendations to use InnoDB.  MyISAM is faster but InnoDB is supposedly better for recovery and other advantages.   With what tool did you create the DB?  Default for creation might be set to the DB servers defaults which are set in a config file you cannot reach/change, but the interface they give you might allow the customer to change the engine.

Besides that ... Moodle has provided a script in moodlecode/admin/cli/  for a long time now that will convert the engine from whatever to InnoDB.   Script is command line only.

[root@sos cli]# php mysql_engine.php
MySQL engine conversions script.

It is recommended to stop the web server before the conversion.
Do not use MyISAM if possible, because it is not ACID compliant
and does not support transactions.

Options:
--engine=ENGINE       Convert MySQL tables to different engine
-l, --list            Show table information
-a, --available       Show list of available engines
-h, --help            Print out this help

Having a moodle backup whose engine is MyISAM hasn't been a show stopper from what I re-call.

What's more important, is the data contained in the SQL file itself ok ... a tool like mysqlcheck would be handy to have as it would spot tables that need repair ...

mysqlcheck -u root -p --analyze --databases moodle27

If all tables ok, the command above would show OK for every table.

If not, one could then use a repair tool to see if it couldn't be fixed ...

IF one used the backup made prior to the attempted upgrade on the local Moodle you've installed and it errors, then, possibly when/if downloaded in ascii mode bad characters were injected into file.

Soooo some what hard to tell at this point.   One would need a SQL dump back at a time when the site was running without error to be able to compare I would think.

'spirit of sharing', Ken

In reply to Ken Task

Re: Table "sessions" does not exist

Ian L發表於

I figured out part of the problem. The backup got cut off in download I think and there's an error at the end of the sql file called:

<!-- PMA-SQL-ERROR -->

41 tables were missing. Not sure what that is going to mean for the table that got cut off. I copied the tables from the new installation to the backup. However some are innoDB and others mYISAM, so I guess I have to convert those. 

Maybe converting that is part of the problem or maybe the table that got cut off is?

Still haven't found a solution and still have an ERROR READING FROM DATABASE.

I think I do have one older sql backup - like a year older backup that I could look at and maybe piece the two together into something.


In reply to Ian L

Re: Table "sessions" does not exist

Ken Task發表於
Particularly helpful Moodlers的相片

IF one Googles for such a PMA error one can find multiple reasons ... some possibily fixable ... but on a shared hosting system ... maybe not.

One possible reason ... php setting for time for a script to run (not long enough) ... or memory a php script can consume (not enough memory allocated) ... remember PMA .... PhpMyAdmin ... is a php script.   If those were the cause, web server error logs would give hints/clues.

41 tables missing ... that's a lot ... me thinks maybe too many.

Year old backup ...  piece together from ... I'd say big chance and deeper into rabbit hole.

That error reading from database could be a result of same settings for php ... time for script to run and/or memory a script can consume.

Suggest, if possible, creating a phpinfo page ... an placing it at the document root of the server ... that's where your moodle code resides .... same directory as the config.php file.

Dunno that Moodle will allow but here's what a phpinfo page looks like:

<?php

// Show all information, defaults to INFO_ALL
phpinfo();

?>

That will show settings for PHP that I've mentioned.   Read up on inmotionhosting docs on how to change them for your site on a shared host.

If you still plan to host where you are, why not upgrade your hosting plan to a VPS and get free of some of the restrictions of a shared hosting plan.

Hmmmm ... rather then piecing together ... how about just restoring the SQL flie you have from a year ago?   Contained therein is info as to version of Moodle and if the same version ... or close to it ... maybe slightly behind, that would result in a minor upgrade AND, of course, a years worth of your work and students work, gone.   But ... you get it up on shared hosting ...

Bottom line for you, my friend, I still think is upgrading to VPS ...

'spirit of sharing', Ken

In reply to Ian L

Re: Table "sessions" does not exist

Ken Task發表於
Particularly helpful Moodlers的相片

Ok, going the extra mile here ... believe you said you were hosted at inmotion hosting so did  Google search to see if they had any information on customer hosting backups.   They do.

Here's URL:

http://www.inmotionhosting.com/support/website/backup-and-restore/restoring-a-backup

And from that info, looks like, depending upon the package purchased, one might be able to restore entire customer area ... which would mean restoring your Moodle to a functioning 2.7.x as it was before attempting an upgrade ... *but* only if one does it within a 24 to 36 hr period.

Sadly, you might have been chasin' rabbits too long.   For your sake, hope not.

'spirit of sharing', Ken


In reply to Ken Task

Re: Table "sessions" does not exist

Ian L發表於
Computer died. Only option now is to try to fix database. The other older backup was in my computer. When it rains it pours.
In reply to Ken Task

Re: Table "sessions" does not exist

Ian L發表於

Yay, got my computer working and the old backup up. Thing is now I have a couple of other problems.

  1. There is no css. I can see the file in the source though.
  2. I can't access site admin. When I try it gives me an error and redirects to the homepage. 


incorrect access detected this server may be accessed through mysite.com,  Please notify server administrator.
















In reply to Ian L

Re: Table "sessions" does not exist

Ken Task發表於
Particularly helpful Moodlers的相片

You've also started another thread in forums that is directly related to this issue ...

https://moodle.org/mod/forum/discuss.php?d=349138#p1408639

Please use this thread rather than both.

See response for help navigate menu links that right now are broken.

You will need to use any tool you have in shared hosting that allows you to browse files to solve some of this issue  (and probably serveral to come) ... newer moodledata from a failed upgrade to 3.2.

Go to the modledata directory in the file browser tool, and remove the contents of sessions ... not the sessions directory itself ... but the contents.   If you are logged on that will kick you out ... your session file had been erased.   That's normal.   Just log back in.

Also, remove all the files contained in the moodledata/cache/ directory.   That's where css cached files are stored.

Was the old site using any addon theme?   If so, you might need to set the theme statically by editing the config.php file and using one of the stock (came with 2.7) themes.

Those were canvas,clean, and more.

In config.php add this line to set the theme to a stock theme:

$CFG->theme="'ONEOFABVOVE';

Solving all the problems will probably involve the use of direct database manipulation .. which is never really recommended ... but in your case ... last resort.

Broken images that you uploaded will require investigation to see if those files are still in moodledata/filedir/

That will involve using phpMyAdmin ... which hopefully has been allocated enough memeory/time to run, etc. to complete what might be heavy queries in mdl_files table seeking information about files contained therein.

Am certain you will be back posting the next set of issues you find, but try not to put into one posting in this thread a laundry list.    That too will be confusing and take what might be hours to provide suggestions.

'spirit of sharing', Ken




In reply to Ken Task

Re: Table "sessions" does not exist

Ian L發表於

I deleted the cache and sessions files and for some reason it didn't kick me outand there were no changes. I was still logged in. I was using the 'clean' theme.

Also adding that line to config.php just caused the Parse error: syntax error, unexpected end of file in /home/username/public_html/moodle/config.php on line 37

In reply to Ian L

Re: Table "sessions" does not exist

Ken Task發表於
Particularly helpful Moodlers的相片

Sorry, but if you added that line correctly ... ending with a ';' and before the ending comments .... those lines with // in front ... and there is no closing php tag ... which the comment states in the file, it will work.

If removing files from sessions didn't kick you out the site is using DB for sessions.

Thus, might require yet another line to tell your Moodle NOT to use DB for sessions.

$CFG->dbsessions='0';

 ... to next question now.


In reply to Ken Task

Re: Table "sessions" does not exist

Ian L發表於

Logging in and then out didn't create a new session file. Why is that? After clearing those files it is still empty.

In reply to Ian L

Re: Table "sessions" does not exist

Ken Task發表於
Particularly helpful Moodlers的相片
What are ownerships and permissions on moodledata?
What did you restore this time ... DB, code, and moodledata from your backup?
'spirit of sharing', Ken

In reply to Ian L

Re: Table "sessions" does not exist

Ian L發表於

I purged the cache at /admin/purgecache.php

and got some errors.

Warning: require_once(/home/username/public_html/course/cache/lib.php): failed to open stream: No such file or directory in /home/username/public_html/course/lib/setup.php on line 602


Fatal error: require_once(): Failed opening required '/home/username/public_html/course/cache/lib.php' (include_path='/home/username/public_html/course/lib/zend:/home/username/public_html/course/lib/pear:.:/usr/lib/php:/usr/local/lib/php') in /home/username/public_html/course/lib/setup.php on line 602

In reply to Ian L

Re: Table "sessions" does not exist

Ken Task發表於
Particularly helpful Moodlers的相片

Am looking at the files for 2.7.18+ (Build: 20170127).

There is no lib directory in moodlecode/course/

Check the version.php file at the root of moodle code.  What does your version.php file say for

$release

In addition ... if the config file you show above:

https://moodle.org/mod/forum/discuss.php?d=348976#p1407886

it shows that this line:

'dbhandlesoptions' => false,// On PostgreSQL poolers like pgbouncer don't

and this line

'dbcollation' => 'uft8_general_ci', // MySQL has partial and full UTF-8

Are active ... ie, turned on.

If that config.php file is the same one you are using now, it comes from the config-dist.php file of moodle 3.2 and you are trying to restore a 2.7.x site.

'spirit of sharing', Ken




In reply to Ken Task

Re: Table "sessions" does not exist

Ian L發表於

No there are no lines like that in my config.php file. The latest errors I get are:

Warning: require_once(/home/username/public_html/course/cache/lib.php): failed to open stream: No such file or directory in /home/username/public_html/course/lib/setup.php on line 602

There is no file there with that name.

my config file says:

require_once(dirname(__FILE__) . '/lib/setup.php');

I also tried installing a new installation of moodle 2.7.19 in another directory and am having similar errors. 

Warning: require_once(/home/username/public_html/moodle/cache/lib.php): failed to open stream: No such file or directory in /home/username/public_html/moodle/lib/setup.php on line 607



In reply to Ian L

Re: Table "sessions" does not exist

Ken Task發表於
Particularly helpful Moodlers的相片

In your initial posting in this thread said;

"This is what my config.php looks like ( I deleted a bunch of lines that were commented out to paste here):"

And below that in what was copied and pasted it shows (and below is a copy and paste from that initial posting):


-- begin copy --
    'dbhandlesoptions' => false,// On PostgreSQL poolers like pgbouncer don't
                                // support advanced options on connection.
                                // If you set those in the database then
                                // the advanced settings will not be sent.
    'dbcollation' => 'uft8_general_ci', // MySQL has partial and full UTF-8
                                // support. If you wish to use partial UTF-8
                                // (three bytes) then set this option to
                                // 'utf8_unicode_ci', otherwise this option
                                // can be removed for MySQL (by default it will
                                // use 'utf8mb4_unicode_ci'. This option should
                                // be removed for all other databases.
);

--- end copy ---

Informed you those lines appear in a 3.2 config-dist.php file.   They do NOT appear in a config-dist.php file for version 2.7.x code.   This would suggest you've somehow mixed 3.2.x files with 2.7.x files ... or you continue to use a messed up config.php file ...  one that started as config-dist.php, was edited, and then renamed config.php.

Now we say ...

No there are no lines like that in my config.php file. !!!!?????

and, this latest posting ... the one to which this is a response says:

"my config file says
require_once(dirname(__FILE__) . '/lib/setup.php');"


Did you put the above line in config.php?

"I also tried installing a new installation of moodle 2.7.19 in another directory and am having similar errors. "

Installing new means files had to be transferred to the server.  How did you do that?   FTP? ... 'similar' errors means what?


If you used the same config.php file than aren't we making the same error
and expecting different results?

'spirit of sharing', Ken


In reply to Ken Task

Re: Table "sessions" does not exist

Ian L發表於

No I used those for the 3.2 upgrade.

This is my config for 2.7.

<?php  // Moodle configuration file


unset($CFG);

global $CFG;

$CFG = new stdClass();


$CFG->dbtype    = 'mysqli';

$CFG->dblibrary = 'native';

$CFG->dbhost    = 'localhost';

$CFG->dbname    = 'usename_bk';

$CFG->dbuser    = 'username_bk';

$CFG->dbpass    = 'y6Efffjk4o8iC';

$CFG->prefix    = 'mdl_';

$CFG->dboptions = array (

  'dbpersist' => 0,

  'dbport' => '',

  'dbsocket' => '',

);


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

$CFG->dataroot  = '/home/username/public_html/course/';

$CFG->admin     = 'admin';


$CFG->directorypermissions = 0777;


require_once(dirname(__FILE__) . '/lib/setup.php');


ini_set ('display_errors', 'on');

ini_set ('log_errors', 'on');

ini_set ('display_startup_errors', 'on');

ini_set ('error_reporting', E_ALL);

$CFG->debug = DEBUG_ALL;


// There is no php closing tag in this file,

// it is intentional because it prevents trailing whitespace problems!


In reply to Ian L

Re: Table "sessions" does not exist

Ken Task發表於
Particularly helpful Moodlers的相片

With age comes wisdom ... knowing when to quit (which really not my nature) is one of those.

Have made an offer via Private Messaging that cost you nothing to resolve this ... but, I've not heard from so ... so, relunctantly, resign.

If someone else would pickup the 'torch', feel free.

Best of luck.